highlights: use @preproc where appropriate

This commit is contained in:
ObserverOfTime 2022-09-18 20:15:23 +03:00 committed by Stephan Seitz
parent 0bfeb5484e
commit 9b43ab819c
15 changed files with 43 additions and 16 deletions

View file

@ -33,7 +33,7 @@
;; Pragmas and comments
(pragma) @constant.macro
(pragma) @preproc
(comment) @comment

View file

@ -131,3 +131,6 @@
value: (word) @parameter)
(regex) @string.regex
((program . (comment) @preproc)
(#match? @preproc "^#!/"))

View file

@ -43,7 +43,7 @@
"#elif"
"#endif"
(preproc_directive)
] @keyword
] @preproc
"#include" @include

View file

@ -124,3 +124,6 @@
)
(escape_sequence) @string.escape
((source_file . (line_comment) @preproc)
(#match? @preproc "^#!/"))

View file

@ -46,10 +46,9 @@
(identifier) @constant)
)
[
(comment)
(preproc)
] @comment
(comment) @comment
(preproc) @preproc
(comment) @spell

View file

@ -112,10 +112,9 @@
(undefined)
] @constant.builtin
[
(comment)
(hash_bang_line)
] @comment
(comment) @comment
(hash_bang_line) @preproc
(comment) @spell

View file

@ -155,6 +155,9 @@
((word) @boolean
(#any-of? @boolean "true" "false"))
((program . (comment) @preproc)
(#match? @preproc "^#!/"))
;; Error
(ERROR) @error

View file

@ -207,10 +207,9 @@
;;; Literals
[
(comment)
(shebang_line)
] @comment
(comment) @comment
(shebang_line) @preproc
(comment) @spell

View file

@ -15,6 +15,9 @@
(comment_environment)
] @comment
((line_comment) @preproc
(#lua-match? @preproc "^%% !TeX"))
[
(brack_group)
(brack_group_argc)

View file

@ -182,7 +182,7 @@
(comment) @comment @spell
(hash_bang_line) @comment
(hash_bang_line) @preproc
(number) @number

View file

@ -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

View file

@ -141,6 +141,10 @@
(float) @float
(comment) @comment @spell
((module . (comment) @preproc)
(#match? @preproc "^#!/"))
(string) @string
[
(escape_sequence)

View file

@ -29,3 +29,6 @@
((program . (comment) @include)
(#match? @include "^;\ +inherits\ *:"))
((program . (comment) @preproc)
(#match? @preproc "^; +extends"))

View file

@ -12,6 +12,9 @@
(comment) @comment @spell
((program . (comment) @preproc)
(#match? @preproc "^#!/"))
(identifier) @variable
(formal_parameters (identifier) @parameter)

View file

@ -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