mirror of
https://github.com/ray-x/navigator.lua
synced 2024-11-17 15:26:03 +00:00
Preview definition treesitter failure because of API changed
This commit is contained in:
parent
38f1c37bbc
commit
59b89e60a8
@ -74,8 +74,8 @@ local function def_preview(timeout_ms, method)
|
||||
local data = {}
|
||||
-- result = {vim.tbl_deep_extend("force", {}, unpack(result))}
|
||||
-- log("def-preview", result)
|
||||
for key, value in pairs(result) do
|
||||
if result[key] ~= nil and not vim.tbl_isempty(result[key]) then
|
||||
for _, value in pairs(result) do
|
||||
if value ~= nil and not vim.tbl_isempty(value.result) then
|
||||
table.insert(data, value.result[1])
|
||||
end
|
||||
end
|
||||
|
@ -907,8 +907,8 @@ function M.get_node_at_pos(pos, parser)
|
||||
-- local cursor = api.nvim_win_get_cursor(winnr or 0)
|
||||
local cursor_range = { pos[1], pos[2] }
|
||||
|
||||
log(cursor_range)
|
||||
local root = ts_utils.get_root_for_position(unpack(cursor_range), parser)
|
||||
log(pos)
|
||||
local root = ts_utils.get_root_for_position(pos[1], pos[2], parser)
|
||||
|
||||
if not root then
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user