diff options
| author | Riley Bruins <ribru17@hotmail.com> | 2024-11-01 13:34:02 -0700 |
|---|---|---|
| committer | Christian Clason <ch.clason+github@icloud.com> | 2024-11-04 08:36:41 +0100 |
| commit | 8fadb18430df7025cad37f2b6b5138fe00eea545 (patch) | |
| tree | 59ac3e41f3723350fca380033794b866b7066ac9 /tests/indent/sway_spec.lua | |
| parent | fix(cooklang): apply correct filetype (diff) | |
| download | nvim-treesitter-8fadb18430df7025cad37f2b6b5138fe00eea545.tar nvim-treesitter-8fadb18430df7025cad37f2b6b5138fe00eea545.tar.gz nvim-treesitter-8fadb18430df7025cad37f2b6b5138fe00eea545.tar.bz2 nvim-treesitter-8fadb18430df7025cad37f2b6b5138fe00eea545.tar.lz nvim-treesitter-8fadb18430df7025cad37f2b6b5138fe00eea545.tar.xz nvim-treesitter-8fadb18430df7025cad37f2b6b5138fe00eea545.tar.zst nvim-treesitter-8fadb18430df7025cad37f2b6b5138fe00eea545.zip | |
feat: sway programming language
Diffstat (limited to 'tests/indent/sway_spec.lua')
| -rw-r--r-- | tests/indent/sway_spec.lua | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/indent/sway_spec.lua b/tests/indent/sway_spec.lua new file mode 100644 index 000000000..d37573ae9 --- /dev/null +++ b/tests/indent/sway_spec.lua @@ -0,0 +1,20 @@ +local Runner = require("tests.indent.common").Runner + +local run = Runner:new(it, "tests/indent/sway", { + tabstop = 4, + shiftwidth = 4, + softtabstop = 4, + expandtab = true, +}) + +describe("indent Sway:", function() + describe("whole file:", function() + run:whole_file(".", {}) + end) + describe("new line:", function() + run:new_line("main.sw", { on_line = 12, text = "const CONST: u32 = 2;", indent = 0 }) + run:new_line("main.sw", { on_line = 14, text = "let hi = 5;", indent = 4 }) + run:new_line("main.sw", { on_line = 15, text = "let hi = 5;", indent = 8 }) + run:new_line("main.sw", { on_line = 92, text = "let hi = 5;", indent = 12 }) + end) +end) |
