diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2020-09-04 17:01:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-04 17:01:49 +0200 |
commit | 1e14dacd08b52a541c9ff3b34c88629ea168d70b (patch) | |
tree | ee2a8162c29abcfe7ac81e41915e7fb142924dec /test/functional/lua/treesitter_spec.lua | |
parent | ef5a09d4fc6b87343755db681dbc1c339b428296 (diff) | |
parent | 3fd6e3b923402c2d513068a25d6425d040c5012b (diff) | |
download | rneovim-1e14dacd08b52a541c9ff3b34c88629ea168d70b.tar.gz rneovim-1e14dacd08b52a541c9ff3b34c88629ea168d70b.tar.bz2 rneovim-1e14dacd08b52a541c9ff3b34c88629ea168d70b.zip |
Merge pull request #12847 from nvim-treesitter/ts-list-predicates
treesitter: allow to list supported predicates
Diffstat (limited to 'test/functional/lua/treesitter_spec.lua')
-rw-r--r-- | test/functional/lua/treesitter_spec.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/functional/lua/treesitter_spec.lua b/test/functional/lua/treesitter_spec.lua index aa36e6f8f0..c041478af6 100644 --- a/test/functional/lua/treesitter_spec.lua +++ b/test/functional/lua/treesitter_spec.lua @@ -312,6 +312,18 @@ void ui_refresh(void) ]], custom_query) eq({{0, 4, 0, 8}}, res) + + local res_list = exec_lua[[ + local query = require'vim.treesitter.query' + + local list = query.list_predicates() + + table.sort(list) + + return list + ]] + + eq({ 'contains?', 'eq?', 'is-main?', 'match?', 'vim-match?' }, res_list) end) it('supports highlighting', function() |