diff options
author | Christian Clason <c.clason@uni-graz.at> | 2024-01-17 16:55:52 +0100 |
---|---|---|
committer | Christian Clason <c.clason@uni-graz.at> | 2024-01-21 10:41:18 +0100 |
commit | f5dc45310941dff6efc02d955fc0c110190e9b85 (patch) | |
tree | ee4f96087a641dbd0df21cc9db46061c5864dae2 /test | |
parent | fa9a85ae468b9df30ae9e5c05a08c0f124e267df (diff) | |
download | rneovim-f5dc45310941dff6efc02d955fc0c110190e9b85.tar.gz rneovim-f5dc45310941dff6efc02d955fc0c110190e9b85.tar.bz2 rneovim-f5dc45310941dff6efc02d955fc0c110190e9b85.zip |
feat(treesitter)!: new standard capture names
Problem: Sharing queries with upstream and Helix is difficult due to
different capture names.
Solution: Define and document a new set of standard captures that
matches tree-sitter "standard captures" (where defined) and is closer to
Helix' Atom-style nested groups.
This is a breaking change for colorschemes that defined highlights based
on the old captures. On the other hand, the default colorscheme now
defines links for all standard captures (not just those used in bundled
queries), improving the out-of-the-box experience.
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/treesitter/fold_spec.lua | 2 | ||||
-rw-r--r-- | test/functional/treesitter/highlight_spec.lua | 6 | ||||
-rw-r--r-- | test/old/testdir/test_syntax.vim | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/test/functional/treesitter/fold_spec.lua b/test/functional/treesitter/fold_spec.lua index 2302cf869e..ac9d227bb6 100644 --- a/test/functional/treesitter/fold_spec.lua +++ b/test/functional/treesitter/fold_spec.lua @@ -729,7 +729,7 @@ void qsort(void *base, size_t nel, size_t width, int (*compar)(const void *, con feed('ggVGzf') screen:expect { grid = [[ - {2:^void}{1: }{3:qsort}{4:(}{2:void}{1: }{5:*}{3:base}{4:,}{1: }{2:size_t}{1: }{3:nel}{4:,}{1: }{2:size_t}{1: }{3:width}{4:,}{1: }{2:int}{1: }{4:(}{5:*}{3:compa}| + {4:^void}{1: }{3:qsort}{4:(void}{1: }{5:*}{3:base}{4:,}{1: }{4:size_t}{1: }{3:nel}{4:,}{1: }{4:size_t}{1: }{3:width}{4:,}{1: }{4:int}{1: }{4:(}{5:*}{3:compa}| {0:~ }|*3 | ]], diff --git a/test/functional/treesitter/highlight_spec.lua b/test/functional/treesitter/highlight_spec.lua index f4f7bc691c..932af0332b 100644 --- a/test/functional/treesitter/highlight_spec.lua +++ b/test/functional/treesitter/highlight_spec.lua @@ -766,7 +766,7 @@ describe('treesitter highlighting (help)', function() {1:>ruby} | {1: -- comment} | {1: local this_is = 'actually_lua'} | - < | + {1:<} | ^ | | ]], @@ -779,7 +779,7 @@ describe('treesitter highlighting (help)', function() {1:>lua} | {1: -- comment} | {1: }{3:local}{1: }{4:this_is}{1: }{3:=}{1: }{5:'actually_lua'} | - < | + {1:<} | ^ | | ]], @@ -792,7 +792,7 @@ describe('treesitter highlighting (help)', function() {1:>ruby} | {1: -- comment} | {1: local this_is = 'actually_lua'} | - < | + {1:<} | ^ | | ]], diff --git a/test/old/testdir/test_syntax.vim b/test/old/testdir/test_syntax.vim index 10dc798df7..711b2adf7c 100644 --- a/test/old/testdir/test_syntax.vim +++ b/test/old/testdir/test_syntax.vim @@ -197,14 +197,14 @@ func Test_syntax_completion() " Check that clearing "Aap" avoids it showing up before Boolean. hi @Aap ctermfg=blue call feedkeys(":syn list \<C-A>\<C-B>\"\<CR>", 'tx') - call assert_match('^"syn list @Aap @boolean @character ', @:) + call assert_match('^"syn list @Aap @attribute @boolean @character ', @:) hi clear @Aap call feedkeys(":syn list \<C-A>\<C-B>\"\<CR>", 'tx') - call assert_match('^"syn list @boolean @character ', @:) + call assert_match('^"syn list @attribute @boolean @character ', @:) call feedkeys(":syn match \<C-A>\<C-B>\"\<CR>", 'tx') - call assert_match('^"syn match @boolean @character ', @:) + call assert_match('^"syn match @attribute @boolean @character ', @:) syn cluster Aax contains=Aap call feedkeys(":syn list @A\<C-A>\<C-B>\"\<CR>", 'tx') |