This stops cmp from using buffer complete in tex files. I find it is more of a hinderance than a help
23 lines
463 B
Lua
23 lines
463 B
Lua
-- stop suggesting buffer contents when writing prose
|
|
local ok,cmp = pcall(require,"cmp")
|
|
if not ok then
|
|
return
|
|
end
|
|
|
|
local sources = cmp.get_config().sources
|
|
|
|
for i = #sources, 1, -1 do
|
|
if sources[i].name == 'buffer' then
|
|
table.remove(sources,i)
|
|
end
|
|
end
|
|
cmp.setup.buffer({ sources = sources})
|
|
|
|
-- set syntax and spell
|
|
|
|
vim.opt.spell = true
|
|
vim.opt.foldmarker = '(fold),(end)'
|
|
vim.opt.foldclose = 'all'
|
|
vim.opt.foldmethod = 'marker'
|
|
vim.opt.foldenable = true
|