aboutsummaryrefslogtreecommitdiffstats
path: root/queries/wgsl
diff options
context:
space:
mode:
authorStephan Seitz <stephan.seitz@fau.de>2022-08-31 00:23:49 +0200
committerStephan Seitz <stephan.seitz@fau.de>2022-09-28 19:25:07 -0400
commit27cba73df9ddca00c066c7ebb514576a99bb8b2c (patch)
treec31fbbaf9026300942c2b1a47d54040d2be977cb /queries/wgsl
parenthaskell/highlights: Match `pattern` as a keyword (diff)
downloadnvim-treesitter-27cba73df9ddca00c066c7ebb514576a99bb8b2c.tar
nvim-treesitter-27cba73df9ddca00c066c7ebb514576a99bb8b2c.tar.gz
nvim-treesitter-27cba73df9ddca00c066c7ebb514576a99bb8b2c.tar.bz2
nvim-treesitter-27cba73df9ddca00c066c7ebb514576a99bb8b2c.tar.lz
nvim-treesitter-27cba73df9ddca00c066c7ebb514576a99bb8b2c.tar.xz
nvim-treesitter-27cba73df9ddca00c066c7ebb514576a99bb8b2c.tar.zst
nvim-treesitter-27cba73df9ddca00c066c7ebb514576a99bb8b2c.zip
indents(wgsl): add indents.scm
Diffstat (limited to 'queries/wgsl')
-rw-r--r--queries/wgsl/indents.scm19
1 files changed, 19 insertions, 0 deletions
diff --git a/queries/wgsl/indents.scm b/queries/wgsl/indents.scm
new file mode 100644
index 000000000..69e543ad3
--- /dev/null
+++ b/queries/wgsl/indents.scm
@@ -0,0 +1,19 @@
+[
+ (parameter_list)
+ (compound_statement)
+ (loop_statement)
+ (struct_declaration)
+] @indent
+
+(compound_statement "}" @indent_end)
+(loop_statement "}" @indent_end)
+(function_declaration ")" @indent_end)
+(struct_declaration "}" @indent_end)
+
+[
+ "else"
+ ")"
+ "}"
+] @branch
+
+(comment) @auto