helix-mods/runtime/queries
Triton171 58758fee61
Indentation rework (#1562)
* WIP: Rework indentation system

* Add ComplexNode for context-aware indentation (including a proof of concept for assignment statements in rust)

* Add switch statements to Go indents.toml (fixes the second half of issue #1523)
Remove commented-out code

* Migrate all existing indentation queries.
Add more options to ComplexNode and use them to improve C/C++ indentation.

* Add comments & replace Option<Vec<_>> with Vec<_>

* Add more detailed documentation for tree-sitter indentation

* Improve code style in indent.rs

* Use tree-sitter queries for indentation instead of TOML config.
Migrate existing indent queries.

* Add documentation for the new indent queries.
Change xtask docgen to look for indents.scm instead of indents.toml

* Improve code style in indent.rs.
Fix an issue with the rust indent query.

* Move indentation test sources to separate files.
Add `#not-kind-eq?`, `#same-line?` and `#not-same-line` custom predicates.
Improve the rust and c indent queries.

* Fix indent test.
Improve rust indent queries.

* Move indentation tests to integration test folder.

* Improve code style in indent.rs.
Reuse tree-sitter cursors for indentation queries.

* Migrate HCL indent query

* Replace custom loading in indent tests with a designated languages.toml

* Update indent query file name for --health command.

* Fix single-space formatting in indent queries.

* Add explanation for unwrapping.

Co-authored-by: Triton171 <triton0171@gmail.com>
2022-03-31 00:08:07 +09:00
..
bash tree sitter comments injections (#1527) 2022-01-21 00:50:06 +09:00
c Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
c-sharp C# highlighting improvements (#1795) 2022-03-12 12:06:56 -06:00
cmake Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
comment Add tree-sitter-comment (#1300) 2021-12-19 23:56:56 +09:00
cpp Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
css tree sitter comments injections (#1527) 2022-01-21 00:50:06 +09:00
dart Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
dockerfile Support dockerfiles (#1303) 2021-12-21 18:22:15 +09:00
elixir update tree-sitter-elixir 2022-03-30 13:24:53 +09:00
elm feat(languages): Elm (#1514) 2022-01-21 00:47:23 +09:00
erlang update tree-sitter-erlang 2022-03-30 13:24:53 +09:00
fish Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
git-commit update tree-sitter-git-commit (#1838) 2022-03-19 14:43:13 +09:00
git-config add tree-sitter-git-config (#1426) 2022-01-09 22:10:20 +08:00
git-diff Add tree-sitter-git-diff (#1373) 2021-12-30 00:31:23 +09:00
git-rebase add tree-sitter-git-rebase (#1402) 2021-12-31 06:58:47 +08:00
gleam add tree-sitter-gleam 2022-03-30 13:24:53 +09:00
glsl Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
go Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
graphql feat(languages): GraphQL (#1515) 2022-01-21 23:16:40 +09:00
haskell tree sitter comments injections (#1527) 2022-01-21 00:50:06 +09:00
hcl Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
html tree sitter comments injections (#1527) 2022-01-21 00:50:06 +09:00
iex add tree-sitter-iex (#1576) 2022-01-25 15:50:34 +09:00
java tree sitter comments injections (#1527) 2022-01-21 00:50:06 +09:00
javascript Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
json Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
julia tree sitter comments injections (#1527) 2022-01-21 00:50:06 +09:00
kotlin Add kotlin language (#1689) 2022-02-23 23:25:44 +09:00
latex tree sitter comments injections (#1527) 2022-01-21 00:50:06 +09:00
lean feat(languages): Lean experimental tree-sitter-lean (#1422) 2022-01-17 23:05:17 +09:00
ledger Add tree-sitter-comment (#1300) 2021-12-19 23:56:56 +09:00
llvm Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
llvm-mir Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
llvm-mir-yaml Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
lua Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
make tree sitter comments injections (#1527) 2022-01-21 00:50:06 +09:00
markdown Allow separate styles for markup headings (#1618) 2022-02-21 16:45:48 +09:00
nix Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
ocaml Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
ocaml-interface tree sitter comments injections (#1527) 2022-01-21 00:50:06 +09:00
org Initial basic Org markup support thanks to tree-sitter-org (#1845) 2022-03-20 17:14:30 -05:00
perl Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
php Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
protobuf Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
python Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
regex add tree-sitter-regex (#1362) 2022-01-06 23:00:00 +08:00
rescript Fix Rescript hightlights query (#1863) 2022-03-23 14:03:58 -05:00
ruby Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
rust Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
scala Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
solidity Add syntax highlighting for Solidity (#1854) 2022-03-22 11:38:49 -05:00
svelte Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
tablegen Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
toml tree sitter comments injections (#1527) 2022-01-21 00:50:06 +09:00
tsq Add tree-sitter-comment (#1300) 2021-12-19 23:56:56 +09:00
tsx tree sitter comments injections (#1527) 2022-01-21 00:50:06 +09:00
twig epocsquadron/add tree sitter twig (#1602) 2022-02-01 12:35:07 +09:00
typescript Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
vue tree sitter comments injections (#1527) 2022-01-21 00:50:06 +09:00
wgsl tree sitter comments injections (#1527) 2022-01-21 00:50:06 +09:00
yaml Indentation rework (#1562) 2022-03-31 00:08:07 +09:00
zig Indentation rework (#1562) 2022-03-31 00:08:07 +09:00