diff options
| author | Luxed <devildead13@gmail.com> | 2021-06-03 20:54:10 -0400 |
|---|---|---|
| committer | Stephan Seitz <stephan.lauf@yahoo.de> | 2021-06-04 23:56:26 +0200 |
| commit | dad49030481de597e82e2ca2ea804e828bf96b05 (patch) | |
| tree | c9e800fadaf32eb589f16a38d71403be945eac60 /queries/c_sharp | |
| parent | folds(c_sharp): Add basic folding (diff) | |
| download | nvim-treesitter-dad49030481de597e82e2ca2ea804e828bf96b05.tar nvim-treesitter-dad49030481de597e82e2ca2ea804e828bf96b05.tar.gz nvim-treesitter-dad49030481de597e82e2ca2ea804e828bf96b05.tar.bz2 nvim-treesitter-dad49030481de597e82e2ca2ea804e828bf96b05.tar.lz nvim-treesitter-dad49030481de597e82e2ca2ea804e828bf96b05.tar.xz nvim-treesitter-dad49030481de597e82e2ca2ea804e828bf96b05.tar.zst nvim-treesitter-dad49030481de597e82e2ca2ea804e828bf96b05.zip | |
highlights(c_sharp): Add preprocessor directives queries
Diffstat (limited to 'queries/c_sharp')
| -rw-r--r-- | queries/c_sharp/highlights.scm | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/queries/c_sharp/highlights.scm b/queries/c_sharp/highlights.scm index 637e30e00..0bf777f0d 100644 --- a/queries/c_sharp/highlights.scm +++ b/queries/c_sharp/highlights.scm @@ -121,14 +121,47 @@ (for_each_statement type: (identifier) @type) +(warning_directive) @text.warning +(error_directive) @exception + +(define_directive + (identifier) @constant) @constant.macro +(undef_directive + (identifier) @constant) @constant.macro + +(line_directive) @constant.macro +(line_directive + (preproc_integer_literal) @constant + (preproc_string_literal)? @string) + +(pragma_directive + (identifier) @constant) @constant.macro +(pragma_directive + (preproc_string_literal) @string) @constant.macro + +[ + (nullable_directive) + (region_directive) + (endregion_directive) +] @constant.macro + [ "if" "else" "switch" "break" "case" + (if_directive) + (elif_directive) + (else_directive) + (endif_directive) ] @conditional +(if_directive + (identifier) @constant) +(elif_directive + (identifier) @constant) + [ "while" "for" |
