fix(lsp): dont define diagnostics signs on >= 0.10.0
This commit is contained in:
@ -26,10 +26,10 @@ return {
|
||||
severity_sort = true,
|
||||
signs = {
|
||||
text = {
|
||||
[vim.diagnostic.severity.ERROR] = require("lazyvim.config").icons.diagnostics.Error,
|
||||
[vim.diagnostic.severity.WARN] = require("lazyvim.config").icons.diagnostics.Warn,
|
||||
[vim.diagnostic.severity.HINT] = require("lazyvim.config").icons.diagnostics.Hint,
|
||||
[vim.diagnostic.severity.INFO] = require("lazyvim.config").icons.diagnostics.Info,
|
||||
[vim.diagnostic.severity.ERROR] = LazyVim.config.icons.diagnostics.Error,
|
||||
[vim.diagnostic.severity.WARN] = LazyVim.config.icons.diagnostics.Warn,
|
||||
[vim.diagnostic.severity.HINT] = LazyVim.config.icons.diagnostics.Hint,
|
||||
[vim.diagnostic.severity.INFO] = LazyVim.config.icons.diagnostics.Info,
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -124,10 +124,14 @@ return {
|
||||
return ret
|
||||
end
|
||||
|
||||
-- diagnostics
|
||||
for name, icon in pairs(require("lazyvim.config").icons.diagnostics) do
|
||||
name = "DiagnosticSign" .. name
|
||||
vim.fn.sign_define(name, { text = icon, texthl = name, numhl = "" })
|
||||
-- diagnostics signs
|
||||
if vim.fn.has("nvim-0.10.0") == 0 then
|
||||
local text = vim.tbl_get(opts, "diagnostics", "signs", "text") or {}
|
||||
for severity, icon in pairs(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
|
||||
|
||||
-- inlay hints
|
||||
|
Reference in New Issue
Block a user