fix(diagnostic): remove check on nil return value

vim.diagnostic._set_signs doesn't return anything, so checking the
return value will always fail.
This commit is contained in:
Gregory Anders 2021-09-17 21:10:10 -06:00
parent 445ef41314
commit 0dcf4ab27b

View File

@ -1,5 +1,3 @@
local log = require('vim.lsp.log')
---@brief lsp-diagnostic
---
---@class Diagnostic
@ -466,10 +464,7 @@ function M.set_signs(diagnostics, bufnr, client_id, _, opts)
opts.severity = {min=severity_lsp_to_vim(opts.severity_limit)}
end
local ok = vim.diagnostic._set_signs(namespace, bufnr, diagnostic_lsp_to_vim(diagnostics, bufnr, client_id), opts)
if not ok then
log.debug("Failed to place signs:", diagnostics)
end
vim.diagnostic._set_signs(namespace, bufnr, diagnostic_lsp_to_vim(diagnostics, bufnr, client_id), opts)
end
--- Set underline for given diagnostics