diff options
| author | Colin Kennedy <colinvfx@gmail.com> | 2023-05-06 16:00:17 -0700 |
|---|---|---|
| committer | Christian Clason <c.clason@uni-graz.at> | 2023-05-15 09:28:11 +0200 |
| commit | 4c35c0b75d678d3f901d8dd37428ae834c4bd689 (patch) | |
| tree | 2234ece53a504cb4026252e59077f1e93c16a695 /tests/indent/usd_spec.lua | |
| parent | Update parsers: dart, query (diff) | |
| download | nvim-treesitter-4c35c0b75d678d3f901d8dd37428ae834c4bd689.tar nvim-treesitter-4c35c0b75d678d3f901d8dd37428ae834c4bd689.tar.gz nvim-treesitter-4c35c0b75d678d3f901d8dd37428ae834c4bd689.tar.bz2 nvim-treesitter-4c35c0b75d678d3f901d8dd37428ae834c4bd689.tar.lz nvim-treesitter-4c35c0b75d678d3f901d8dd37428ae834c4bd689.tar.xz nvim-treesitter-4c35c0b75d678d3f901d8dd37428ae834c4bd689.tar.zst nvim-treesitter-4c35c0b75d678d3f901d8dd37428ae834c4bd689.zip | |
Added USD as a language + some queries
Added USD highlight unittests
Added USD indentation
Added USD indents.scm file
Added USD indent rules
Simplified USD highlight groups
Added explicit highlight groups
Added newline
Removed after/ftdetect/usda.lua
usd/indents.scm - Added inline comments explaining the nodes
Fixed USD highlight group unittests
Added indentation unittests
Simplified USD `@identifier` highlighting
Added USD documentation highlight group tests
Simplified USD highlight groups
Moved USD `@identifier` and `@namespace` highlights into one place
Removed and simplified tests/query/highlights/usd
Simplified tests/query/highlights/usd more
Removed trailing newline
Combined USD test files
Added `set filetype=usd` to minimal_init.lua
Diffstat (limited to 'tests/indent/usd_spec.lua')
| -rw-r--r-- | tests/indent/usd_spec.lua | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/indent/usd_spec.lua b/tests/indent/usd_spec.lua new file mode 100644 index 000000000..c4e8198aa --- /dev/null +++ b/tests/indent/usd_spec.lua @@ -0,0 +1,21 @@ +local Runner = require("tests.indent.common").Runner + +local run = Runner:new(it, "tests/indent/usd", { + tabstop = 4, + shiftwidth = 4, + softtabstop = 4, + expandtab = true, +}) + +describe("indent USD:", function() + describe("whole file:", function() + run:whole_file(".", { + expected_failures = {}, + }) + end) + + describe("new line:", function() + run:new_line("prim.usd", { on_line = 3, text = "active = false", indent = 4 }) + run:new_line("prim.usd", { on_line = 5, text = "custom int foo = 10", indent = 4 }) + end) +end) |
