mirror of
https://github.com/neovim/neovim.git
synced 2025-12-09 16:12:48 +00:00
fix(treesitter): use source() method on attach
Fixes an issue that tree-sitter always attached to the current buffer, instead of the provided buffer.
This commit is contained in:
@@ -50,7 +50,7 @@ function M._create_parser(bufnr, lang, opts)
|
||||
end
|
||||
end
|
||||
|
||||
a.nvim_buf_attach(self.bufnr, false, {on_bytes=bytes_cb, on_detach=detach_cb, preview=true})
|
||||
a.nvim_buf_attach(self:source(), false, {on_bytes=bytes_cb, on_detach=detach_cb, preview=true})
|
||||
|
||||
self:parse()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user