1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-24 02:20:03 +08:00
SpaceVim/bundle/cmp-dictionary/after/plugin/cmp_dictionary.lua
2023-06-11 21:41:39 +08:00

19 lines
465 B
Lua

if vim.g.loaded_cmp_dictionary then
return
end
vim.g.loaded_cmp_dictionary = true
require("cmp").register_source("dictionary", require("cmp_dictionary.source").new())
local update = require("cmp_dictionary").update
vim.api.nvim_create_user_command("CmpDictionaryUpdate", update, {})
vim.api.nvim_create_autocmd("OptionSet", {
group = vim.api.nvim_create_augroup("cmp_dictionary_auto_update", {}),
pattern = "dictionary",
callback = update,
})
update()