aboutsummaryrefslogtreecommitdiff
path: root/runtime/queries/vim/highlights.scm
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/queries/vim/highlights.scm')
-rw-r--r--runtime/queries/vim/highlights.scm37
1 files changed, 34 insertions, 3 deletions
diff --git a/runtime/queries/vim/highlights.scm b/runtime/queries/vim/highlights.scm
index 3d1729b2cd..239b0a0b37 100644
--- a/runtime/queries/vim/highlights.scm
+++ b/runtime/queries/vim/highlights.scm
@@ -36,7 +36,8 @@
;; Function related
(function_declaration name: (_) @function)
-(call_expression function: (identifier) @function)
+(call_expression function: (identifier) @function.call)
+(call_expression function: (scoped_identifier (identifier) @function.call))
(parameters (identifier) @parameter)
(default_parameter (identifier) @parameter)
@@ -59,14 +60,20 @@
"execute"
"normal"
"set"
+ "setfiletype"
"setlocal"
"silent"
"echo"
+ "echon"
+ "echohl"
"echomsg"
+ "echoerr"
"autocmd"
"augroup"
"return"
"syntax"
+ "filetype"
+ "source"
"lua"
"ruby"
"perl"
@@ -98,10 +105,21 @@
"ex"
"visual"
"view"
+ "eval"
] @keyword
(map_statement cmd: _ @keyword)
(command_name) @function.macro
+;; Filetype command
+
+(filetype_statement [
+ "detect"
+ "plugin"
+ "indent"
+ "on"
+ "off"
+] @keyword)
+
;; Syntax command
(syntax_statement (keyword) @string)
@@ -118,6 +136,8 @@
"match"
"cluster"
"region"
+ "clear"
+ "include"
] @keyword)
(syntax_argument name: _ @keyword)
@@ -175,15 +195,18 @@
;; Literals
-(string_literal) @string @spell
+(string_literal) @string
(integer_literal) @number
(float_literal) @float
(comment) @comment @spell
+(line_continuation_comment) @comment @spell
(pattern) @string.special
(pattern_multi) @string.regex
(filename) @string
(heredoc (body) @string)
-((heredoc (parameter) @keyword))
+(heredoc (parameter) @keyword)
+[ (marker_definition) (endmarker) ] @label
+(literal_dictionary (literal_key) @label)
((scoped_identifier
(scope) @_scope . (identifier) @boolean)
(#eq? @_scope "v:")
@@ -219,12 +242,16 @@
"%="
".="
"..="
+ "<<"
+ "=<<"
+ (match_case)
] @operator
; Some characters have different meanings based on the context
(unary_operation "!" @operator)
(binary_operation "." @operator)
+
;; Punctuation
[
@@ -234,6 +261,7 @@
"}"
"["
"]"
+ "#{"
] @punctuation.bracket
(field_expression "." @punctuation.delimiter)
@@ -249,6 +277,9 @@
((set_value) @number
(#match? @number "^[0-9]+(\.[0-9]+)?$"))
+(inv_option "!" @operator)
+(set_item "?" @operator)
+
((set_item
option: (option_name) @_option
value: (set_value) @function)