mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-10 15:30:01 -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
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