From f1171dbfc038baef6b656a775dabfffcef03b7f8 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Sat, 8 Jan 2022 23:56:13 +0000 Subject: [PATCH] fix(nvim): fix `bufnr` error for now --- .../files/lua/opdavies/lsp/handlers.lua | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/roles/neovim/files/lua/opdavies/lsp/handlers.lua b/roles/neovim/files/lua/opdavies/lsp/handlers.lua index 7014a57..1f5c035 100644 --- a/roles/neovim/files/lua/opdavies/lsp/handlers.lua +++ b/roles/neovim/files/lua/opdavies/lsp/handlers.lua @@ -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", "lua vim.lsp.buf.declaration()", opts) - keymap(bufnr, "n", "gd", "lua vim.lsp.buf.definition()", opts) - keymap(bufnr, "n", "K", "lua vim.lsp.buf.hover()", opts) - keymap(bufnr, "n", "gi", "lua vim.lsp.buf.implementation()", opts) - keymap(bufnr, "n", "", "lua vim.lsp.buf.signature_help()", opts) - keymap(bufnr, "n", "gr", "lua vim.lsp.buf.references()", opts) + -- keymap(bufnr, "n", "gD", "lua vim.lsp.buf.declaration()", opts) + -- keymap(bufnr, "n", "gd", "lua vim.lsp.buf.definition()", opts) + -- keymap(bufnr, "n", "K", "lua vim.lsp.buf.hover()", opts) + -- keymap(bufnr, "n", "gi", "lua vim.lsp.buf.implementation()", opts) + -- keymap(bufnr, "n", "", "lua vim.lsp.buf.signature_help()", opts) + -- keymap(bufnr, "n", "gr", "lua vim.lsp.buf.references()", 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)