mirror of
https://github.com/catppuccin/nvim
synced 2024-09-16 13:24:08 +02:00
feat(feline): allow to hide lazy.nvim updates (#731)
* feat(feline): allow to hide lazy.nvim updates * fix(feline): check if lazy.nvim exisis * feat(feline): disable lazy.nvim updates module by default docs(feline): document settings for lazy.nvim updates module * docs: auto generate vimdoc --------- Co-authored-by: vollowx <vollowx@users.noreply.github.com>
This commit is contained in:
parent
47bd419c0c
commit
7946d1a195
3 changed files with 11 additions and 16 deletions
|
@ -581,7 +581,10 @@ ctp_feline.setup({
|
|||
extras = clrs.overlay1,
|
||||
curr_file = clrs.maroon,
|
||||
curr_dir = clrs.flamingo,
|
||||
show_modified = true -- show if the file has been modified
|
||||
show_modified = false -- show if the file has been modified
|
||||
show_lazy_updates = false -- show the count of updatable plugins from lazy.nvim
|
||||
-- need to set checker.enabled = true in lazy.nvim first
|
||||
-- the icon is set in ui.icons.plugin in lazy.nvim
|
||||
},
|
||||
mode_colors = {
|
||||
["n"] = { "NORMAL", clrs.lavender },
|
||||
|
|
|
@ -455,7 +455,10 @@ Here are the defaults:
|
|||
extras = clrs.overlay1,
|
||||
curr_file = clrs.maroon,
|
||||
curr_dir = clrs.flamingo,
|
||||
show_modified = true -- show if the file has been modified
|
||||
show_modified = false -- show if the file has been modified
|
||||
show_lazy_updates = false -- show the count of updatable plugins from lazy.nvim
|
||||
-- need to set checker.enabled = true in lazy.nvim first
|
||||
-- the icon is set in ui.icons.plugin in lazy.nvim
|
||||
},
|
||||
mode_colors = {
|
||||
["n"] = { "NORMAL", clrs.lavender },
|
||||
|
|
|
@ -32,6 +32,7 @@ local sett = {
|
|||
curr_file = C.maroon,
|
||||
curr_dir = C.flamingo,
|
||||
show_modified = false,
|
||||
show_lazy_updates = false,
|
||||
}
|
||||
|
||||
if require("catppuccin").flavour == "latte" then
|
||||
|
@ -139,12 +140,6 @@ 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
|
||||
|
@ -314,15 +309,9 @@ function M.get()
|
|||
|
||||
-- lazy.nvim updates
|
||||
components.active[1][14] = {
|
||||
provider = function()
|
||||
if has_lazy() then
|
||||
return require("lazy.status").updates()
|
||||
else
|
||||
return " "
|
||||
end
|
||||
end,
|
||||
provider = function() return require("lazy.status").updates() end,
|
||||
enabled = function()
|
||||
if has_lazy() then
|
||||
if sett.show_lazy_updates and pcall(require, "lazy") then
|
||||
return require("lazy.status").has_updates()
|
||||
else
|
||||
return false
|
||||
|
|
Loading…
Reference in a new issue