fix(nvim): fix bufnr error for now

This commit is contained in:
Oliver Davies 2022-01-08 23:56:13 +00:00
parent a4447efaa9
commit f1171dbfc0

View file

@ -25,21 +25,21 @@ if not status_ok then
return
end
local function lsp_keymaps(bufnr)
local opts = { noremap = true, silent = true }
local function lsp_keymaps(--[[ bufnr ]])
-- local opts = { noremap = true, silent = true }
local keymap = vim.api.nvim_buf_set_keymap
-- local keymap = vim.api.nvim_buf_set_keymap
keymap(bufnr, "n", "gD", "<cmd>lua vim.lsp.buf.declaration()<CR>", opts)
keymap(bufnr, "n", "gd", "<cmd>lua vim.lsp.buf.definition()<CR>", opts)
keymap(bufnr, "n", "K", "<cmd>lua vim.lsp.buf.hover()<CR>", opts)
keymap(bufnr, "n", "gi", "<cmd>lua vim.lsp.buf.implementation()<CR>", opts)
keymap(bufnr, "n", "<C-k>", "<cmd>lua vim.lsp.buf.signature_help()<CR>", opts)
keymap(bufnr, "n", "gr", "<cmd>lua vim.lsp.buf.references()<CR>", opts)
-- keymap(bufnr, "n", "gD", "<cmd>lua vim.lsp.buf.declaration()<CR>", opts)
-- keymap(bufnr, "n", "gd", "<cmd>lua vim.lsp.buf.definition()<CR>", opts)
-- keymap(bufnr, "n", "K", "<cmd>lua vim.lsp.buf.hover()<CR>", opts)
-- keymap(bufnr, "n", "gi", "<cmd>lua vim.lsp.buf.implementation()<CR>", opts)
-- keymap(bufnr, "n", "<C-k>", "<cmd>lua vim.lsp.buf.signature_help()<CR>", opts)
-- keymap(bufnr, "n", "gr", "<cmd>lua vim.lsp.buf.references()<CR>", opts)
end
M.on_attach = function(bufnr)
lsp_keymaps(bufnr)
M.on_attach = function(--[[ bufnr ]])
lsp_keymaps(--[[ bufnr ]])
end
M.capabilities = cmp_nvim_lsp.update_capabilities(capabilities)