mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-16 10:20:11 -04:00
feat(bp): add support for Android Blueprint (#6626)
This commit is contained in:
parent
3e454836ce
commit
298a9dd4f8
8 changed files with 125 additions and 0 deletions
|
|
@ -189,6 +189,7 @@ We are looking for maintainers to add more parsers and to write query files for
|
||||||
- [x] [bicep](https://github.com/amaanq/tree-sitter-bicep) (maintained by @amaanq)
|
- [x] [bicep](https://github.com/amaanq/tree-sitter-bicep) (maintained by @amaanq)
|
||||||
- [x] [bitbake](https://github.com/amaanq/tree-sitter-bitbake) (maintained by @amaanq)
|
- [x] [bitbake](https://github.com/amaanq/tree-sitter-bitbake) (maintained by @amaanq)
|
||||||
- [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] [bp](https://github.com/ambroisie/tree-sitter-bp) (maintained by @ambroisie)
|
||||||
- [x] [c](https://github.com/tree-sitter/tree-sitter-c) (maintained by @amaanq)
|
- [x] [c](https://github.com/tree-sitter/tree-sitter-c) (maintained by @amaanq)
|
||||||
- [x] [c_sharp](https://github.com/tree-sitter/tree-sitter-c-sharp) (maintained by @amaanq)
|
- [x] [c_sharp](https://github.com/tree-sitter/tree-sitter-c-sharp) (maintained by @amaanq)
|
||||||
- [x] [cairo](https://github.com/amaanq/tree-sitter-cairo) (maintained by @amaanq)
|
- [x] [cairo](https://github.com/amaanq/tree-sitter-cairo) (maintained by @amaanq)
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,9 @@
|
||||||
"blueprint": {
|
"blueprint": {
|
||||||
"revision": "60ba73739c6083c693d86a1a7cf039c07eb4ed59"
|
"revision": "60ba73739c6083c693d86a1a7cf039c07eb4ed59"
|
||||||
},
|
},
|
||||||
|
"bp": {
|
||||||
|
"revision": "2326d709fb9cf73cf124fdbc803c267f851721a4"
|
||||||
|
},
|
||||||
"c": {
|
"c": {
|
||||||
"revision": "82fb86aa544843bd17a9f0f3dc16edf645a34349"
|
"revision": "82fb86aa544843bd17a9f0f3dc16edf645a34349"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -210,6 +210,14 @@ list.blueprint = {
|
||||||
experimental = true,
|
experimental = true,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
list.bp = {
|
||||||
|
install_info = {
|
||||||
|
url = "https://github.com/ambroisie/tree-sitter-bp",
|
||||||
|
files = { "src/parser.c" },
|
||||||
|
},
|
||||||
|
maintainers = { "@ambroisie" },
|
||||||
|
}
|
||||||
|
|
||||||
list.c = {
|
list.c = {
|
||||||
install_info = {
|
install_info = {
|
||||||
url = "https://github.com/tree-sitter/tree-sitter-c",
|
url = "https://github.com/tree-sitter/tree-sitter-c",
|
||||||
|
|
|
||||||
6
queries/bp/folds.scm
Normal file
6
queries/bp/folds.scm
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
[
|
||||||
|
(list_expression)
|
||||||
|
(map_expression)
|
||||||
|
(module)
|
||||||
|
(select_expression)
|
||||||
|
] @fold
|
||||||
55
queries/bp/highlights.scm
Normal file
55
queries/bp/highlights.scm
Normal file
|
|
@ -0,0 +1,55 @@
|
||||||
|
(comment) @comment @spell
|
||||||
|
|
||||||
|
(operator) @operator
|
||||||
|
|
||||||
|
(integer_literal
|
||||||
|
"-" @operator)
|
||||||
|
|
||||||
|
[
|
||||||
|
","
|
||||||
|
":"
|
||||||
|
] @punctuation.delimiter
|
||||||
|
|
||||||
|
[
|
||||||
|
"("
|
||||||
|
")"
|
||||||
|
"["
|
||||||
|
"]"
|
||||||
|
"{"
|
||||||
|
"}"
|
||||||
|
] @punctuation.bracket
|
||||||
|
|
||||||
|
(boolean_literal) @boolean
|
||||||
|
|
||||||
|
(integer_literal) @number
|
||||||
|
|
||||||
|
[
|
||||||
|
(raw_string_literal)
|
||||||
|
(interpreted_string_literal)
|
||||||
|
] @string
|
||||||
|
|
||||||
|
(escape_sequence) @string.escape
|
||||||
|
|
||||||
|
(identifier) @variable
|
||||||
|
|
||||||
|
(module
|
||||||
|
type: (identifier) @function.call)
|
||||||
|
|
||||||
|
(module
|
||||||
|
(property
|
||||||
|
field: (identifier) @variable.parameter))
|
||||||
|
|
||||||
|
[
|
||||||
|
(unset)
|
||||||
|
(default)
|
||||||
|
] @variable.builtin
|
||||||
|
|
||||||
|
(condition
|
||||||
|
name: (identifier) @function.builtin)
|
||||||
|
|
||||||
|
(map_expression
|
||||||
|
(property
|
||||||
|
field: (identifier) @property))
|
||||||
|
|
||||||
|
(select_expression
|
||||||
|
"select" @keyword.conditional)
|
||||||
38
queries/bp/indents.scm
Normal file
38
queries/bp/indents.scm
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
(list_expression) @indent.begin
|
||||||
|
|
||||||
|
(list_expression
|
||||||
|
"]" @indent.branch)
|
||||||
|
|
||||||
|
(map_expression) @indent.begin
|
||||||
|
|
||||||
|
(map_expression
|
||||||
|
"}" @indent.branch)
|
||||||
|
|
||||||
|
(select_expression) @indent.begin
|
||||||
|
|
||||||
|
(select_expression
|
||||||
|
")" @indent.branch)
|
||||||
|
|
||||||
|
(select_value) @indent.begin
|
||||||
|
|
||||||
|
(select_value
|
||||||
|
")" @indent.branch)
|
||||||
|
|
||||||
|
(select_pattern
|
||||||
|
"(" @indent.begin)
|
||||||
|
|
||||||
|
(select_pattern
|
||||||
|
")" @indent.branch)
|
||||||
|
|
||||||
|
(select_cases) @indent.begin
|
||||||
|
|
||||||
|
(select_cases
|
||||||
|
"}" @indent.branch)
|
||||||
|
|
||||||
|
(module) @indent.begin
|
||||||
|
|
||||||
|
(module
|
||||||
|
")" @indent.branch)
|
||||||
|
|
||||||
|
(module
|
||||||
|
"}" @indent.branch)
|
||||||
2
queries/bp/injections.scm
Normal file
2
queries/bp/injections.scm
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
((comment) @injection.content
|
||||||
|
(#set! injection.language "comment"))
|
||||||
12
queries/bp/locals.scm
Normal file
12
queries/bp/locals.scm
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
(module
|
||||||
|
(property
|
||||||
|
field: (identifier) @local.definition.parameter))
|
||||||
|
|
||||||
|
(map_expression
|
||||||
|
(property
|
||||||
|
field: (identifier) @local.definition.field))
|
||||||
|
|
||||||
|
(assignment
|
||||||
|
left: (identifier) @local.definition.var)
|
||||||
|
|
||||||
|
(identifier) @local.reference
|
||||||
Loading…
Add table
Add a link
Reference in a new issue