update from depreciated sign_define

This commit is contained in:
2025-06-03 13:55:57 -04:00
parent b13227a4c8
commit d43c2bc0b3
+28 -6
View File
@@ -63,11 +63,33 @@ return {
local capabilities = cmp_nvim_lsp.default_capabilities() local capabilities = cmp_nvim_lsp.default_capabilities()
local signs = { Error = '', Warn = '', Hint = '󰠠 ', Info = '' } -- local signs = { Error = ' ', Warn = ' ', Hint = '󰠠 ', Info = ' ' }
for type, icon in pairs(signs) do -- for type, icon in pairs(signs) do
local hl = 'DiagnosticSign' .. type -- local hl = 'DiagnosticSign' .. type
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = '' }) -- vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = '' })
end vim.diagnostic.config({
signs = {
text = {
[vim.diagnostic.severity.ERROR] = '',
[vim.diagnostic.severity.WARN] = '',
[vim.diagnostic.severity.HINT] = '󰠠 ',
[vim.diagnostic.severity.INFO] = '',
},
texthl = {
[vim.diagnostic.severity.ERROR] = 'Error',
[vim.diagnostic.severity.WARN] = 'Error',
[vim.diagnostic.severity.HINT] = 'Hint',
[vim.diagnostic.severity.INFO] = 'Info',
},
numhl = {
[vim.diagnostic.severity.ERROR] = '',
[vim.diagnostic.severity.WARN] = '',
[vim.diagnostic.severity.HINT] = '',
[vim.diagnostic.severity.INFO] = '',
},
},
})
-- end
mason_lspconfig.setup_handlers({ mason_lspconfig.setup_handlers({
-- default handler for installed servers -- default handler for installed servers
@@ -128,4 +150,4 @@ return {
}, },
}) })
end, end,
} }