Skip to content

Commit

Permalink
fix(feline):fix provider option for lazy updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ilias777 committed Jul 9, 2024
1 parent b9fcf2e commit 693f775
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions lua/catppuccin/groups/integrations/feline.lua
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,12 @@ function M.get()
return false
end

-- Check if lazy.nvim is installed
local has_lazy = function()
local lazy_installed, _ = pcall(require, "lazy")
return lazy_installed
end

-- #################### STATUSLINE ->

-- ######## Left
Expand Down Expand Up @@ -308,13 +314,18 @@ function M.get()

-- lazy.nvim updates
components.active[1][14] = {
provider = require("lazy.status").updates,
provider = function()
if has_lazy() then
return require("lazy.status").updates()
else
return " "
end
end,
enabled = function()
local lazy_installed, _ = pcall(require, "lazy")
if lazy_installed then
if has_lazy() then
return require("lazy.status").has_updates()
else
return ""
return false
end
end,
hl = {
Expand Down

0 comments on commit 693f775

Please sign in to comment.