diff options
| author | Riley Bruins <ribru17@hotmail.com> | 2024-11-03 21:13:52 -0800 |
|---|---|---|
| committer | Christian Clason <ch.clason+github@icloud.com> | 2024-11-06 09:24:39 +0100 |
| commit | 0d3426a2e88709175f545b4caf74eb2c54bee79a (patch) | |
| tree | 95f5063066be856673a34d89357d38a7777155dd /tests/indent | |
| parent | bot(readme): update (diff) | |
| download | nvim-treesitter-0d3426a2e88709175f545b4caf74eb2c54bee79a.tar nvim-treesitter-0d3426a2e88709175f545b4caf74eb2c54bee79a.tar.gz nvim-treesitter-0d3426a2e88709175f545b4caf74eb2c54bee79a.tar.bz2 nvim-treesitter-0d3426a2e88709175f545b4caf74eb2c54bee79a.tar.lz nvim-treesitter-0d3426a2e88709175f545b4caf74eb2c54bee79a.tar.xz nvim-treesitter-0d3426a2e88709175f545b4caf74eb2c54bee79a.tar.zst nvim-treesitter-0d3426a2e88709175f545b4caf74eb2c54bee79a.zip | |
fix(wgsl): indent first parameter of function definition
Diffstat (limited to 'tests/indent')
| -rw-r--r-- | tests/indent/wgsl/basic.wgsl | 17 | ||||
| -rw-r--r-- | tests/indent/wgsl_spec.lua | 7 |
2 files changed, 23 insertions, 1 deletions
diff --git a/tests/indent/wgsl/basic.wgsl b/tests/indent/wgsl/basic.wgsl index 7dd50f87e..ccf29a360 100644 --- a/tests/indent/wgsl/basic.wgsl +++ b/tests/indent/wgsl/basic.wgsl @@ -41,3 +41,20 @@ fn vertex(vertex: Vertex, out.b = 2; return out; } + +fn foo( + a: u32, + b: u32, +) { + return a; +} + +fn bar( +) {} + +fn baz( + a: u32, +) {} + +fn qux( +) diff --git a/tests/indent/wgsl_spec.lua b/tests/indent/wgsl_spec.lua index 55d59acbd..e70215a7b 100644 --- a/tests/indent/wgsl_spec.lua +++ b/tests/indent/wgsl_spec.lua @@ -15,5 +15,10 @@ describe("indent WGSL:", function() }) end) - describe("new line:", function() end) + describe("new line:", function() + run:new_line("basic.wgsl", { on_line = 47, text = "c: u32,", indent = 2 }) + run:new_line("basic.wgsl", { on_line = 52, text = "c: u32,", indent = 2 }) + run:new_line("basic.wgsl", { on_line = 56, text = "c: u32,", indent = 2 }) + run:new_line("basic.wgsl", { on_line = 59, text = "c: u32,", indent = 2 }) + end) end) |
