From 636fe41c878ac828c193a9d056044dc10f9e7621 Mon Sep 17 00:00:00 2001 From: ray-x Date: Wed, 29 Mar 2023 21:47:42 +1100 Subject: [PATCH] treesitter API changes --- lua/go/snips.lua | 2 +- neovim.yml | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 neovim.yml diff --git a/lua/go/snips.lua b/lua/go/snips.lua index bc7ddc3..e539c9e 100644 --- a/lua/go/snips.lua +++ b/lua/go/snips.lua @@ -174,7 +174,7 @@ local function return_value_nodes(info) return end - local query = vim.treesitter.get_query('go', 'LuaSnip_Result') + local query = (vim.fn.has('nvim-0.9') == 1) and vim.treesitter.query.get('go', 'LuaSnip_Result') for _, node in query:iter_captures(function_node, 0) do if handlers[node:type()] then return handlers[node:type()](node, info) diff --git a/neovim.yml b/neovim.yml new file mode 100644 index 0000000..ddb50e0 --- /dev/null +++ b/neovim.yml @@ -0,0 +1,24 @@ +base: lua51 + +globals: + vim: + any: true + assert: + args: + - type: bool + - type: string + required: false + after_each: + args: + - type: function + before_each: + args: + - type: function + describe: + args: + - type: string + - type: function + it: + args: + - type: string + - type: function