Skip to content

Commit

Permalink
fix: fix typing lsp.Client rename to vim.lsp.Client
Browse files Browse the repository at this point in the history
  • Loading branch information
mehalter committed Apr 30, 2024
1 parent f82f820 commit ea527ce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lua/astrolsp/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
-- copyright 2023
-- license GNU General Public License v3.0

---@alias AstroLSPCondition string|boolean|fun(client:lsp.Client,bufnr:integer):boolean conditional for doing something when attaching a language server
---@alias AstroLSPCondition string|boolean|fun(client:vim.lsp.Client,bufnr:integer):boolean conditional for doing something when attaching a language server

---@class AstroLSPMapping: vim.api.keyset.keymap
---@field [1] string|function rhs of keymap
Expand Down Expand Up @@ -252,7 +252,7 @@
--- client.server_capabilities.semanticTokensProvider = nil
---end
---```
---@field on_attach fun(client:lsp.Client,bufnr:integer)?
---@field on_attach fun(client:vim.lsp.Client,bufnr:integer)?

---@type AstroLSPOpts
local M = {
Expand Down
6 changes: 3 additions & 3 deletions lua/astrolsp/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ M.attached_clients = {}
local function lsp_event(name) vim.api.nvim_exec_autocmds("User", { pattern = "AstroLsp" .. name, modeline = false }) end

---@param cond AstroLSPCondition?
---@param client lsp.Client
---@param client vim.lsp.Client
---@param bufnr integer
local function check_cond(cond, client, bufnr)
local cond_type = type(cond)
Expand Down Expand Up @@ -61,7 +61,7 @@ function M.lsp_setup(server)
end

--- The `on_attach` function used by AstroNvim
---@param client lsp.Client The LSP client details when attaching
---@param client vim.lsp.Client The LSP client details when attaching
---@param bufnr integer The buffer that the LSP client is attaching to
M.on_attach = function(client, bufnr)
if client.supports_method "textDocument/codeLens" and M.config.features.codelens then
Expand Down Expand Up @@ -160,7 +160,7 @@ M.on_attach = function(client, bufnr)
if not map_opts.name then map_opts.name = map_opts.desc end
if wk_avail then wk.register({ [lhs] = map_opts }, { mode = mode }) end
else
vim.keymap.set(mode, lhs, rhs, map_opts)
vim.keymap.set(mode, lhs, rhs, map_opts --[[@as vim.keymap.set.Opts]])
end
end
end
Expand Down

0 comments on commit ea527ce

Please sign in to comment.