add(nvim): cmp-spell

This commit is contained in:
Léana 江 2023-11-20 22:43:38 +01:00 committed by Léana 江
parent 84bd7caa18
commit 17f689f52f
4 changed files with 26 additions and 4 deletions

View file

@ -112,6 +112,7 @@ ls.add_snippets("all", {
---------------
-- Setup CMP --
---------------
local Contains = require "utils".Contains
cmp.setup {
snippet = {
expand = function(args)
@ -168,5 +169,20 @@ cmp.setup {
{ name = "luasnip" },
{ name = "nvim_lsp" },
{ name = "buffer", keyword_length = 4 },
{
name = "spell",
keyword_length = 7,
option = {
keep_all_entries = true,
enable_in_context = function()
local ft = vim.opt.filetype
return Contains({
"tex",
"markdown",
"typst",
}, ft)
end,
},
}
},
}