Dmitry Sharshakov
56d00fa7f4
Fix tests
3 years ago
Blaž Hrastnik
b635e35818
Appease clippy
3 years ago
Blaž Hrastnik
fd1eaafff5
Add :tree-sitter-scopes, useful when developing indents.toml
3 years ago
Nathan Vegdahl
f88d4c1e20
Move indent-style code into `helix_core::indent`.
3 years ago
Ivan Tham
f7c8500797
Fix append newline indent
...
Fix #492
3 years ago
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>
3 years ago
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>
3 years ago
Blaž Hrastnik
dd2903ff10
Dynamically load grammar libraries at runtime
3 years ago
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.
3 years ago
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.
3 years ago
wojciechkepka
ce97a2f05f
Add ability to change theme on editor
3 years ago
Blaž Hrastnik
1665bac1b6
Fix broken test
3 years ago
Wojciech Kępka
c978d811d9
Cleanup find_first_non_whitespace_char funcs
3 years ago
Blaž Hrastnik
06d8d3f55f
Try to detect language when document file path is set
...
Fixes #91
4 years ago
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.
4 years ago
Blaž Hrastnik
0190fee1c2
Fix indent test, we need to use the in-tree runtime dir.
4 years ago
Blaž Hrastnik
5954dafdbc
Indent array and tuple lists too.
4 years ago
Blaž Hrastnik
5edb374237
And some more indent patterns.
4 years ago
Blaž Hrastnik
9e6c8c2a5a
Rust: add a few more scopes to indent.
4 years ago
Blaž Hrastnik
9445b24b88
Simplify calculate_indentation.
4 years ago
Blaž Hrastnik
c1e5733b02
Remove the path specifier.
4 years ago
Blaž Hrastnik
63e602bda6
Fix issues with "enum A {|}" <Enter> indent calculation.
4 years ago
Blaž Hrastnik
ad3325db8e
minor: Remove a few unwraps.
4 years ago
Blaž Hrastnik
8b28bf2533
Fix broken test.
4 years ago
Blaž Hrastnik
5e6716c89c
Add tab_width and indent_unit config.
4 years ago
Blaž Hrastnik
59e6024186
Remove State from a few more signatures.
4 years ago
Blaž Hrastnik
87a6d4e736
minor: Simplify some code.
4 years ago
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
}
4 years ago
Blaž Hrastnik
c9dd1c930e
treewide: &RopeSlice -> RopeSlice. It's Copy so no reason to pass by ref
4 years ago
Blaž Hrastnik
7c99ff58fd
nix: include rust-src so rust-analyzer works correctly.
4 years ago
Blaž Hrastnik
22e1692adc
indent: Fix edge cases, refactor test.
4 years ago
Blaž Hrastnik
777a80917d
Address clippy lints.
4 years ago
Blaž Hrastnik
7d41550a23
indent: refactor logic to be more correct.
...
Thanks to atom-sane-indentation, nvim-treesitter and tree-sitter-indent.el
for inspiration.
4 years ago
Blaž Hrastnik
b39849dde1
Refactor: Document type as a wrapper around barebones State.
4 years ago
Blaž Hrastnik
16828d322a
wip
4 years ago
Blaž Hrastnik
6e658aae1c
Auto-indent on enter based on tree-sitter scopes.
4 years ago
Blaž Hrastnik
d64f4beede
Share tab width definitions.
4 years ago
Blaž Hrastnik
00e661f600
Indent draft, linewise paste
4 years ago