fix(lsp): don't start servers multiple times (#3347)

This commit is contained in:
LostNeophyte 2022-10-27 03:56:28 +02:00 committed by GitHub
parent b8be029eb9
commit f834362b68
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: 4AEE18F83AFDEB23

View file

@ -62,7 +62,7 @@ local function client_is_configured(server_name, ft)
ft = ft or vim.bo.filetype
local active_autocmds = vim.api.nvim_get_autocmds { event = "FileType", pattern = ft }
for _, result in ipairs(active_autocmds) do
if result.command:match(server_name) then
if result.desc:match("server " .. server_name .. " ") then
Log:debug(string.format("[%q] is already configured", server_name))
return true
end