mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-14 09:20:04 -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"
|
"test-version-set"
|
||||||
] @preproc)
|
] @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
|
; Functions/Methods
|
||||||
|
|
||||||
(function_definition
|
(function_definition
|
||||||
|
|
@ -31,39 +89,11 @@
|
||||||
|
|
||||||
(parameter) @parameter
|
(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
|
; Types
|
||||||
|
|
||||||
(type_identifier) @type
|
(type_identifier) @type
|
||||||
|
|
||||||
(primitive_type) @type.builtin
|
(primitive_type) @type.builtin
|
||||||
(unit_type) @type.builtin
|
|
||||||
|
|
||||||
; Operators
|
; Operators
|
||||||
|
|
||||||
|
|
@ -112,55 +142,6 @@
|
||||||
"~"
|
"~"
|
||||||
] @operator
|
] @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
|
; Literals
|
||||||
|
|
||||||
[
|
[
|
||||||
|
|
@ -179,7 +160,7 @@
|
||||||
|
|
||||||
["{" "}"] @punctuation.bracket
|
["{" "}"] @punctuation.bracket
|
||||||
|
|
||||||
["(" ")"] @punctuation.bracket
|
["(" ")" "()"] @punctuation.bracket
|
||||||
|
|
||||||
["[" "]"] @punctuation.bracket
|
["[" "]"] @punctuation.bracket
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue