mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-18 03:10:04 -04:00
feat: add fidl parser
This commit is contained in:
parent
19bf991be2
commit
a8d2b54e28
5 changed files with 84 additions and 0 deletions
|
|
@ -164,6 +164,9 @@
|
||||||
"fennel": {
|
"fennel": {
|
||||||
"revision": "9265a7d635d2f82a10738b9ad65ba8dd8bd4a84a"
|
"revision": "9265a7d635d2f82a10738b9ad65ba8dd8bd4a84a"
|
||||||
},
|
},
|
||||||
|
"fidl": {
|
||||||
|
"revision": "0e1180bb126f280711a62f2a21e3609923fd8b0c"
|
||||||
|
},
|
||||||
"firrtl": {
|
"firrtl": {
|
||||||
"revision": "2b5adae629c8cba528c7b1e4aa67a8ae28934ea5"
|
"revision": "2b5adae629c8cba528c7b1e4aa67a8ae28934ea5"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -535,6 +535,15 @@ list.fennel = {
|
||||||
maintainers = { "@alexmozaidze" },
|
maintainers = { "@alexmozaidze" },
|
||||||
}
|
}
|
||||||
|
|
||||||
|
list.fidl = {
|
||||||
|
install_info = {
|
||||||
|
url = "https://github.com/google/tree-sitter-fidl",
|
||||||
|
files = { "src/parser.c" },
|
||||||
|
requires_generate_from_grammar = true,
|
||||||
|
},
|
||||||
|
maintainers = { "@chaopeng" },
|
||||||
|
}
|
||||||
|
|
||||||
list.firrtl = {
|
list.firrtl = {
|
||||||
install_info = {
|
install_info = {
|
||||||
url = "https://github.com/amaanq/tree-sitter-firrtl",
|
url = "https://github.com/amaanq/tree-sitter-firrtl",
|
||||||
|
|
|
||||||
6
queries/fidl/folds.scm
Normal file
6
queries/fidl/folds.scm
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
[
|
||||||
|
(layout_declaration)
|
||||||
|
(protocol_declaration)
|
||||||
|
(resource_declaration)
|
||||||
|
(service_declaration)
|
||||||
|
] @fold
|
||||||
64
queries/fidl/highlights.scm
Normal file
64
queries/fidl/highlights.scm
Normal file
|
|
@ -0,0 +1,64 @@
|
||||||
|
[
|
||||||
|
"ajar"
|
||||||
|
"alias"
|
||||||
|
"as"
|
||||||
|
"bits"
|
||||||
|
"closed"
|
||||||
|
"compose"
|
||||||
|
"const"
|
||||||
|
"enum"
|
||||||
|
"error"
|
||||||
|
"flexible"
|
||||||
|
"library"
|
||||||
|
"open"
|
||||||
|
; "optional" we did not specify a node for optional yet
|
||||||
|
"overlay"
|
||||||
|
"protocol"
|
||||||
|
"reserved"
|
||||||
|
"resource"
|
||||||
|
"service"
|
||||||
|
"strict"
|
||||||
|
"struct"
|
||||||
|
"table"
|
||||||
|
"type"
|
||||||
|
"union"
|
||||||
|
"using"
|
||||||
|
] @keyword
|
||||||
|
|
||||||
|
(primitives_type) @type.builtin
|
||||||
|
|
||||||
|
(builtin_complex_type) @type.builtin
|
||||||
|
|
||||||
|
(const_declaration
|
||||||
|
(identifier) @constant)
|
||||||
|
|
||||||
|
[
|
||||||
|
"="
|
||||||
|
"|"
|
||||||
|
"&"
|
||||||
|
"->"
|
||||||
|
] @operator
|
||||||
|
|
||||||
|
(attribute
|
||||||
|
"@" @attribute
|
||||||
|
(identifier) @attribute)
|
||||||
|
|
||||||
|
(string_literal) @string
|
||||||
|
|
||||||
|
(numeric_literal) @number
|
||||||
|
|
||||||
|
[
|
||||||
|
(true)
|
||||||
|
(false)
|
||||||
|
] @boolean
|
||||||
|
|
||||||
|
(comment) @comment
|
||||||
|
|
||||||
|
[
|
||||||
|
"("
|
||||||
|
")"
|
||||||
|
"<"
|
||||||
|
">"
|
||||||
|
"{"
|
||||||
|
"}"
|
||||||
|
] @punctuation.bracket
|
||||||
2
queries/fidl/injections.scm
Normal file
2
queries/fidl/injections.scm
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
((comment) @injection.content
|
||||||
|
(#set! injection.language "comment"))
|
||||||
Loading…
Add table
Add a link
Reference in a new issue