Skip to content

Commit 439789a

Browse files
nicoelewis6991
authored andcommitted
fix: Always call parse on the treesitter parser
In case the user did not enable treesitter highlighting the buffer won't be parsed, yet thus we should always trigger a parse().
1 parent a25c56c commit 439789a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lua/treesitter-context/context.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,8 @@ local function get_parent_langtrees(bufnr, range)
215215
return {}
216216
end
217217

218+
--- @diagnostic disable-next-line:redundant-parameter added in 0.11
219+
root_tree:parse(range, function(...) end)
218220
local ret = { root_tree }
219221

220222
while true do

0 commit comments

Comments
 (0)