mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
fix(lsp): check if diagnostics.signs is disabled by user
This commit is contained in:
parent
97480dc5d2
commit
d5f3bac898
1 changed files with 6 additions and 4 deletions
|
|
@ -120,10 +120,12 @@ return {
|
|||
|
||||
-- diagnostics signs
|
||||
if vim.fn.has("nvim-0.10.0") == 0 then
|
||||
for severity, icon in pairs(opts.diagnostics.signs.text) do
|
||||
local name = vim.diagnostic.severity[severity]:lower():gsub("^%l", string.upper)
|
||||
name = "DiagnosticSign" .. name
|
||||
vim.fn.sign_define(name, { text = icon, texthl = name, numhl = "" })
|
||||
if type(opts.diagnostics.signs) ~= "boolean" then
|
||||
for severity, icon in pairs(opts.diagnostics.signs.text) do
|
||||
local name = vim.diagnostic.severity[severity]:lower():gsub("^%l", string.upper)
|
||||
name = "DiagnosticSign" .. name
|
||||
vim.fn.sign_define(name, { text = icon, texthl = name, numhl = "" })
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue