enter for completion

master
RageCage64 2 years ago
parent e0f0082b9c
commit f605a487fa

@ -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 = {
['<CR>'] = 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)

Loading…
Cancel
Save