mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
parsers: add wgsl_bevy
This adds an extension of tree-sitter-wgsl that understands [Bevy's](https://bevyengine.org/) preprocessor directives.
This commit is contained in:
parent
29304e16bb
commit
817531ce6f
4 changed files with 46 additions and 0 deletions
|
|
@ -1183,6 +1183,15 @@ list.wgsl = {
|
|||
filetype = "wgsl",
|
||||
}
|
||||
|
||||
list.wgsl_bevy = {
|
||||
install_info = {
|
||||
url = "https://github.com/theHamsta/tree-sitter-wgsl-bevy",
|
||||
files = { "src/parser.c" },
|
||||
generate_requires_npm = true,
|
||||
},
|
||||
maintainers = { "@theHamsta" },
|
||||
}
|
||||
|
||||
list.m68k = {
|
||||
install_info = {
|
||||
url = "https://github.com/grahambates/tree-sitter-m68k",
|
||||
|
|
|
|||
5
queries/wgsl_bevy/folds.scm
Normal file
5
queries/wgsl_bevy/folds.scm
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
; inherits wgsl
|
||||
|
||||
[
|
||||
(preproc_ifdef)
|
||||
] @fold
|
||||
25
queries/wgsl_bevy/highlights.scm
Normal file
25
queries/wgsl_bevy/highlights.scm
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
; inherits wgsl
|
||||
|
||||
[
|
||||
"#import"
|
||||
"#define_import_path"
|
||||
] @include
|
||||
"::" @punctuation.delimiter
|
||||
|
||||
(import_path (identifier) @namespace (identifier))
|
||||
|
||||
(struct_declaration
|
||||
(preproc_ifdef (struct_member (variable_identifier_declaration (identifier) @field))))
|
||||
(struct_declaration
|
||||
(preproc_ifdef
|
||||
(preproc_else (struct_member (variable_identifier_declaration (identifier) @field)))))
|
||||
|
||||
(preproc_ifdef
|
||||
name: (identifier) @constant.macro)
|
||||
|
||||
[
|
||||
"#ifdef"
|
||||
"#ifndef"
|
||||
"#endif"
|
||||
"#else"
|
||||
] @preproc
|
||||
7
queries/wgsl_bevy/indents.scm
Normal file
7
queries/wgsl_bevy/indents.scm
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
; inherits wgsl
|
||||
[
|
||||
"#ifdef"
|
||||
"#ifndef"
|
||||
"#else"
|
||||
"#endif"
|
||||
] @zero_indent
|
||||
Loading…
Add table
Add a link
Reference in a new issue