mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-19 03:40:04 -04:00
refactor(capnp, thrift): improve grammar & queries to stable for the foreseeable future
This commit is contained in:
parent
6fcb2e6a9a
commit
f826b7af13
5 changed files with 26 additions and 11 deletions
|
|
@ -183,7 +183,7 @@ We are looking for maintainers to add more parsers and to write query files for
|
||||||
- [x] [blueprint](https://gitlab.com/gabmus/tree-sitter-blueprint.git) (experimental, maintained by @gabmus)
|
- [x] [blueprint](https://gitlab.com/gabmus/tree-sitter-blueprint.git) (experimental, maintained by @gabmus)
|
||||||
- [x] [c](https://github.com/tree-sitter/tree-sitter-c) (maintained by @vigoux)
|
- [x] [c](https://github.com/tree-sitter/tree-sitter-c) (maintained by @vigoux)
|
||||||
- [x] [c_sharp](https://github.com/tree-sitter/tree-sitter-c-sharp) (maintained by @Luxed)
|
- [x] [c_sharp](https://github.com/tree-sitter/tree-sitter-c-sharp) (maintained by @Luxed)
|
||||||
- [x] [capnp](https://github.com/amaanq/tree-sitter-capnp) (experimental, maintained by @amaanq)
|
- [x] [capnp](https://github.com/amaanq/tree-sitter-capnp) (maintained by @amaanq)
|
||||||
- [x] [clojure](https://github.com/sogaiu/tree-sitter-clojure) (maintained by @sogaiu)
|
- [x] [clojure](https://github.com/sogaiu/tree-sitter-clojure) (maintained by @sogaiu)
|
||||||
- [x] [cmake](https://github.com/uyha/tree-sitter-cmake) (maintained by @uyha)
|
- [x] [cmake](https://github.com/uyha/tree-sitter-cmake) (maintained by @uyha)
|
||||||
- [x] [comment](https://github.com/stsewd/tree-sitter-comment) (maintained by @stsewd)
|
- [x] [comment](https://github.com/stsewd/tree-sitter-comment) (maintained by @stsewd)
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@
|
||||||
"revision": "7175a6dd5fc1cee660dce6fe23f6043d75af424a"
|
"revision": "7175a6dd5fc1cee660dce6fe23f6043d75af424a"
|
||||||
},
|
},
|
||||||
"capnp": {
|
"capnp": {
|
||||||
"revision": "fda654c12f29ec70309d9573bc0af16b7124384e"
|
"revision": "8e6b8561170c4767720857e3f1dec019f49c6084"
|
||||||
},
|
},
|
||||||
"c_sharp": {
|
"c_sharp": {
|
||||||
"revision": "a29bac0681802139710b4d3875540901504d15cb"
|
"revision": "a29bac0681802139710b4d3875540901504d15cb"
|
||||||
|
|
@ -393,7 +393,7 @@
|
||||||
"revision": "0ff887f2a60a147452d52db060de6b42f42f1441"
|
"revision": "0ff887f2a60a147452d52db060de6b42f42f1441"
|
||||||
},
|
},
|
||||||
"thrift": {
|
"thrift": {
|
||||||
"revision": "b05fca8fa29b9ecaae0cd153ba590e4b7f840819"
|
"revision": "ea322237061db4ebb879e2d53e39dab0a2f73ff2"
|
||||||
},
|
},
|
||||||
"tiger": {
|
"tiger": {
|
||||||
"revision": "a233ebe360a73a92c50978e5c4e9e471bc59ff42"
|
"revision": "a233ebe360a73a92c50978e5c4e9e471bc59ff42"
|
||||||
|
|
|
||||||
|
|
@ -1202,7 +1202,6 @@ list.capnp = {
|
||||||
files = { "src/parser.c" },
|
files = { "src/parser.c" },
|
||||||
},
|
},
|
||||||
maintainers = { "@amaanq" },
|
maintainers = { "@amaanq" },
|
||||||
experimental = true,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
list.wgsl = {
|
list.wgsl = {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
; Preproc (?)
|
; Preproc (?)
|
||||||
|
|
||||||
(unique_id) @preproc
|
(unique_id) @preproc
|
||||||
|
(lang_attrs) @preproc
|
||||||
|
|
||||||
; Includes
|
; Includes
|
||||||
|
|
||||||
|
|
@ -21,10 +22,9 @@
|
||||||
"enum"
|
"enum"
|
||||||
"group"
|
"group"
|
||||||
"interface"
|
"interface"
|
||||||
"List"
|
|
||||||
"struct"
|
"struct"
|
||||||
"union"
|
"union"
|
||||||
] @type.builtin
|
] @keyword
|
||||||
|
|
||||||
; Typedefs
|
; Typedefs
|
||||||
|
|
||||||
|
|
@ -36,12 +36,17 @@
|
||||||
|
|
||||||
; Methods
|
; Methods
|
||||||
|
|
||||||
|
(annotation_definition_identifier) @method
|
||||||
(method_identifier) @method
|
(method_identifier) @method
|
||||||
|
|
||||||
; Fields
|
; Fields
|
||||||
|
|
||||||
(field_identifier) @field
|
(field_identifier) @field
|
||||||
|
|
||||||
|
; Properties
|
||||||
|
|
||||||
|
(property) @property
|
||||||
|
|
||||||
; Parameters
|
; Parameters
|
||||||
|
|
||||||
(param_identifier) @parameter
|
(param_identifier) @parameter
|
||||||
|
|
@ -54,6 +59,7 @@
|
||||||
; Constants
|
; Constants
|
||||||
|
|
||||||
(const_identifier) @constant
|
(const_identifier) @constant
|
||||||
|
(local_const) @constant
|
||||||
(enum_member) @constant
|
(enum_member) @constant
|
||||||
|
|
||||||
; Types
|
; Types
|
||||||
|
|
@ -66,8 +72,8 @@
|
||||||
|
|
||||||
; Attributes
|
; Attributes
|
||||||
|
|
||||||
(attribute) @attribute
|
|
||||||
(annotation_identifier) @attribute
|
(annotation_identifier) @attribute
|
||||||
|
(attribute) @attribute
|
||||||
|
|
||||||
; Operators
|
; Operators
|
||||||
|
|
||||||
|
|
@ -82,11 +88,14 @@
|
||||||
"extends"
|
"extends"
|
||||||
"namespace"
|
"namespace"
|
||||||
"using"
|
"using"
|
||||||
|
(void)
|
||||||
|
(annotation_target)
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
; Literals
|
; Literals
|
||||||
|
|
||||||
(string_literal) @string
|
(string_literal) @string
|
||||||
|
(block_text) @string
|
||||||
|
|
||||||
(data_string) @string.special
|
(data_string) @string.special
|
||||||
(namespace) @string.special
|
(namespace) @string.special
|
||||||
|
|
@ -105,6 +114,7 @@
|
||||||
|
|
||||||
[
|
[
|
||||||
"*"
|
"*"
|
||||||
|
"$"
|
||||||
] @punctuation.special
|
] @punctuation.special
|
||||||
|
|
||||||
["{" "}"] @punctuation.bracket
|
["{" "}"] @punctuation.bracket
|
||||||
|
|
@ -119,6 +129,8 @@
|
||||||
"->"
|
"->"
|
||||||
] @punctuation.delimiter
|
] @punctuation.delimiter
|
||||||
|
|
||||||
|
(data_hex) @symbol
|
||||||
|
|
||||||
; Comments
|
; Comments
|
||||||
|
|
||||||
(comment) @comment @spell
|
(comment) @comment @spell
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
; Namespace
|
; Namespace
|
||||||
|
|
||||||
(namespace) @namespace
|
(namespace_definition) @namespace
|
||||||
|
|
||||||
; Includes
|
; Includes
|
||||||
|
|
||||||
|
|
@ -47,14 +47,17 @@
|
||||||
; Types
|
; Types
|
||||||
|
|
||||||
(enum_identifier) @type
|
(enum_identifier) @type
|
||||||
|
(definition_type) @type
|
||||||
(exception_identifier) @type
|
(exception_identifier) @type
|
||||||
(exception_param_type) @type
|
(exception_param_type) @type
|
||||||
(field_type) @type
|
(field_type) @type
|
||||||
|
(param_type) @type
|
||||||
(type_identifier) @type
|
(type_identifier) @type
|
||||||
|
|
||||||
; Attributes
|
; Attributes
|
||||||
|
|
||||||
(annotation_identifier) @attribute
|
(annotation_identifier) @attribute
|
||||||
|
(uri_def) @attribute
|
||||||
|
|
||||||
; Operators
|
; Operators
|
||||||
|
|
||||||
|
|
@ -62,7 +65,6 @@
|
||||||
"="
|
"="
|
||||||
"+"
|
"+"
|
||||||
"-"
|
"-"
|
||||||
"&"
|
|
||||||
] @operator
|
] @operator
|
||||||
|
|
||||||
; Exceptions
|
; Exceptions
|
||||||
|
|
@ -113,12 +115,13 @@
|
||||||
"xsd_optional"
|
"xsd_optional"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
(namespace_scope) @namespace
|
|
||||||
|
|
||||||
; Literals
|
; Literals
|
||||||
|
|
||||||
(string_literal) @string
|
(string_literal) @string
|
||||||
|
|
||||||
|
(uri) @string.special
|
||||||
|
|
||||||
(number) @number
|
(number) @number
|
||||||
|
|
||||||
(double) @float
|
(double) @float
|
||||||
|
|
@ -127,7 +130,7 @@
|
||||||
|
|
||||||
; Typedefs
|
; Typedefs
|
||||||
(typedef_definition) @type.definition
|
(typedef_definition) @type.definition
|
||||||
(namespace_definition) @type.definition
|
(namespace_scope) @type.definition
|
||||||
|
|
||||||
; Misc
|
; Misc
|
||||||
|
|
||||||
|
|
@ -137,6 +140,7 @@
|
||||||
|
|
||||||
[
|
[
|
||||||
"*"
|
"*"
|
||||||
|
"&"
|
||||||
] @punctuation.special
|
] @punctuation.special
|
||||||
|
|
||||||
(field_modifier) @attribute
|
(field_modifier) @attribute
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue