This commit is contained in:
kalmenn 2024-01-08 23:17:06 +01:00
parent dca5bf54f6
commit 9efb96a501
Signed by: kalmenn
GPG key ID: F500055C44BC3834
2 changed files with 2 additions and 2 deletions

View file

@ -27,9 +27,8 @@ return {
mapping = cmp.mapping.preset.insert({ mapping = cmp.mapping.preset.insert({
["<C-b>"] = cmp.mapping.scroll_docs(-4), ["<C-b>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4), ["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete(),
["<C-e>"] = cmp.mapping.abort(), ["<C-e>"] = cmp.mapping.abort(),
["<CR>"] = cmp.mapping.confirm({ select = true }), ["<CR>"] = cmp.mapping.confirm({ select = false }),
}), }),
sources = cmp.config.sources({ sources = cmp.config.sources({
{ name = "nvim_lsp" }, { name = "nvim_lsp" },

View file

@ -38,6 +38,7 @@ return {
vim.keymap.set("n", "<space>rn", vim.lsp.buf.rename, opts) vim.keymap.set("n", "<space>rn", vim.lsp.buf.rename, opts)
vim.keymap.set({ "n", "v" }, "<space>ca", vim.lsp.buf.code_action, opts) vim.keymap.set({ "n", "v" }, "<space>ca", vim.lsp.buf.code_action, opts)
vim.keymap.set("n", "gr", vim.lsp.buf.references, opts) vim.keymap.set("n", "gr", vim.lsp.buf.references, opts)
vim.keymap.set({ "n", "i" }, "<C-space>", vim.lsp.buf.hover, opts)
vim.keymap.set("n", "<space>f", function() vim.keymap.set("n", "<space>f", function()
vim.lsp.buf.format({ async = true }) vim.lsp.buf.format({ async = true })
end, opts) end, opts)