diff options
| -rw-r--r-- | queries/agda/highlights.scm | 2 | ||||
| -rw-r--r-- | queries/bash/highlights.scm | 3 | ||||
| -rw-r--r-- | queries/c/highlights.scm | 2 | ||||
| -rw-r--r-- | queries/cmake/highlights.scm | 3 | ||||
| -rw-r--r-- | queries/dot/highlights.scm | 7 | ||||
| -rw-r--r-- | queries/ecma/highlights.scm | 7 | ||||
| -rw-r--r-- | queries/fish/highlights.scm | 3 | ||||
| -rw-r--r-- | queries/kotlin/highlights.scm | 7 | ||||
| -rw-r--r-- | queries/latex/highlights.scm | 3 | ||||
| -rw-r--r-- | queries/lua/highlights.scm | 2 | ||||
| -rw-r--r-- | queries/perl/highlights.scm | 3 | ||||
| -rw-r--r-- | queries/python/highlights.scm | 4 | ||||
| -rw-r--r-- | queries/query/highlights.scm | 3 | ||||
| -rwxr-xr-x | queries/r/highlights.scm | 3 | ||||
| -rw-r--r-- | queries/yaml/highlights.scm | 7 |
15 files changed, 43 insertions, 16 deletions
diff --git a/queries/agda/highlights.scm b/queries/agda/highlights.scm index 2f843ef74..ed208f1b6 100644 --- a/queries/agda/highlights.scm +++ b/queries/agda/highlights.scm @@ -33,7 +33,7 @@ ;; Pragmas and comments -(pragma) @constant.macro +(pragma) @preproc (comment) @comment diff --git a/queries/bash/highlights.scm b/queries/bash/highlights.scm index e4ea63ed9..c0a175267 100644 --- a/queries/bash/highlights.scm +++ b/queries/bash/highlights.scm @@ -131,3 +131,6 @@ value: (word) @parameter) (regex) @string.regex + +((program . (comment) @preproc) + (#match? @preproc "^#!/")) diff --git a/queries/c/highlights.scm b/queries/c/highlights.scm index 856705c7c..594826366 100644 --- a/queries/c/highlights.scm +++ b/queries/c/highlights.scm @@ -43,7 +43,7 @@ "#elif" "#endif" (preproc_directive) -] @keyword +] @preproc "#include" @include diff --git a/queries/cmake/highlights.scm b/queries/cmake/highlights.scm index 417f8d926..3378480c0 100644 --- a/queries/cmake/highlights.scm +++ b/queries/cmake/highlights.scm @@ -124,3 +124,6 @@ ) (escape_sequence) @string.escape + +((source_file . (line_comment) @preproc) + (#match? @preproc "^#!/")) diff --git a/queries/dot/highlights.scm b/queries/dot/highlights.scm index 4ed1df820..d8b70a949 100644 --- a/queries/dot/highlights.scm +++ b/queries/dot/highlights.scm @@ -46,10 +46,9 @@ (identifier) @constant) ) -[ -(comment) -(preproc) -] @comment +(comment) @comment + +(preproc) @preproc (comment) @spell diff --git a/queries/ecma/highlights.scm b/queries/ecma/highlights.scm index a99227119..e2b25aafd 100644 --- a/queries/ecma/highlights.scm +++ b/queries/ecma/highlights.scm @@ -112,10 +112,9 @@ (undefined) ] @constant.builtin -[ - (comment) - (hash_bang_line) -] @comment +(comment) @comment + +(hash_bang_line) @preproc (comment) @spell diff --git a/queries/fish/highlights.scm b/queries/fish/highlights.scm index bbaa09600..10d54dff7 100644 --- a/queries/fish/highlights.scm +++ b/queries/fish/highlights.scm @@ -155,6 +155,9 @@ ((word) @boolean (#any-of? @boolean "true" "false")) +((program . (comment) @preproc) + (#match? @preproc "^#!/")) + ;; Error (ERROR) @error diff --git a/queries/kotlin/highlights.scm b/queries/kotlin/highlights.scm index 4174bfdbf..679fd063e 100644 --- a/queries/kotlin/highlights.scm +++ b/queries/kotlin/highlights.scm @@ -207,10 +207,9 @@ ;;; Literals -[ - (comment) - (shebang_line) -] @comment +(comment) @comment + +(shebang_line) @preproc (comment) @spell diff --git a/queries/latex/highlights.scm b/queries/latex/highlights.scm index 7703b239f..b9ded3d6b 100644 --- a/queries/latex/highlights.scm +++ b/queries/latex/highlights.scm @@ -15,6 +15,9 @@ (comment_environment) ] @comment +((line_comment) @preproc + (#lua-match? @preproc "^%% !TeX")) + [ (brack_group) (brack_group_argc) diff --git a/queries/lua/highlights.scm b/queries/lua/highlights.scm index 3c86c4cd6..50069258f 100644 --- a/queries/lua/highlights.scm +++ b/queries/lua/highlights.scm @@ -182,7 +182,7 @@ (comment) @comment @spell -(hash_bang_line) @comment +(hash_bang_line) @preproc (number) @number diff --git a/queries/perl/highlights.scm b/queries/perl/highlights.scm index c355dbb85..9767ce477 100644 --- a/queries/perl/highlights.scm +++ b/queries/perl/highlights.scm @@ -85,6 +85,9 @@ (comments) @comment (comments) @spell +((source_file . (comments) @preproc) + (#match? @preproc "^#!/")) + ; POD should be handled specially with its own embedded subtype but for now ; we'll just have to do this. (pod_statement) @text diff --git a/queries/python/highlights.scm b/queries/python/highlights.scm index 6555a5dea..94fbe50b8 100644 --- a/queries/python/highlights.scm +++ b/queries/python/highlights.scm @@ -141,6 +141,10 @@ (float) @float (comment) @comment @spell + +((module . (comment) @preproc) + (#match? @preproc "^#!/")) + (string) @string [ (escape_sequence) diff --git a/queries/query/highlights.scm b/queries/query/highlights.scm index ae0272af8..ee31a7e7e 100644 --- a/queries/query/highlights.scm +++ b/queries/query/highlights.scm @@ -29,3 +29,6 @@ ((program . (comment) @include) (#match? @include "^;\ +inherits\ *:")) + +((program . (comment) @preproc) + (#match? @preproc "^; +extends")) diff --git a/queries/r/highlights.scm b/queries/r/highlights.scm index 6d270be0b..179200d34 100755 --- a/queries/r/highlights.scm +++ b/queries/r/highlights.scm @@ -12,6 +12,9 @@ (comment) @comment @spell +((program . (comment) @preproc) + (#match? @preproc "^#!/")) + (identifier) @variable (formal_parameters (identifier) @parameter) diff --git a/queries/yaml/highlights.scm b/queries/yaml/highlights.scm index 311162c13..7e3c3a5e6 100644 --- a/queries/yaml/highlights.scm +++ b/queries/yaml/highlights.scm @@ -11,9 +11,14 @@ (anchor_name) @type (alias_name) @type (tag) @type -(yaml_directive) @keyword (ERROR) @error +[ + (yaml_directive) + (tag_directive) + (reserved_directive) +] @preproc + (block_mapping_pair key: (flow_node [(double_quote_scalar) (single_quote_scalar)] @field)) (block_mapping_pair |
