Merge pull request #129 from yutkat/main
fix: Rename ts_utils.get_node_range -> vim.treesitter.get_node_range
This commit is contained in:
@@ -129,7 +129,7 @@ local function get_place_pos(parent, position, append, typ)
|
|||||||
if typ == "file" then
|
if typ == "file" then
|
||||||
row, col = 0, 0
|
row, col = 0, 0
|
||||||
else
|
else
|
||||||
row, col = ts_utils.get_node_range(parent)
|
row, col = vim.treesitter.get_node_range(parent)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -295,7 +295,7 @@ end
|
|||||||
--- with multiple annotation conventions.
|
--- with multiple annotation conventions.
|
||||||
---@tag neogen-changelog
|
---@tag neogen-changelog
|
||||||
---@toc_entry Changes in neogen plugin
|
---@toc_entry Changes in neogen plugin
|
||||||
neogen.version = "2.13.0"
|
neogen.version = "2.13.1"
|
||||||
--minidoc_afterlines_end
|
--minidoc_afterlines_end
|
||||||
|
|
||||||
return neogen
|
return neogen
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ local default_locator = require("neogen.locators.default")
|
|||||||
return function(node_info, nodes_to_match)
|
return function(node_info, nodes_to_match)
|
||||||
-- We're dealing with a lua comment and we need to escape its grasp
|
-- 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
|
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 })
|
vim.api.nvim_win_set_cursor(0, { start_row + 1, 0 })
|
||||||
node_info.current = ts_utils.get_node_at_cursor()
|
node_info.current = ts_utils.get_node_at_cursor()
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user