fix feline with new diagnostic api
This commit is contained in:
parent
3a966955d4
commit
dbc95e41bf
|
@ -1,5 +1,6 @@
|
|||
local colors = require("colors").get()
|
||||
local lsp = require "feline.providers.lsp"
|
||||
local lsp_severity = vim.diagnostic.severity
|
||||
|
||||
local icon_styles = {
|
||||
default = {
|
||||
|
@ -150,7 +151,7 @@ components.active[1][6] = {
|
|||
components.active[1][7] = {
|
||||
provider = "diagnostic_errors",
|
||||
enabled = function()
|
||||
return lsp.diagnostics_exist "Error"
|
||||
return lsp.diagnostics_exist(lsp_severity.ERROR)
|
||||
end,
|
||||
|
||||
hl = { fg = colors.red },
|
||||
|
@ -160,7 +161,7 @@ components.active[1][7] = {
|
|||
components.active[1][8] = {
|
||||
provider = "diagnostic_warnings",
|
||||
enabled = function()
|
||||
return lsp.diagnostics_exist "Warning"
|
||||
return lsp.diagnostics_exist(lsp_severity.WARN)
|
||||
end,
|
||||
hl = { fg = colors.yellow },
|
||||
icon = " ",
|
||||
|
@ -169,7 +170,7 @@ components.active[1][8] = {
|
|||
components.active[1][9] = {
|
||||
provider = "diagnostic_hints",
|
||||
enabled = function()
|
||||
return lsp.diagnostics_exist "Hint"
|
||||
return lsp.diagnostics_exist(lsp_severity.HINT)
|
||||
end,
|
||||
hl = { fg = colors.grey_fg2 },
|
||||
icon = " ",
|
||||
|
@ -178,7 +179,7 @@ components.active[1][9] = {
|
|||
components.active[1][10] = {
|
||||
provider = "diagnostic_info",
|
||||
enabled = function()
|
||||
return lsp.diagnostics_exist "Information"
|
||||
return lsp.diagnostics_exist(lsp_severity.INFO)
|
||||
end,
|
||||
hl = { fg = colors.green },
|
||||
icon = " ",
|
||||
|
|
Loading…
Reference in New Issue