From b32ab3e38bf4a8ab0b8d8d44c6e2f99da9a2c874 Mon Sep 17 00:00:00 2001 From: jdhao Date: Fri, 18 Jun 2021 16:49:47 +0800 Subject: [PATCH] update nvim-compe settings Only enable omni and spell source for certain filetypes. See also https://github.com/hrsh7th/nvim-compe/pull/170 --- lua/lsp/init.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lua/lsp/init.lua b/lua/lsp/init.lua index 3097223..68ae042 100644 --- a/lua/lsp/init.lua +++ b/lua/lsp/init.lua @@ -132,9 +132,10 @@ require'compe'.setup { documentation = true; source = { + omni = {filetypes = {'tex'}}; path = true; buffer = true; - spell = false; + spell = {filetypes = {'markdown', 'tex'}}; emoji = true; nvim_lsp = true; nvim_lua = true; @@ -144,8 +145,6 @@ require'compe'.setup { }; } -vim.api.nvim_command("autocmd FileType markdown lua require'compe'.setup({source = {spell=true}}, 0)") - vim.o.completeopt = "menuone,noselect" -- nvim-comple mappings