mirror of
https://github.com/neovim/neovim.git
synced 2026-02-18 09:28:33 +00:00
buffer updates: add on_reload callback and handle it in treesitter parser
This commit is contained in:
@@ -51,7 +51,11 @@ function M._create_parser(bufnr, lang, opts)
|
||||
self:_on_detach(...)
|
||||
end
|
||||
|
||||
a.nvim_buf_attach(self:source(), false, {on_bytes=bytes_cb, on_detach=detach_cb, preview=true})
|
||||
local function reload_cb(_, ...)
|
||||
self:_on_reload(...)
|
||||
end
|
||||
|
||||
a.nvim_buf_attach(self:source(), false, {on_bytes=bytes_cb, on_detach=detach_cb, on_reload=reload_cb, preview=true})
|
||||
|
||||
self:parse()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user