mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
feat(func): update highlights
This commit is contained in:
parent
dba8c8e781
commit
a67a4ab642
1 changed files with 60 additions and 79 deletions
|
|
@ -16,6 +16,64 @@
|
|||
"test-version-set"
|
||||
] @preproc)
|
||||
|
||||
; Keywords
|
||||
|
||||
[
|
||||
"asm"
|
||||
"impure"
|
||||
"inline"
|
||||
"inline_ref"
|
||||
"method_id"
|
||||
"type"
|
||||
] @keyword
|
||||
|
||||
[
|
||||
"return"
|
||||
] @keyword.return
|
||||
|
||||
; Conditionals
|
||||
|
||||
[
|
||||
"if"
|
||||
"ifnot"
|
||||
"else"
|
||||
"elseif"
|
||||
"elseifnot"
|
||||
"until"
|
||||
] @conditional
|
||||
|
||||
; Exceptions
|
||||
|
||||
[
|
||||
"try"
|
||||
"catch"
|
||||
] @exception
|
||||
|
||||
; Repeats
|
||||
|
||||
[
|
||||
"do"
|
||||
"forall"
|
||||
"repeat"
|
||||
"while"
|
||||
] @repeat
|
||||
|
||||
; Qualifiers
|
||||
[
|
||||
"const"
|
||||
"global"
|
||||
(var)
|
||||
] @type.qualifier
|
||||
|
||||
; Variables
|
||||
|
||||
(identifier) @variable
|
||||
|
||||
; Constants
|
||||
|
||||
(const_var_declarations
|
||||
name: (identifier) @constant)
|
||||
|
||||
; Functions/Methods
|
||||
|
||||
(function_definition
|
||||
|
|
@ -31,39 +89,11 @@
|
|||
|
||||
(parameter) @parameter
|
||||
|
||||
(function_application
|
||||
arguments: [(identifier) (underscore)] @parameter)
|
||||
(function_application
|
||||
arguments: (tensor_expression
|
||||
(identifier) @parameter))
|
||||
(function_application
|
||||
arguments: (parenthesized_expression
|
||||
(identifier) @parameter))
|
||||
|
||||
(method_call
|
||||
arguments: [(identifier) (underscore)] @parameter)
|
||||
(method_call
|
||||
arguments: (tensor_expression
|
||||
(identifier) @parameter))
|
||||
(method_call
|
||||
arguments: (parenthesized_expression
|
||||
(identifier) @parameter))
|
||||
|
||||
; Constants
|
||||
|
||||
(const_var_declarations
|
||||
name: (identifier) @constant)
|
||||
(unit_literal) @constant.builtin
|
||||
|
||||
; Variables
|
||||
|
||||
(identifier) @variable
|
||||
|
||||
; Types
|
||||
|
||||
(type_identifier) @type
|
||||
|
||||
(primitive_type) @type.builtin
|
||||
(unit_type) @type.builtin
|
||||
|
||||
; Operators
|
||||
|
||||
|
|
@ -112,55 +142,6 @@
|
|||
"~"
|
||||
] @operator
|
||||
|
||||
; Keywords
|
||||
|
||||
[
|
||||
"asm"
|
||||
"impure"
|
||||
"inline"
|
||||
"inline_ref"
|
||||
"method_id"
|
||||
"try"
|
||||
"type"
|
||||
] @keyword
|
||||
|
||||
[
|
||||
"return"
|
||||
] @keyword.return
|
||||
|
||||
; Conditionals
|
||||
|
||||
[
|
||||
"if"
|
||||
"ifnot"
|
||||
"else"
|
||||
"elseif"
|
||||
"elseifnot"
|
||||
"until"
|
||||
] @conditional
|
||||
|
||||
; Exceptions
|
||||
|
||||
[
|
||||
"catch"
|
||||
] @exception
|
||||
|
||||
; Repeats
|
||||
|
||||
[
|
||||
"do"
|
||||
"forall"
|
||||
"repeat"
|
||||
"while"
|
||||
] @repeat
|
||||
|
||||
; Qualifiers
|
||||
[
|
||||
"const"
|
||||
"global"
|
||||
(var)
|
||||
] @type.qualifier
|
||||
|
||||
; Literals
|
||||
|
||||
[
|
||||
|
|
@ -179,7 +160,7 @@
|
|||
|
||||
["{" "}"] @punctuation.bracket
|
||||
|
||||
["(" ")"] @punctuation.bracket
|
||||
["(" ")" "()"] @punctuation.bracket
|
||||
|
||||
["[" "]"] @punctuation.bracket
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue