aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lua/lspconfig/configs.lua5
-rw-r--r--plugin/lspconfig.lua4
2 files changed, 9 insertions, 0 deletions
diff --git a/lua/lspconfig/configs.lua b/lua/lspconfig/configs.lua
index b4f9ca08..65b0b8fb 100644
--- a/lua/lspconfig/configs.lua
+++ b/lua/lspconfig/configs.lua
@@ -1,3 +1,8 @@
+-- This entire module will only be usfeul for Nvim older than 0.11, since vim.lsp.config makes this module obsolete. So
+-- it's easier to just disable all warnings for now and remove this file when it's no longer relevant.
+--- @diagnostic disable: assign-type-mismatch
+--- @diagnostic disable: param-type-mismatch
+
local util = require 'lspconfig.util'
local async = require 'lspconfig.async'
local api, validate, lsp, fn = vim.api, vim.validate, vim.lsp, vim.fn
diff --git a/plugin/lspconfig.lua b/plugin/lspconfig.lua
index fc60427d..44a1fcf9 100644
--- a/plugin/lspconfig.lua
+++ b/plugin/lspconfig.lua
@@ -90,6 +90,8 @@ end, {
api.nvim_create_user_command('LspRestart', function(info)
local detach_clients = {}
for _, client in ipairs(get_clients_from_cmd_args(info.args)) do
+ -- Can remove diagnostic disabling when changing to client:stop() in nvim 0.11+
+ --- @diagnostic disable: missing-parameter
client.stop()
if vim.tbl_count(client.attached_buffers) > 0 then
detach_clients[client.name] = { client, lsp.get_buffers_by_client_id(client.id) }
@@ -142,6 +144,8 @@ api.nvim_create_user_command('LspStop', function(info)
end
for _, client in ipairs(clients) do
+ -- Can remove diagnostic disabling when changing to client:stop(force) in nvim 0.11+
+ --- @diagnostic disable: param-type-mismatch
client.stop(force)
end
end, {