mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-02 19:46:58 -04:00
feat: add capnp (#4203)
This commit is contained in:
parent
1913ce2fd2
commit
6cf93175bf
4 changed files with 137 additions and 0 deletions
|
|
@ -182,6 +182,7 @@ We are looking for maintainers to add more parsers and to write query files for
|
|||
- [x] [bibtex](https://github.com/latex-lsp/tree-sitter-bibtex) (maintained by @theHamsta, @clason)
|
||||
- [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] [capnp](https://github.com/amaanq/tree-sitter-capnp) (experimental, maintained by @amaanq)
|
||||
- [x] [c_sharp](https://github.com/tree-sitter/tree-sitter-c-sharp) (maintained by @Luxed)
|
||||
- [x] [clojure](https://github.com/sogaiu/tree-sitter-clojure) (maintained by @sogaiu)
|
||||
- [x] [cmake](https://github.com/uyha/tree-sitter-cmake) (maintained by @uyha)
|
||||
|
|
|
|||
|
|
@ -29,6 +29,9 @@
|
|||
"c": {
|
||||
"revision": "7175a6dd5fc1cee660dce6fe23f6043d75af424a"
|
||||
},
|
||||
"capnp": {
|
||||
"revision": "fda654c12f29ec70309d9573bc0af16b7124384e"
|
||||
},
|
||||
"c_sharp": {
|
||||
"revision": "a29bac0681802139710b4d3875540901504d15cb"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1195,6 +1195,15 @@ list.astro = {
|
|||
maintainers = { "@virchau13" },
|
||||
}
|
||||
|
||||
list.capnp = {
|
||||
install_info = {
|
||||
url = "https://github.com/amaanq/tree-sitter-capnp",
|
||||
files = { "src/parser.c" },
|
||||
},
|
||||
maintainers = { "@amaanq" },
|
||||
experimental = true,
|
||||
}
|
||||
|
||||
list.wgsl = {
|
||||
install_info = {
|
||||
url = "https://github.com/szebniok/tree-sitter-wgsl",
|
||||
|
|
|
|||
124
queries/capnp/highlights.scm
Normal file
124
queries/capnp/highlights.scm
Normal file
|
|
@ -0,0 +1,124 @@
|
|||
; Preproc (?)
|
||||
|
||||
(unique_id) @preproc
|
||||
|
||||
; Includes
|
||||
|
||||
[
|
||||
"import"
|
||||
"$import"
|
||||
"embed"
|
||||
] @include
|
||||
|
||||
(import_path) @string
|
||||
|
||||
; Types
|
||||
|
||||
(primitive_type) @type.builtin
|
||||
|
||||
[
|
||||
"annotation"
|
||||
"enum"
|
||||
"group"
|
||||
"interface"
|
||||
"List"
|
||||
"struct"
|
||||
"union"
|
||||
] @type.builtin
|
||||
|
||||
; Typedefs
|
||||
|
||||
(type_definition) @type.definition
|
||||
|
||||
; Labels (@number, @number!)
|
||||
|
||||
(field_version) @label
|
||||
|
||||
; Methods
|
||||
|
||||
(method_identifier) @method
|
||||
|
||||
; Fields
|
||||
|
||||
(field_identifier) @field
|
||||
|
||||
; Parameters
|
||||
|
||||
(param_identifier) @parameter
|
||||
(return_identifier) @parameter
|
||||
|
||||
; Variables
|
||||
|
||||
(identifier) @variable
|
||||
|
||||
; Constants
|
||||
|
||||
(const_identifier) @constant
|
||||
(enum_member) @constant
|
||||
|
||||
; Types
|
||||
|
||||
(enum_identifier) @type
|
||||
(extend_type) @type
|
||||
(field_type) @type
|
||||
(generic_identifier) @type
|
||||
(type_identifier) @type
|
||||
|
||||
; Attributes
|
||||
|
||||
(attribute) @attribute
|
||||
(annotation_identifier) @attribute
|
||||
|
||||
; Operators
|
||||
|
||||
[
|
||||
; @ ! -
|
||||
"="
|
||||
] @operator
|
||||
|
||||
; Keywords
|
||||
|
||||
[
|
||||
"extends"
|
||||
"namespace"
|
||||
"using"
|
||||
] @keyword
|
||||
|
||||
; Literals
|
||||
|
||||
(string_literal) @string
|
||||
|
||||
(data_string) @string.special
|
||||
(namespace) @string.special
|
||||
|
||||
(number) @number
|
||||
|
||||
(float) @float
|
||||
|
||||
(boolean) @boolean
|
||||
|
||||
; Misc
|
||||
|
||||
[
|
||||
"const"
|
||||
] @type.qualifier
|
||||
|
||||
[
|
||||
"*"
|
||||
] @punctuation.special
|
||||
|
||||
["{" "}"] @punctuation.bracket
|
||||
|
||||
["(" ")"] @punctuation.bracket
|
||||
|
||||
["[" "]"] @punctuation.bracket
|
||||
|
||||
[
|
||||
","
|
||||
";"
|
||||
"->"
|
||||
] @punctuation.delimiter
|
||||
|
||||
; Comments
|
||||
|
||||
(comment) @comment @spell
|
||||
Loading…
Add table
Add a link
Reference in a new issue