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:
Thomas Vigouroux
2021-01-14 12:01:50 +01:00
parent ea8756f85d
commit acf6ed5541

View File

@@ -50,7 +50,7 @@ function M._create_parser(bufnr, lang, opts)
end end
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() self:parse()