mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-21 12:50:09 -04:00
Update highlights and c3 to v0.8.0
This commit is contained in:
parent
2afba4543d
commit
ff18a3038f
2 changed files with 41 additions and 27 deletions
|
|
@ -166,7 +166,7 @@ return {
|
|||
},
|
||||
c3 = {
|
||||
install_info = {
|
||||
revision = '02d80569f0b713c8059e00e1719658950493cd35',
|
||||
revision = 'dce56ccc5d2731ac14a0f6bb3fd1666d994b2a25',
|
||||
url = 'https://github.com/c3lang/tree-sitter-c3',
|
||||
},
|
||||
maintainers = { '@cbuttner' },
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
[
|
||||
(ident)
|
||||
(ct_ident)
|
||||
(hash_ident)
|
||||
] @variable
|
||||
|
||||
; 1) Member
|
||||
|
|
@ -49,25 +50,31 @@
|
|||
(ident) @variable.member)
|
||||
|
||||
(initializer_list
|
||||
(arg
|
||||
(initializer_element
|
||||
(param_path
|
||||
(param_path_element
|
||||
(ident) @variable.member))))
|
||||
(access_ident
|
||||
(ident) @variable.member)))))
|
||||
|
||||
; 2) Parameter
|
||||
(param
|
||||
name: (_) @variable.parameter)
|
||||
|
||||
(trailing_block_param
|
||||
(at_ident) @variable.parameter)
|
||||
|
||||
(call_arg_list
|
||||
(call_arg
|
||||
name: (_) @variable.parameter))
|
||||
|
||||
(enum_param_declaration
|
||||
(enum_param
|
||||
(ident) @variable.parameter)
|
||||
|
||||
; Keyword (from `c3c --list-keywords`)
|
||||
[
|
||||
"alias"
|
||||
"asm"
|
||||
"attrdef"
|
||||
"catch"
|
||||
"defer"
|
||||
"try"
|
||||
|
|
@ -128,8 +135,6 @@
|
|||
"module" @keyword
|
||||
|
||||
[
|
||||
"alias"
|
||||
"attrdef"
|
||||
"bitstruct"
|
||||
"enum"
|
||||
"faultdef"
|
||||
|
|
@ -253,8 +258,7 @@
|
|||
(escape_sequence) @string.escape
|
||||
|
||||
; Builtin (constants)
|
||||
((builtin) @constant.builtin
|
||||
(#match? @constant.builtin "_*[A-Z][_A-Z0-9]*"))
|
||||
(builtin_const) @constant.builtin
|
||||
|
||||
; Type Property (from `c3c --list-type-properties`)
|
||||
(type_access_expr
|
||||
|
|
@ -286,10 +290,9 @@
|
|||
|
||||
; Attribute
|
||||
(attribute
|
||||
name: (_) @attribute)
|
||||
name: (at_ident) @attribute)
|
||||
|
||||
(attrdef_declaration
|
||||
name: (_) @attribute)
|
||||
(at_type_ident) @attribute
|
||||
|
||||
(call_inline_attributes
|
||||
(at_ident) @attribute)
|
||||
|
|
@ -322,26 +325,19 @@
|
|||
|
||||
; Function Call
|
||||
(call_expr
|
||||
function: [
|
||||
(ident)
|
||||
(at_ident)
|
||||
] @function.call)
|
||||
|
||||
(call_expr
|
||||
function: (trailing_generic_expr
|
||||
argument: [
|
||||
function: (ident_expr
|
||||
[
|
||||
(ident)
|
||||
(at_ident)
|
||||
] @function.call))
|
||||
|
||||
(call_expr
|
||||
function: (module_ident_expr
|
||||
ident: (_) @function.call))
|
||||
|
||||
(call_expr
|
||||
function: (trailing_generic_expr
|
||||
argument: (module_ident_expr
|
||||
ident: (_) @function.call)))
|
||||
argument: (ident_expr
|
||||
[
|
||||
(ident)
|
||||
(at_ident)
|
||||
] @function.call)))
|
||||
|
||||
; Method call
|
||||
(call_expr
|
||||
|
|
@ -389,5 +385,23 @@
|
|||
(doc_comment_text) @spell
|
||||
|
||||
(doc_comment_contract
|
||||
name: (_) @markup.strong
|
||||
(#any-of? @markup.strong "@param" "@return" "@deprecated" "@require" "@ensure" "@pure"))
|
||||
name: (_) @attribute)
|
||||
|
||||
(doc_comment_contract
|
||||
parameter: [
|
||||
(ident)
|
||||
(ct_ident)
|
||||
(hash_ident)
|
||||
] @variable.parameter
|
||||
(#set! priority 110))
|
||||
|
||||
(doc_comment_contract
|
||||
[
|
||||
":"
|
||||
"?"
|
||||
] @comment.documentation
|
||||
(#set! priority 110))
|
||||
|
||||
(doc_comment_contract
|
||||
description: (_) @comment.documentation
|
||||
(#set! priority 110))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue