mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-15 09:50:04 -04:00
parsers: add tree-sitter-slang
This commit is contained in:
parent
b04f990f92
commit
10432e6b0f
8 changed files with 78 additions and 0 deletions
|
|
@ -360,6 +360,7 @@ We are looking for maintainers to add more parsers and to write query files for
|
||||||
- [x] [scfg](https://git.sr.ht/~rockorager/tree-sitter-scfg) (maintained by @WhyNotHugo)
|
- [x] [scfg](https://git.sr.ht/~rockorager/tree-sitter-scfg) (maintained by @WhyNotHugo)
|
||||||
- [ ] [scheme](https://github.com/6cdh/tree-sitter-scheme)
|
- [ ] [scheme](https://github.com/6cdh/tree-sitter-scheme)
|
||||||
- [x] [scss](https://github.com/serenadeai/tree-sitter-scss) (maintained by @elianiva)
|
- [x] [scss](https://github.com/serenadeai/tree-sitter-scss) (maintained by @elianiva)
|
||||||
|
- [x] [slang](https://github.com/theHamsta/tree-sitter-slang) (experimental, maintained by @theHamsta)
|
||||||
- [x] [slint](https://github.com/jrmoulton/tree-sitter-slint) (experimental, maintained by @jrmoulton)
|
- [x] [slint](https://github.com/jrmoulton/tree-sitter-slint) (experimental, maintained by @jrmoulton)
|
||||||
- [x] [smali](https://git.sr.ht/~yotam/tree-sitter-smali) (maintained by @amaanq)
|
- [x] [smali](https://git.sr.ht/~yotam/tree-sitter-smali) (maintained by @amaanq)
|
||||||
- [x] [smithy](https://github.com/indoorvivants/tree-sitter-smithy) (maintained by @amaanq, @keynmol)
|
- [x] [smithy](https://github.com/indoorvivants/tree-sitter-smithy) (maintained by @amaanq, @keynmol)
|
||||||
|
|
|
||||||
|
|
@ -560,6 +560,9 @@
|
||||||
"scss": {
|
"scss": {
|
||||||
"revision": "c478c6868648eff49eb04a4df90d703dc45b312a"
|
"revision": "c478c6868648eff49eb04a4df90d703dc45b312a"
|
||||||
},
|
},
|
||||||
|
"slang": {
|
||||||
|
"revision": "47415d3f9ed2b3df9b9fc5f5d0ee1a71be3c67e0"
|
||||||
|
},
|
||||||
"slint": {
|
"slint": {
|
||||||
"revision": "00c8a2d3645766f68c0d0460086c0a994e5b0d85"
|
"revision": "00c8a2d3645766f68c0d0460086c0a994e5b0d85"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1649,6 +1649,17 @@ list.scss = {
|
||||||
maintainers = { "@elianiva" },
|
maintainers = { "@elianiva" },
|
||||||
}
|
}
|
||||||
|
|
||||||
|
list.slang = {
|
||||||
|
install_info = {
|
||||||
|
url = "https://github.com/theHamsta/tree-sitter-slang",
|
||||||
|
files = { "src/parser.c", "src/scanner.c" },
|
||||||
|
generate_requires_npm = true,
|
||||||
|
},
|
||||||
|
filetype = "shaderslang",
|
||||||
|
maintainers = { "@theHamsta" },
|
||||||
|
experimental = true,
|
||||||
|
}
|
||||||
|
|
||||||
list.slint = {
|
list.slint = {
|
||||||
install_info = {
|
install_info = {
|
||||||
url = "https://github.com/jrmoulton/tree-sitter-slint",
|
url = "https://github.com/jrmoulton/tree-sitter-slint",
|
||||||
|
|
|
||||||
9
queries/slang/folds.scm
Normal file
9
queries/slang/folds.scm
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
; inherits: hlsl
|
||||||
|
|
||||||
|
[
|
||||||
|
(interface_specifier)
|
||||||
|
(extension_specifier)
|
||||||
|
(property_declaration)
|
||||||
|
(subscript_declaration)
|
||||||
|
(init_declaration)
|
||||||
|
] @fold
|
||||||
42
queries/slang/highlights.scm
Normal file
42
queries/slang/highlights.scm
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
; inherits: hlsl
|
||||||
|
|
||||||
|
[
|
||||||
|
"var"
|
||||||
|
"let"
|
||||||
|
"This"
|
||||||
|
] @type.builtin
|
||||||
|
|
||||||
|
[
|
||||||
|
"interface"
|
||||||
|
"extension"
|
||||||
|
"property"
|
||||||
|
] @keyword
|
||||||
|
|
||||||
|
[
|
||||||
|
"__init"
|
||||||
|
] @constructor
|
||||||
|
|
||||||
|
[
|
||||||
|
"__subscript"
|
||||||
|
"get"
|
||||||
|
"set"
|
||||||
|
] @function.builtin
|
||||||
|
|
||||||
|
(interface_requirements (identifier) @type)
|
||||||
|
|
||||||
|
(binary_expression
|
||||||
|
["is" "as"]
|
||||||
|
right: (identifier) @type)
|
||||||
|
|
||||||
|
[
|
||||||
|
"as"
|
||||||
|
"is"
|
||||||
|
] @keyword.operator
|
||||||
|
|
||||||
|
[
|
||||||
|
"__exported"
|
||||||
|
"import"
|
||||||
|
] @include
|
||||||
|
|
||||||
|
(property_declaration
|
||||||
|
(identifier) @property)
|
||||||
6
queries/slang/indents.scm
Normal file
6
queries/slang/indents.scm
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
; inherits: hlsl
|
||||||
|
|
||||||
|
[
|
||||||
|
(interface_specifier)
|
||||||
|
(extension_specifier)
|
||||||
|
] @indent.begin
|
||||||
5
queries/slang/injections.scm
Normal file
5
queries/slang/injections.scm
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
((preproc_arg) @injection.content
|
||||||
|
(#set! injection.language "slang"))
|
||||||
|
|
||||||
|
((comment) @injection.content
|
||||||
|
(#set! injection.language "comment"))
|
||||||
1
queries/slang/locals.scm
Normal file
1
queries/slang/locals.scm
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
; inherits: hlsl
|
||||||
Loading…
Add table
Add a link
Reference in a new issue