From 25e20da550b0d267013ac295756bad76f5fda7ef Mon Sep 17 00:00:00 2001 From: Thomas Vigouroux Date: Tue, 15 Dec 2020 22:18:35 +0100 Subject: feat(buffer_updates): allow ignoring when previewing Also adds a test that we actually subscribe to buffer events when in CMDPREVIEW. --- runtime/lua/vim/treesitter.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/lua') diff --git a/runtime/lua/vim/treesitter.lua b/runtime/lua/vim/treesitter.lua index 6886f0c178..79dcf77f9e 100644 --- a/runtime/lua/vim/treesitter.lua +++ b/runtime/lua/vim/treesitter.lua @@ -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}) + a.nvim_buf_attach(self.bufnr, false, {on_bytes=bytes_cb, on_detach=detach_cb, preview=true}) self:parse() -- cgit