mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-23 01:08:59 +02:00
fix(lsp): dont define diagnostics signs on >= 0.10.0
This commit is contained in:
parent
349ae03f09
commit
64f86147f9
1 changed files with 12 additions and 8 deletions
|
@ -26,10 +26,10 @@ return {
|
||||||
severity_sort = true,
|
severity_sort = true,
|
||||||
signs = {
|
signs = {
|
||||||
text = {
|
text = {
|
||||||
[vim.diagnostic.severity.ERROR] = require("lazyvim.config").icons.diagnostics.Error,
|
[vim.diagnostic.severity.ERROR] = LazyVim.config.icons.diagnostics.Error,
|
||||||
[vim.diagnostic.severity.WARN] = require("lazyvim.config").icons.diagnostics.Warn,
|
[vim.diagnostic.severity.WARN] = LazyVim.config.icons.diagnostics.Warn,
|
||||||
[vim.diagnostic.severity.HINT] = require("lazyvim.config").icons.diagnostics.Hint,
|
[vim.diagnostic.severity.HINT] = LazyVim.config.icons.diagnostics.Hint,
|
||||||
[vim.diagnostic.severity.INFO] = require("lazyvim.config").icons.diagnostics.Info,
|
[vim.diagnostic.severity.INFO] = LazyVim.config.icons.diagnostics.Info,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -124,10 +124,14 @@ return {
|
||||||
return ret
|
return ret
|
||||||
end
|
end
|
||||||
|
|
||||||
-- diagnostics
|
-- diagnostics signs
|
||||||
for name, icon in pairs(require("lazyvim.config").icons.diagnostics) do
|
if vim.fn.has("nvim-0.10.0") == 0 then
|
||||||
name = "DiagnosticSign" .. name
|
local text = vim.tbl_get(opts, "diagnostics", "signs", "text") or {}
|
||||||
vim.fn.sign_define(name, { text = icon, texthl = name, numhl = "" })
|
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
|
end
|
||||||
|
|
||||||
-- inlay hints
|
-- inlay hints
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue