aboutsummaryrefslogtreecommitdiffstats
path: root/lua/alpha/telescope/actions.lua
diff options
context:
space:
mode:
authorAriel D'Alessandro <dalessandro.ariel@gmail.com>2023-04-10 10:18:01 +0200
committerAriel D'Alessandro <dalessandro.ariel@gmail.com>2023-04-10 10:18:01 +0200
commit08d5556ab2f104cc2daff59c078c12816b8c9acc (patch)
tree2e72e8d8e555d92195ae7e1d9f34c732f5be7886 /lua/alpha/telescope/actions.lua
parent11fa125e9ed415021a2c5223e396c8f73fa05a13 (diff)
downloadnvim-conf-08d5556ab2f104cc2daff59c078c12816b8c9acc.tar.gz
nvim-conf-08d5556ab2f104cc2daff59c078c12816b8c9acc.zip
feat(general): update keymaps
Diffstat (limited to 'lua/alpha/telescope/actions.lua')
-rw-r--r--lua/alpha/telescope/actions.lua13
1 files changed, 7 insertions, 6 deletions
diff --git a/lua/alpha/telescope/actions.lua b/lua/alpha/telescope/actions.lua
index c7cdaa8..b0e9f10 100644
--- a/lua/alpha/telescope/actions.lua
+++ b/lua/alpha/telescope/actions.lua
@@ -9,8 +9,9 @@ M.create_plugin = function(prompt_bufnr)
vim.cmd(string.format("edit ~/.config/nvim/lua/plugins/%s.lua", new_plugin))
end
+
local get_disable_stm_node = function(bufnr, tree)
- vim.treesitter.set_query(
+ vim.treesitter.query.set(
"lua",
"alpha_plugin_is_disabled",
[[
@@ -27,7 +28,7 @@ local get_disable_stm_node = function(bufnr, tree)
]]
)
- local query = vim.treesitter.get_query("lua", "alpha_plugin_is_disabled")
+ local query = vim.treesitter.query.get("lua", "alpha_plugin_is_disabled")
for id, node in query:iter_captures(tree:root(), bufnr) do
if query.captures[id] == "enabled" then
@@ -39,7 +40,7 @@ local get_disable_stm_node = function(bufnr, tree)
end
local get_enabled_node = function(bufnr, tree)
- vim.treesitter.set_query(
+ vim.treesitter.query.set(
"lua",
"alpha_plugin_has_enable_property",
[[
@@ -55,7 +56,7 @@ local get_enabled_node = function(bufnr, tree)
]]
)
- local query = vim.treesitter.get_query("lua", "alpha_plugin_has_enable_property")
+ local query = vim.treesitter.query.get("lua", "alpha_plugin_has_enable_property")
for id, node in query:iter_captures(tree:root(), bufnr) do
if query.captures[id] == "enabled" then
@@ -67,7 +68,7 @@ local get_enabled_node = function(bufnr, tree)
end
local get_return_node = function(bufnr, tree)
- vim.treesitter.set_query(
+ vim.treesitter.query.set(
"lua",
"alpha_plugin_return_table_constructor",
[[
@@ -79,7 +80,7 @@ local get_return_node = function(bufnr, tree)
]]
)
- local query = vim.treesitter.get_query("lua", "alpha_plugin_return_table_constructor")
+ local query = vim.treesitter.query.get("lua", "alpha_plugin_return_table_constructor")
for id, node in query:iter_captures(tree:root(), bufnr) do
if query.captures[id] == "table_constructor" then