From df6d6b8980fb7c1fe5afc3b298bb2dcba6bbe3dd Mon Sep 17 00:00:00 2001 From: "Yuval.D" Date: Wed, 10 Jun 2026 14:07:16 +0300 Subject: [PATCH] fix: "get_node_at_cursor" parser injected lang (#81) --- lua/tabout/node.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lua/tabout/node.lua b/lua/tabout/node.lua index 340cfb2..9597bf1 100755 --- a/lua/tabout/node.lua +++ b/lua/tabout/node.lua @@ -42,7 +42,7 @@ M.get_node_at_cursor = function(dir) local filetype = vim.bo[0].filetype local ok, parser = pcall(vim.treesitter.get_parser, 0) if ok and parser then - parser:parse() + parser:parse(true) else if skip_notify[filetype] == nil then vim.notify("tabout.nvim: No parser found for filetype " .. filetype) @@ -50,7 +50,11 @@ M.get_node_at_cursor = function(dir) end return end - local tree = parser:tree_for_range(cursor_range) + -- Descend into injected languages (e.g.