mirror of
https://github.com/neovim/neovim.git
synced 2025-12-16 11:25:33 +00:00
lsp: check if config is nil
This commit is contained in:
@@ -1007,7 +1007,7 @@ function M.on_publish_diagnostics(_, _, params, client_id, _, config)
|
||||
|
||||
local diagnostics = params.diagnostics
|
||||
|
||||
if if_nil(config.severity_sort, false) then
|
||||
if config and if_nil(config.severity_sort, false) then
|
||||
table.sort(diagnostics, function(a, b) return a.severity > b.severity end)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user