mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-18 19:30:02 -04:00
feat(capnp): improve queries
This commit is contained in:
parent
ba35d094c1
commit
454876fc6d
5 changed files with 150 additions and 21 deletions
|
|
@ -1,4 +1,4 @@
|
|||
; Preproc (?)
|
||||
; Preproc
|
||||
|
||||
(unique_id) @preproc
|
||||
(top_level_annotation_body) @preproc
|
||||
|
|
@ -13,18 +13,12 @@
|
|||
|
||||
(import_path) @string
|
||||
|
||||
; Types
|
||||
|
||||
(primitive_type) @type.builtin
|
||||
; Builtins
|
||||
|
||||
[
|
||||
"annotation"
|
||||
"enum"
|
||||
"group"
|
||||
"interface"
|
||||
"struct"
|
||||
"union"
|
||||
] @keyword
|
||||
(primitive_type)
|
||||
"List"
|
||||
] @type.builtin
|
||||
|
||||
; Typedefs
|
||||
|
||||
|
|
@ -52,10 +46,6 @@
|
|||
(param_identifier) @parameter
|
||||
(return_identifier) @parameter
|
||||
|
||||
; Variables
|
||||
|
||||
(identifier) @variable
|
||||
|
||||
; Constants
|
||||
|
||||
(const_identifier) @constant
|
||||
|
|
@ -68,8 +58,6 @@
|
|||
|
||||
(enum_identifier) @type
|
||||
(extend_type) @type
|
||||
(field_type) @type
|
||||
(generic_identifier) @type
|
||||
(type_identifier) @type
|
||||
|
||||
; Attributes
|
||||
|
|
@ -86,6 +74,16 @@
|
|||
|
||||
; Keywords
|
||||
|
||||
|
||||
[
|
||||
"annotation"
|
||||
"enum"
|
||||
"group"
|
||||
"interface"
|
||||
"struct"
|
||||
"union"
|
||||
] @keyword
|
||||
|
||||
[
|
||||
"extends"
|
||||
"namespace"
|
||||
|
|
@ -95,11 +93,16 @@
|
|||
|
||||
; Literals
|
||||
|
||||
(string_literal) @string
|
||||
(block_text) @string
|
||||
[
|
||||
(string)
|
||||
(concatenated_string)
|
||||
(block_text)
|
||||
(namespace)
|
||||
] @string
|
||||
|
||||
(escape_sequence) @string.escape
|
||||
|
||||
(data_string) @string.special
|
||||
(namespace) @string.special
|
||||
|
||||
(number) @number
|
||||
|
||||
|
|
@ -116,6 +119,7 @@
|
|||
[
|
||||
"*"
|
||||
"$"
|
||||
":"
|
||||
] @punctuation.special
|
||||
|
||||
["{" "}"] @punctuation.bracket
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue