update from depreciated sign_define
This commit is contained in:
@@ -63,11 +63,33 @@ return {
|
||||
|
||||
local capabilities = cmp_nvim_lsp.default_capabilities()
|
||||
|
||||
local signs = { Error = ' ', Warn = ' ', Hint = ' ', Info = ' ' }
|
||||
for type, icon in pairs(signs) do
|
||||
local hl = 'DiagnosticSign' .. type
|
||||
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = '' })
|
||||
end
|
||||
-- local signs = { Error = ' ', Warn = ' ', Hint = ' ', Info = ' ' }
|
||||
-- for type, icon in pairs(signs) do
|
||||
-- local hl = 'DiagnosticSign' .. type
|
||||
-- vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = '' })
|
||||
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({
|
||||
-- default handler for installed servers
|
||||
@@ -128,4 +150,4 @@ return {
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user