From ae49f604eb0b35f2b10e4dc592d6ec1979457f8f Mon Sep 17 00:00:00 2001 From: listout Date: Mon, 24 Oct 2022 00:06:41 +0530 Subject: main: cmp.lua: add omni symbol in formatting and completion under formatting Signed-off-by: listout --- lua/plugins/cmp.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index 2f901c1..e32387e 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -51,10 +51,15 @@ cmp.setup { luasnip = "[LuaSnip]", nvim_lua = "[Lua]", latex_symbols = "[LaTeX]", + omni = "[Omni]", })[entry.source.name] return vim_item end }, + completion = { + keyword_length = 1, + completeopt = "menu,noselect" + }, snippet = { expand = function(args) require('luasnip').lsp_expand(args.body) -- For `luasnip` users. @@ -94,8 +99,9 @@ cmp.setup { end, { 'i', 's' }), }), sources = cmp.config.sources({ + { name = 'omni'}, { name = 'luasnip', option = { use_show_condition = false } }, - { name = 'nvim_lsp' }, + { name = 'nvim_lsp', }, { name = 'nvim_lsp_signature_help' }, { name = 'path' }, { name = 'buffer' }, -- cgit v1.2.3