From dbc95e41bf343172ba5b9266540f14000e6017bd Mon Sep 17 00:00:00 2001 From: boppyt <71049646+boppyt@users.noreply.github.com> Date: Thu, 23 Dec 2021 01:23:46 +0900 Subject: [PATCH] fix feline with new diagnostic api --- lua/plugins/configs/statusline.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lua/plugins/configs/statusline.lua b/lua/plugins/configs/statusline.lua index b7bf633..a374091 100644 --- a/lua/plugins/configs/statusline.lua +++ b/lua/plugins/configs/statusline.lua @@ -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 = "  ",