Commit graph

5 commits

Author SHA1 Message Date
Triton171
4da050b4bb
Add basic indentation for languages without treesitter-based indentation rules (always use the indent of the current line for a new line). (#1341)
Fix several bugs in the treesitter indentation calculation.

Co-authored-by: Triton171 <triton0171@gmail.com>
2022-01-03 11:03:57 +09:00
Blaž Hrastnik
29cefa1be8 rust: Indent multi line call expressions one level deeper 2021-07-26 11:19:33 +09:00
Blaž Hrastnik
f24007b30f Improve rust indentation queries
if/if let are already handled by block, and keeping these scopes would
indent else blocks one level too far.
2021-07-26 11:19:33 +09:00
Blaž Hrastnik
67b037050f Adjust rust indents 2021-05-30 17:13:32 +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