Gokul Soumya
a8618cf111
Add precise rust queries for use, mod, as ( #1339 )
...
- Differentiates between `as` keyword as a binary type cast
operator and import renamer.
- `mod` and `use` are now under `@keyword.control.import`,
but `mod` is a `@keyword` if used as `mod name;`.
3 years ago
Gokul Soumya
f1c634326b
Improve rust syntax highlighting ( #1295 )
...
- Highlight fragment specifiers (expr, tt, in macro
definitions) with @type.
- Highlight attributes as macros
3 years ago
Michael Davis
e72786df8e
Add tree-sitter-comment ( #1300 )
...
* Add tree-sitter-comment
Fix #1164
* fix precedence in tree-sitter-comment highlights
connects https://github.com/helix-editor/helix/pull/1170
* set injection-regex for comment language
* remove comment filetype
* fix comment injections for neovim-style injections tags
* add comment injections for elixir
* remove f.comment
* fix spacing in .gitmodules
* run 'cargo xtask docgen'
Co-authored-by: Ivan Tham <pickfire@riseup.net>
3 years ago
Kirawi
ee889aaa85
Updated tree-sitter query scopes ( #896 )
...
* updated theme scopes
variable.property -> variable.field
property -> variable.field
* updated theme scopes
* update book and themes
updated book and themes to reflect scope changes
* wip
* update more queries
* update dark_plus.toml
3 years ago
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
4cc562318a
Improve docs, fix up a few highlight scopes
3 years ago
Blaž Hrastnik
4ac29434cb
syntax: Add go & rust locals, improve tree-sitter error message
3 years ago
Blaž Hrastnik
a6108baec9
Improve grammar definitions
3 years ago
oberblastmeister
098b6b6eed
gruvbox theme changes ( #594 )
...
* changed some gruvbox highlights
* more stuff including cursors
* use property instead
* use variable.property
3 years ago
Blaž Hrastnik
29cefa1be8
rust: Indent multi line call expressions one level deeper
3 years ago
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.
3 years ago
Kirawi
084a8a9522
Rewritten Rust `highlights.scm` ( #425 )
...
* rewrote Rust highlights.scm
* wip
* wip
* wip
* wip
* fixed type highlighting
* wip
* rewrite again
* moved operators
* missing newline
* missing newline
* update book
* fix constructor highlighting
* fix constructor highlighting
* fix const highlighting
* better constructor highlighting
* remove dup, bug was my locals.scm file
* fixed docs
* merge
* fixed for highlighting
* add yield
* remove yield
* added yield back
* fixed yield highlighting
* unecessary
3 years ago
Kirawi
c7aa7bf4ba
VSCode Dark+ Theme ( #414 )
...
* wip
* Add VSCode Dark+ Theme
wip
wip
wip
wip
wip
wip
properly detect constants
add bool
wip
* suggestion
* add variant for c/c++
* fix hexcode error
* removed regex highlight
* fixed constant higlighting
* wip
* add space
* add suggestions
* update theme
* update book
* suggestions
* fix c/c++ enum
* update book
3 years ago
notoria
f3a243c6cb
Rust: Highlight crate namespace, categorize `mut`
3 years ago
notoria
b2b2d430ae
Rust: Add keyword `async`, match the entire macro
3 years ago
Blaž Hrastnik
67b037050f
Adjust rust indents
3 years ago
Blaž Hrastnik
6e03019a2c
Adjust highlighting for rust.
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
305a059f58
Highlight metavariables ($var) inside rust macros.
4 years ago
Blaž Hrastnik
dfb1ae2d33
Rust: Highlight 'crate' as a keyword.
4 years ago
Blaž Hrastnik
61872de6c0
queries: rust: highlight number constants correctly.
4 years ago
Blaž Hrastnik
71c06c11cb
Import tree sitter queries.
4 years ago