mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 06:39:14 +00:00
add(nvim): cmp-spell
This commit is contained in:
parent
84bd7caa18
commit
17f689f52f
4 changed files with 26 additions and 4 deletions
|
|
@ -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,
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue