diff options
author | Thomas Vigouroux <tomvig38@gmail.com> | 2020-09-04 14:27:15 +0200 |
---|---|---|
committer | Thomas Vigouroux <tomvig38@gmail.com> | 2020-09-04 15:24:23 +0200 |
commit | 3fd6e3b923402c2d513068a25d6425d040c5012b (patch) | |
tree | 3b6c160cd0bf802036b329dbfea5d9e2770b2616 /test/functional/lua/treesitter_spec.lua | |
parent | 3acfefb63ee70c8eac13bf6b308a0e73e6fb8007 (diff) | |
download | rneovim-3fd6e3b923402c2d513068a25d6425d040c5012b.tar.gz rneovim-3fd6e3b923402c2d513068a25d6425d040c5012b.tar.bz2 rneovim-3fd6e3b923402c2d513068a25d6425d040c5012b.zip |
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() |