mirror of
https://github.com/jessebot/dot_files.git
synced 2025-10-01 01:48:43 +00:00
fix vim.fn.sign_define deprecation and use vim.diagnostic.config.signs instead for neovim
This commit is contained in:
parent
2b0954001d
commit
4c12c73634
1 changed files with 14 additions and 9 deletions
|
@ -156,17 +156,22 @@ lspconfig.yamlls.setup {
|
|||
capabilities = capabilities
|
||||
}
|
||||
|
||||
-- change the diagnostic signs to be nerdfonts
|
||||
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 = hl })
|
||||
end
|
||||
|
||||
vim.diagnostic.config({
|
||||
virtual_text = false,
|
||||
signs = true,
|
||||
signs = {
|
||||
text = {
|
||||
[vim.diagnostic.severity.ERROR] = ' ',
|
||||
[vim.diagnostic.severity.WARN] = ' ',
|
||||
[vim.diagnostic.severity.INFO] = ' ',
|
||||
[vim.diagnostic.severity.HINT] = ' ',
|
||||
},
|
||||
linehl = {
|
||||
[vim.diagnostic.severity.ERROR] = 'ErrorMsg',
|
||||
},
|
||||
numhl = {
|
||||
[vim.diagnostic.severity.WARN] = 'WarningMsg',
|
||||
},
|
||||
},
|
||||
underline = true,
|
||||
update_in_insert = false,
|
||||
severity_sort = false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue