diff --git a/.config/nvim/lua/blake/lsp.lua b/.config/nvim/lua/blake/lsp.lua index 1721bf2..43a85d7 100644 --- a/.config/nvim/lua/blake/lsp.lua +++ b/.config/nvim/lua/blake/lsp.lua @@ -121,6 +121,10 @@ M.cmp = function() behavior = cmp.ConfirmBehavior.Replace, select = false, }, + [''] = cmp.mapping.confirm { + behavior = cmp.ConfirmBehavior.Replace, + -- select = true, + }, [''] = function(fallback) if cmp.visible() then cmp.select_next_item() @@ -138,12 +142,11 @@ M.cmp = function() }, sources = { { name = 'path' }, - { name = 'nvim_lsp' }, - { name = 'buffer' }, - { name = 'calc' }, { name = 'nvim_lua' }, + { name = 'nvim_lsp' }, + { name = 'calc' }, { name = 'spell' }, - { name = 'treesitter' }, + { name = 'buffer' }, { name = 'emoji' }, }, formatting = { @@ -153,12 +156,11 @@ M.cmp = function() -- set a name for each source vim_item.menu = ({ path = "[Path]", - nvim_lsp = "[LSP]", - buffer = "[Buffer]", - calc = "[Calc]", nvim_lua = "[Lua]", + nvim_lsp = "[LSP]", + calc = "[Calc]", spell = "[Spell]", - treesitter = "[TS]", + buffer = "[Buffer]", })[entry.source.name] return vim_item end, @@ -234,7 +236,7 @@ M.lspconfig = function() end -- From kickstart.nvim: - if (vim.fn.executable(sumneko_binary) == true) then + if (vim.fn.executable(sumneko_binary) == 1) then -- Make runtime files discoverable to the server local runtime_path = vim.split(package.path, ';') table.insert(runtime_path, 'lua/?.lua')