From f605a487fa70c41d9e00a86cf00e02fc9723e7f0 Mon Sep 17 00:00:00 2001 From: RageCage64 Date: Tue, 23 May 2023 21:54:29 -0400 Subject: [PATCH] enter for completion --- nvim/after/plugin/lsp.lua | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/nvim/after/plugin/lsp.lua b/nvim/after/plugin/lsp.lua index 386d131..f8ee762 100644 --- a/nvim/after/plugin/lsp.lua +++ b/nvim/after/plugin/lsp.lua @@ -9,7 +9,7 @@ require("mason-lspconfig").setup({ 'rust_analyzer', 'cmake', 'clangd', - 'zls', + --'zls', 'bashls', } }) @@ -20,7 +20,15 @@ lsp.set_preferences({ sign_icons = { } }) -lsp.on_attach(function(client, bufnr) +local cmp = require('cmp') + +cmp.setup({ + mapping = { + [''] = cmp.mapping.confirm({select = false}), + } +}) + +lsp.on_attach(function(_, bufnr) local opts = { buffer = bufnr, remap = false } vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts)