aboutsummaryrefslogtreecommitdiffstats
path: root/queries/c_sharp
diff options
context:
space:
mode:
authorLuxed <devildead13@gmail.com>2021-06-03 20:54:10 -0400
committerStephan Seitz <stephan.lauf@yahoo.de>2021-06-04 23:56:26 +0200
commitdad49030481de597e82e2ca2ea804e828bf96b05 (patch)
treec9e800fadaf32eb589f16a38d71403be945eac60 /queries/c_sharp
parentfolds(c_sharp): Add basic folding (diff)
downloadnvim-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.scm33
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"