mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 03:05:11 -07:00
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:
parent
445ef41314
commit
0dcf4ab27b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user