Commit Graph

11 Commits (a7d87c79ce751ce5d97843026de82d5ee124d176)

Author SHA1 Message Date
Gokul Soumya 4ee92cad19
Add treesitter textobjects (#728)
* Add treesitter textobject queries

Only for Go, Python and Rust for now.

* Add tree-sitter textobjects

Only has functions and class objects as of now.

* Fix tests

* Add docs for tree-sitter textobjects

* Add guide for creating new textobject queries

* Add parameter textobject

Only parameter.inside is implemented now, parameter.around
will probably require custom predicates akin to nvim' `make-range`
since we want to select a trailing comma too (a comma will be
an anonymous node and matching against them doesn't work similar
to named nodes)

* Simplify TextObject cell init
3 years ago
Blaž Hrastnik 4ac29434cb syntax: Add go & rust locals, improve tree-sitter error message 3 years ago
Blaž Hrastnik ade1a453ef syntax: Improve go highlights 3 years ago
Blaž Hrastnik 466528c493 Golang indent improvements 3 years ago
Blaž Hrastnik 8fd8006043 Golang indent queries 4 years ago
Blaž Hrastnik aeabfc55a8 Adjust golang indents yet again 4 years ago
Blaž Hrastnik a28eaa81a0 Golang indent adjustment 4 years ago
Blaž Hrastnik 094203c74e Update deps, introduce the new tree-sitter lifetimes 4 years ago
Blaž Hrastnik 9edae7e1f8 syntax: golang: Indent type declarations 4 years ago
Blaž Hrastnik 31d41080ed Add indentation queries for golang. 4 years ago
Blaž Hrastnik 4e31d1521b Add tree-sitter queries. 4 years ago