Blaž Hrastnik
585e3ce830
fix: tree-sitter-scopes would infinitely loop
2021-09-06 15:25:46 +09:00
Blaž Hrastnik
b635e35818
Appease clippy
2021-08-13 13:16:31 +09:00
Blaž Hrastnik
fd1eaafff5
Add :tree-sitter-scopes, useful when developing indents.toml
2021-08-13 13:15:53 +09:00
Nathan Vegdahl
f88d4c1e20
Move indent-style code into helix_core::indent
.
2021-07-30 12:22:59 +09:00
Ivan Tham
f7c8500797
Fix append newline indent
...
Fix #492
2021-07-26 22:36:40 +09:00
Cor Peters
cd65a48635
Made toggle_comments language dependent ( #463 )
...
* Made toggle_comments language dependent
* Fixed Test Cases
* Added clippy suggestion
* Small Fixes
* Clippy Suggestion
Co-authored-by: Cor <prive@corpeters.nl>
2021-07-19 01:33:38 +09:00
Cor Peters
0aa43902ca
Added option to provide a custom config file to the lsp. ( #460 )
...
* Added option to provide a custom config file to the lsp.
* Simplified lsp loading routine with anyhow
* Moved config to language.toml
* Fixed test case
* Cargo fmt
* Revert now-useless changes
* Renamed custom_config to config
Co-authored-by: Cor <prive@corpeters.nl>
2021-07-18 16:56:25 +09:00
Blaž Hrastnik
dd2903ff10
Dynamically load grammar libraries at runtime
2021-07-14 10:00:05 +09:00
Nathan Vegdahl
220bc85821
Fix all remaining warnings in helix-core except for two.
...
I'm not sure how to address them, because they look like they
might be bugs, and code is involved. Will poke the relevant people.
2021-07-01 19:06:52 -07:00
Nathan Vegdahl
b571f28641
Remove #[allow(unused)] from helix-core, and fix unused imports.
...
Still a bunch more warnings to fix in core, but it's a start.
2021-07-01 19:06:52 -07:00
wojciechkepka
ce97a2f05f
Add ability to change theme on editor
2021-06-20 00:07:13 +09:00
Blaž Hrastnik
1665bac1b6
Fix broken test
2021-06-12 10:24:48 +09:00
Wojciech Kępka
c978d811d9
Cleanup find_first_non_whitespace_char funcs
2021-06-08 17:22:37 +09:00
Blaž Hrastnik
06d8d3f55f
Try to detect language when document file path is set
...
Fixes #91
2021-06-04 11:03:40 +09:00
Blaž Hrastnik
4a9d1163e0
Hacky way to specify indent scopes per language via toml configs.
...
Can't do it via a scm query nicely because it returns an iterator over
all the matches, whereas we want to traverse the tree ourselves.
Can't extract the pattern data from a parsed query either.
Oh well, toml files for now.
2021-05-14 19:21:46 +09:00
Blaž Hrastnik
0190fee1c2
Fix indent test, we need to use the in-tree runtime dir.
2021-05-10 17:57:17 +09:00
Blaž Hrastnik
5954dafdbc
Indent array and tuple lists too.
2021-05-09 19:02:35 +09:00
Blaž Hrastnik
5edb374237
And some more indent patterns.
2021-04-14 17:14:13 +09:00
Blaž Hrastnik
9e6c8c2a5a
Rust: add a few more scopes to indent.
2021-04-14 15:39:31 +09:00
Blaž Hrastnik
9445b24b88
Simplify calculate_indentation.
2021-04-14 14:28:31 +09:00
Blaž Hrastnik
c1e5733b02
Remove the path specifier.
2021-04-09 18:57:46 +09:00
Blaž Hrastnik
63e602bda6
Fix issues with "enum A {|}" <Enter> indent calculation.
2021-04-07 16:39:13 +09:00
Blaž Hrastnik
ad3325db8e
minor: Remove a few unwraps.
2021-03-26 11:03:14 +09:00
Blaž Hrastnik
8b28bf2533
Fix broken test.
2021-03-25 16:53:32 +09:00
Blaž Hrastnik
5e6716c89c
Add tab_width and indent_unit config.
2021-03-22 13:53:36 +09:00
Blaž Hrastnik
59e6024186
Remove State from a few more signatures.
2021-03-18 14:17:32 +09:00
Blaž Hrastnik
87a6d4e736
minor: Simplify some code.
2021-02-24 16:07:39 +09:00
Blaž Hrastnik
8c82f8f140
indent: use_list indentation, fix indentation bug on open_below
...
use std::{
time::Duration // <- pressing `o` here would use }'s indent instead of prev line
}
2021-02-19 14:55:53 +09:00
Blaž Hrastnik
c9dd1c930e
treewide: &RopeSlice -> RopeSlice. It's Copy so no reason to pass by ref
2021-02-18 18:34:22 +09:00
Blaž Hrastnik
7c99ff58fd
nix: include rust-src so rust-analyzer works correctly.
2021-01-19 16:16:15 +09:00
Blaž Hrastnik
22e1692adc
indent: Fix edge cases, refactor test.
2021-01-10 23:46:18 +09:00
Blaž Hrastnik
777a80917d
Address clippy lints.
2021-01-08 16:37:36 +09:00
Blaž Hrastnik
7d41550a23
indent: refactor logic to be more correct.
...
Thanks to atom-sane-indentation, nvim-treesitter and tree-sitter-indent.el
for inspiration.
2021-01-08 16:15:12 +09:00
Blaž Hrastnik
b39849dde1
Refactor: Document type as a wrapper around barebones State.
2020-12-03 13:10:35 +09:00
Blaž Hrastnik
16828d322a
wip
2020-10-15 23:31:37 +09:00
Blaž Hrastnik
6e658aae1c
Auto-indent on enter based on tree-sitter scopes.
2020-10-14 18:07:42 +09:00
Blaž Hrastnik
d64f4beede
Share tab width definitions.
2020-10-14 13:35:54 +09:00
Blaž Hrastnik
00e661f600
Indent draft, linewise paste
2020-10-13 23:13:56 +09:00