mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-03 12:06:55 -04:00
fix: update interface following languagetree merge (#687)
This commit is contained in:
parent
3c07232d07
commit
808765a6c8
11 changed files with 16 additions and 204 deletions
|
|
@ -116,7 +116,7 @@ end
|
|||
function M.get_node_at_cursor(winnr)
|
||||
if not parsers.has_parser() then return end
|
||||
local cursor = api.nvim_win_get_cursor(winnr or 0)
|
||||
local root = parsers.get_parser():parse():root()
|
||||
local root = parsers.get_parser():parse()[1]:root()
|
||||
return root:named_descendant_for_range(cursor[1]-1,cursor[2],cursor[1]-1,cursor[2])
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue