Skip to content

Commit

Permalink
fix(nvim): codelens errors
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
  • Loading branch information
caarlos0 committed Apr 15, 2024
1 parent ca5b710 commit 1dc9378
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/neovim/config/lua/lsp_autocommands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ local group = vim.api.nvim_create_augroup("LSP", { clear = true })

-- Format code and organize imports (if supported).
--
---@param client lsp.Client Client
---@param client vim.lsp.Client Client
---@param bufnr number Buffer number
---@param timeoutms number timeout in ms
local organize_imports = function(client, bufnr, timeoutms)
Expand Down Expand Up @@ -45,7 +45,7 @@ local M = {}

--- On attach adds all the autocommands we might need when attaching a lsp server to a buffer.
--
---@param client table Client object
---@param client vim.lsp.Client Client object
---@param bufnr number
M.on_attach = function(client, bufnr)
if client.server_capabilities.codeActionProvider and client.name ~= "lua_ls" then
Expand All @@ -63,7 +63,7 @@ M.on_attach = function(client, bufnr)
buffer = bufnr,
callback = function()
if is_alive(client) then
vim.lsp.codelens.refresh()
vim.lsp.codelens.refresh({ bufnr = bufnr })
end
end,
group = group,
Expand All @@ -73,7 +73,7 @@ M.on_attach = function(client, bufnr)
buffer = bufnr,
callback = function()
if is_alive(client) then
vim.lsp.codelens.clear()
vim.lsp.codelens.clear(client.id, bufnr)
end
end,
group = group,
Expand Down

0 comments on commit 1dc9378

Please sign in to comment.