enter for completion

master
RageCage64 2 years ago
parent e0f0082b9c
commit f605a487fa

@ -9,7 +9,7 @@ require("mason-lspconfig").setup({
'rust_analyzer', 'rust_analyzer',
'cmake', 'cmake',
'clangd', 'clangd',
'zls', --'zls',
'bashls', 'bashls',
} }
}) })
@ -20,7 +20,15 @@ lsp.set_preferences({
sign_icons = { } 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 } local opts = { buffer = bufnr, remap = false }
vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts) vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts)

Loading…
Cancel
Save