Skip to content

Commit b5591fd

Browse files
author
Venkata Subramani Renduchintala
committed
fix(lsp): remove deprecated vim.lsp.with() and unmaintained lsp-lens.nvim
Replace vim.lsp.with() (removed in Nvim 0.12) with a direct handler wrapper in lua/lsp/handlers.lua. Remove VidocqH/lsp-lens.nvim: unmaintained since 2023 and calls client.supports_method via dot notation which errors in Nvim 0.13.
1 parent 2f45bb4 commit b5591fd

3 files changed

Lines changed: 3 additions & 8 deletions

File tree

lua/lsp/handlers.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ end
3434
local function set_hover_border(client)
3535
local hp = client.server_capabilities.hoverProvider
3636
if hp == true or (type(hp) == "table" and next(hp) ~= nil) then
37-
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = border })
37+
vim.lsp.handlers["textDocument/hover"] = function(err, result, ctx, config)
38+
return vim.lsp.handlers.hover(err, result, ctx, vim.tbl_extend("force", config or {}, { border = border }))
39+
end
3840
end
3941
end
4042

lua/plugins/configs/lens.lua

Lines changed: 0 additions & 6 deletions
This file was deleted.

lua/plugins/init.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ local plugins = {
7878
---- Code
7979
require("plugins.configs.lspsaga"),
8080
require("plugins.configs.refactor"),
81-
require("plugins.configs.lens"),
8281
require("plugins.configs.conform"), -- Formatting tool
8382
require("plugins.configs.glance"),
8483

0 commit comments

Comments
 (0)