aboutsummaryrefslogtreecommitdiffstats
path: root/queries/vim/highlights.scm
diff options
context:
space:
mode:
authorGitHub <noreply@github.com>2022-11-21 11:00:23 +0000
committerChristian Clason <christian.clason@uni-due.de>2022-11-21 12:09:24 +0100
commit4f885f2d07a4a0f49f0b56f8c052a6e2e09b4134 (patch)
treea8dd1e300450f278170f39d32333c28622779892 /queries/vim/highlights.scm
parentremoved switch from keywords (diff)
downloadnvim-treesitter-4f885f2d07a4a0f49f0b56f8c052a6e2e09b4134.tar
nvim-treesitter-4f885f2d07a4a0f49f0b56f8c052a6e2e09b4134.tar.gz
nvim-treesitter-4f885f2d07a4a0f49f0b56f8c052a6e2e09b4134.tar.bz2
nvim-treesitter-4f885f2d07a4a0f49f0b56f8c052a6e2e09b4134.tar.lz
nvim-treesitter-4f885f2d07a4a0f49f0b56f8c052a6e2e09b4134.tar.xz
nvim-treesitter-4f885f2d07a4a0f49f0b56f8c052a6e2e09b4134.tar.zst
nvim-treesitter-4f885f2d07a4a0f49f0b56f8c052a6e2e09b4134.zip
Update lockfile.json
Diffstat (limited to 'queries/vim/highlights.scm')
-rw-r--r--queries/vim/highlights.scm17
1 files changed, 15 insertions, 2 deletions
diff --git a/queries/vim/highlights.scm b/queries/vim/highlights.scm
index c3ce3dd94..239b0a0b3 100644
--- a/queries/vim/highlights.scm
+++ b/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)
@@ -104,6 +105,7 @@
"ex"
"visual"
"view"
+ "eval"
] @keyword
(map_statement cmd: _ @keyword)
(command_name) @function.macro
@@ -197,11 +199,14 @@
(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:")
@@ -237,12 +242,16 @@
"%="
".="
"..="
+ "<<"
+ "=<<"
+ (match_case)
] @operator
; Some characters have different meanings based on the context
(unary_operation "!" @operator)
(binary_operation "." @operator)
+
;; Punctuation
[
@@ -252,6 +261,7 @@
"}"
"["
"]"
+ "#{"
] @punctuation.bracket
(field_expression "." @punctuation.delimiter)
@@ -267,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)