Skip to content

Commit

Permalink
fix(lsp): check if diagnostics.signs is disabled by user (#2897)
Browse files Browse the repository at this point in the history
  • Loading branch information
dpetka2001 committed May 15, 2024
1 parent 1892eba commit 6a25450
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lua/lazyvim/plugins/lsp/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 6a25450

Please sign in to comment.