From 297795f3cd05a1bac4283e9e3f82cc9239b697ff Mon Sep 17 00:00:00 2001 From: Yuta Katayama <8683947+yutkat@users.noreply.github.com> Date: Sun, 12 Feb 2023 23:36:51 +0900 Subject: [PATCH] fix: Rename ts_utils.get_node_range -> vim.treesitter.get_node_range --- lua/neogen/generator.lua | 2 +- lua/neogen/locators/lua.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/neogen/generator.lua b/lua/neogen/generator.lua index 1086259..785fe22 100644 --- a/lua/neogen/generator.lua +++ b/lua/neogen/generator.lua @@ -129,7 +129,7 @@ local function get_place_pos(parent, position, append, typ) if typ == "file" then row, col = 0, 0 else - row, col = ts_utils.get_node_range(parent) + row, col = vim.treesitter.get_node_range(parent) end end diff --git a/lua/neogen/locators/lua.lua b/lua/neogen/locators/lua.lua index 5b85847..bcd2a32 100644 --- a/lua/neogen/locators/lua.lua +++ b/lua/neogen/locators/lua.lua @@ -4,7 +4,7 @@ local default_locator = require("neogen.locators.default") return function(node_info, nodes_to_match) -- We're dealing with a lua comment and we need to escape its grasp if node_info.current and node_info.current:type() == "source" then - local start_row, _, _, _ = ts_utils.get_node_range(node_info.current) + local start_row, _, _, _ = vim.treesitter.get_node_range(node_info.current) vim.api.nvim_win_set_cursor(0, { start_row + 1, 0 }) node_info.current = ts_utils.get_node_at_cursor() end