Luv-Ray
752ed8eb15
add `try` keyword to rust highlights ( #10641 )
7 months ago
Pedro Fedricci
0546273570
chore: update tree-sitter-rust to v0.21.0 ( #10365 )
...
* chore: update tree-sitter-rust to 0.21.0
* fix: pretty print and textobject tests
8 months ago
Michael Davis
c099dde2a7
Rust: Highlight extern crate aliases
...
For example `extern crate alloc as myalloc;`
8 months ago
Rose Hudson
a680b2e409
rust highlights: clean up constructor logic ( #8957 )
...
Enum variants and (tuple) structs are indistinguishable in general, so we
mark any PascalCase pattern or expression as a "constructor", which
covers all three.
11 months ago
Joey Hain
70bbbd7d19
add highlight scope for type parameters ( #8660 )
...
* rust: add highlight scope for type parameters
* handle optional type parameters
1 year ago
Chickenkeeper
486c3ab0d5
Fix Broken Attribute Highlights ( #5349 )
...
* Update highlights.scm
* Update highlights.scm
* Update themes.md
2 years ago
Chickenkeeper
c4263d6a56
Fix & Tweak Rust's Syntax Highlighting ( #5238 )
2 years ago
Blaž Hrastnik
bae890d8fa
Update tree-sitter-scheme
2 years ago
Alexis (Poliorcetics) Bourget
e232333d4a
fix: Outdated Rust queries after TS update
...
Ref: 3ddebf46e6
2 years ago
Anton Romanov
07d3157273
[rust highlights] fix scoped attribute macro matching ( #4659 )
...
Without this scoped attribute macros are not matched as macros.
Eg
```
#[path::macro]
```
2 years ago
Poliorcetics
2935e9da19
feat: Categorize Rust's keywords using more specific scopes ( #4510 )
2 years ago
Michael Davis
4a3b776b78
rust: Highlight function signatures as functions ( #4073 )
...
This stanza highlights functions within trait definitions. For example,
in:
pub trait Widget {
fn render(self, area: Rect, buf: &mut Buffer);
}
`render` is currently highlighted as a variable. With this change it's
highlighted as a function.
2 years ago
gavincrawford
1dd1476a9e
Fix highlighting on single-character Rust consts ( #3927 )
...
Co-authored-by: Kirawi <67773714+kirawi@users.noreply.github.com>
Co-authored-by: Gavin Crawford <gavincrawford@users.noreply.github.com>
2 years ago
Michael Davis
301f5d7cf7
Fix Rust attribute highlights ( #3729 )
2 years ago
Michael Davis
03f0ef93ac
Update tree-sitter-rust to latest
...
There don't appear to be any regressions from the updates.
Also included is a fix which highlights the "#" as in attributes
as punctuation. This was previously unhighlighted.
2 years ago
Vince Mutolo
7559b77d53
highlight closure pipes as brackets ( #3397 )
...
Co-authored-by: Vince Mutolo <vince@mutolo.org>
2 years ago
Michael Davis
78c944ebc3
rust: fix highlight corner-cases
...
* add punctuation highlights for commas as in function parameters
* remove stray `variable.parameter` highlight
* I couldn't find any regressions from this and it fixes an
edge case I ran into (but sadly did not record 😓 )
* highlight `fn` as `keyword.function`
* the theme docs have `fn` as an example so it seems fitting
2 years ago
A-Walrus
ad15e7b5e8
Add "<<=" operator to Rust syntax highlighting ( #2805 )
2 years ago
Anton Romanov
7983c71752
Introduce storage_class highlight scope ( #2731 )
2 years ago
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
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
Blaž Hrastnik
4cc562318a
Improve docs, fix up a few highlight scopes
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
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`
4 years ago
notoria
b2b2d430ae
Rust: Add keyword `async`, match the entire macro
4 years ago
Blaž Hrastnik
6e03019a2c
Adjust highlighting for rust.
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