fix: Rename ts_utils.get_node_range -> vim.treesitter.get_node_range

This commit is contained in:
Yuta Katayama
2023-02-12 23:36:51 +09:00
parent 465af9d6c6
commit 297795f3cd
2 changed files with 2 additions and 2 deletions

View File

@@ -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

View File

@@ -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