Skip to content

Commit 8fdd9b2

Browse files
authored
fix: load buffer before parsing with TS (#1689)
1 parent aa35325 commit 8fdd9b2

File tree

1 file changed

+3
-0
lines changed
  • lua/neorg/modules/core/integrations/treesitter

1 file changed

+3
-0
lines changed

lua/neorg/modules/core/integrations/treesitter/module.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -658,6 +658,9 @@ module.public = {
658658
if type(src) == "string" then
659659
parser = vim.treesitter.get_string_parser(src, filetype)
660660
else
661+
if src ~= 0 then
662+
vim.fn.bufload(src)
663+
end
661664
parser = vim.treesitter.get_parser(src or 0, filetype)
662665
end
663666

0 commit comments

Comments
 (0)