aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2022-11-22 21:25:51 +0100
committerGitHub <noreply@github.com>2022-11-22 21:25:51 +0100
commit915891f28c3bd51007ea4105db82c62c17177115 (patch)
treee030dcd7158f72d36e9a97f11ba9c2180603051d /runtime
parentcd386b2c72eaacd9acac27380ee34db1accad9cb (diff)
downloadrneovim-915891f28c3bd51007ea4105db82c62c17177115.tar.gz
rneovim-915891f28c3bd51007ea4105db82c62c17177115.tar.bz2
rneovim-915891f28c3bd51007ea4105db82c62c17177115.zip
build(deps): update viml parser and queries (#21158)
Diffstat (limited to 'runtime')
-rw-r--r--runtime/queries/vim/highlights.scm37
-rw-r--r--runtime/queries/vim/injections.scm14
2 files changed, 42 insertions, 9 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)
diff --git a/runtime/queries/vim/injections.scm b/runtime/queries/vim/injections.scm
index e2dea8fe75..fdd025bfd9 100644
--- a/runtime/queries/vim/injections.scm
+++ b/runtime/queries/vim/injections.scm
@@ -1,13 +1,14 @@
(lua_statement (script (body) @lua))
(lua_statement (chunk) @lua)
-; (ruby_statement (script (body) @ruby))
-; (ruby_statement (chunk) @ruby)
-; (python_statement (script (body) @python))
-; (python_statement (chunk) @python)
+(ruby_statement (script (body) @ruby))
+(ruby_statement (chunk) @ruby)
+(python_statement (script (body) @python))
+(python_statement (chunk) @python)
+;; If we support perl at some point...
;; (perl_statement (script (body) @perl))
;; (perl_statement (chunk) @perl)
-; (autocmd_statement (pattern) @regex)
+(autocmd_statement (pattern) @regex)
((set_item
option: (option_name) @_option
@@ -23,4 +24,5 @@
"patchexpr" "pex"
"charconvert" "ccv"))
-; (comment) @comment
+(comment) @comment
+(line_continuation_comment) @comment