fix(nvim): pass the buffer number as a parameter
This commit is contained in:
parent
1c47a51c8b
commit
b80396b0dd
|
@ -25,7 +25,7 @@ if not status_ok then
|
|||
return
|
||||
end
|
||||
|
||||
local function lsp_keymaps()
|
||||
local function lsp_keymaps(bufnr)
|
||||
local opts = { noremap = true, silent = true }
|
||||
|
||||
local keymap = vim.api.nvim_buf_set_keymap
|
||||
|
@ -38,7 +38,7 @@ local function lsp_keymaps()
|
|||
keymap(bufnr, "n", "gr", "<cmd>lua vim.lsp.buf.references()<CR>", opts)
|
||||
end
|
||||
|
||||
M.on_attach = function()
|
||||
M.on_attach = function(bufnr)
|
||||
lsp_keymaps(bufnr)
|
||||
end
|
||||
|
||||
|
|
|
@ -2,7 +2,13 @@ return {
|
|||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = { "vim" }
|
||||
globals = { "use", "vim" }
|
||||
},
|
||||
workspace = {
|
||||
library = {
|
||||
[vim.fn.expand("$VIMRUNTIME/lua")] = true,
|
||||
[vim.fn.stdpath("config") .. "/lua"] = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue