diff --git a/lua/cmp_dictionary/init.lua b/lua/cmp_dictionary/init.lua index 157d72d..e6e7ff4 100644 --- a/lua/cmp_dictionary/init.lua +++ b/lua/cmp_dictionary/init.lua @@ -66,12 +66,11 @@ function M.switcher(opt) }) end - if opt.filepath then - vim.api.nvim_create_autocmd("BufEnter", { - group = id, - callback = callback, - }) - end + -- 'dictionary' is buffer-local + vim.api.nvim_create_autocmd("BufEnter", { + group = id, + callback = callback, + }) if opt.spelllang then vim.api.nvim_create_autocmd("OptionSet", {