mirror of
https://github.com/LunarVim/LunarVim.git
synced 2024-09-20 18:45:08 +02:00
fix(lsp): do a nil check before string matching autocmd desc (#3354)
This commit is contained in:
parent
f834362b68
commit
f1c469d967
1 changed files with 1 additions and 1 deletions
|
@ -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.desc:match("server " .. server_name .. " ") then
|
||||
if result.desc ~= nil and result.desc:match("server " .. server_name .. " ") then
|
||||
Log:debug(string.format("[%q] is already configured", server_name))
|
||||
return true
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue