Commit graph

6 commits

Author SHA1 Message Date
ath3
598bd8bf11
Update tree-sitter-cmake (#4809) 2022-11-18 14:13:13 -06:00
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
Daniel S Poulin
9bfb0caf1b
Add comment textobject for surround selection and navigation (#1605) 2022-03-06 10:54:24 +05:30
Sebastian Neubauer
ec878e4011
Add textobjects and indents to cmake (#1307) 2021-12-26 00:10:19 +09:00
Sebastian Neubauer
23091c9d29
Highlight comments in c, cpp, cmake and llvm (#1309)
Also, reuse the c injections in glsl
2021-12-20 11:42:23 +09:00
ath3
787ba4f233
CMake support (#888) 2021-10-23 08:57:21 +09:00