Plugin update
This commit is contained in:
@@ -70,16 +70,18 @@ return {
|
||||
end
|
||||
end
|
||||
|
||||
if upgrades_available then
|
||||
return packages_outdated
|
||||
else
|
||||
return 0
|
||||
end
|
||||
-- if upgrades_available then
|
||||
-- return packages_outdated
|
||||
-- else
|
||||
-- return 0
|
||||
-- end
|
||||
|
||||
return 1
|
||||
end
|
||||
|
||||
local mode = {
|
||||
"mode",
|
||||
separator = { left = "" },
|
||||
separator = { left = "", right = "" },
|
||||
right_padding = 2,
|
||||
color = function()
|
||||
return { bg = mode_color[vim.fn.mode()], fg = colors.bg }
|
||||
@@ -87,12 +89,12 @@ return {
|
||||
}
|
||||
local filename = {
|
||||
"filename",
|
||||
color = { fg = colors.magenta, gui = "bold" },
|
||||
color = { fg = colors.magenta, bg = "None", gui = "bold" },
|
||||
}
|
||||
local branch = {
|
||||
"branch",
|
||||
icon = "",
|
||||
color = { fg = colors.violet, gui = "bold" },
|
||||
color = { fg = colors.violet, bg = "None", gui = "bold" },
|
||||
on_click = function()
|
||||
vim.cmd("Neogit")
|
||||
end,
|
||||
@@ -102,40 +104,54 @@ return {
|
||||
sources = { "nvim_diagnostic" },
|
||||
symbols = { error = " ", warn = " ", info = " " },
|
||||
diagnostics_color = {
|
||||
color_error = { fg = colors.red },
|
||||
color_warn = { fg = colors.yellow },
|
||||
color_info = { fg = colors.cyan },
|
||||
color_error = { fg = colors.red, bg = "None", gui = "bold" },
|
||||
color_warn = { fg = colors.yellow, bg = "None", gui = "bold" },
|
||||
color_info = { fg = colors.cyan, bg = "None", gui = "bold" },
|
||||
},
|
||||
color = { bg = mode, gui = "bold" },
|
||||
}
|
||||
local harpoon = {
|
||||
"harpoon2",
|
||||
indicators = { "1", "2", "3", "4" },
|
||||
active_indicators = { "[1]", "[2]", "[3]", "[4]" },
|
||||
separator = " ",
|
||||
color = { bg = "None", gui = "bold" },
|
||||
}
|
||||
local copilot = {
|
||||
"copilot",
|
||||
symbols = {
|
||||
status = {
|
||||
hl = {
|
||||
enabled = colors.green,
|
||||
sleep = colors.yellow,
|
||||
disabled = colors.bg,
|
||||
warning = colors.orange,
|
||||
unknown = colors.red,
|
||||
},
|
||||
},
|
||||
},
|
||||
show_colors = true,
|
||||
color = { bg = "None", gui = "bold" },
|
||||
}
|
||||
local diff = {
|
||||
"diff",
|
||||
symbols = { added = " ", modified = " ", removed = " " },
|
||||
diff_color = {
|
||||
added = { fg = colors.green },
|
||||
modified = { fg = colors.orange },
|
||||
removed = { fg = colors.red },
|
||||
added = { fg = colors.green, bg = "None" },
|
||||
modified = { fg = colors.orange, bg = "None" },
|
||||
removed = { fg = colors.red, bg = "None" },
|
||||
},
|
||||
cond = conditions.hide_in_width,
|
||||
}
|
||||
local fileformat = {
|
||||
"fileformat",
|
||||
fmt = string.upper,
|
||||
color = { fg = colors.green, gui = "bold" },
|
||||
color = { fg = colors.green, bg = "None", gui = "bold" },
|
||||
}
|
||||
local lazy = {
|
||||
require("lazy.status").updates,
|
||||
cond = require("lazy.status").has_updates,
|
||||
color = { fg = colors.violet },
|
||||
color = { fg = colors.violet, bg = "None" },
|
||||
on_click = function()
|
||||
local confirmation = vim.ui.select({ "Yes", "No" }, { prompt = "Update plugins?" }, function(choice)
|
||||
if choice == "Yes" then
|
||||
@@ -148,7 +164,7 @@ return {
|
||||
}
|
||||
local mason = {
|
||||
mason_updates() .. "",
|
||||
color = { fg = colors.violet },
|
||||
color = { fg = colors.violet, bg = "None" },
|
||||
cond = function()
|
||||
return mason_updates() > 0
|
||||
end,
|
||||
@@ -159,30 +175,34 @@ return {
|
||||
}
|
||||
local filetype = {
|
||||
"filetype",
|
||||
color = { fg = colors.darkblue },
|
||||
color = { fg = colors.darkblue, bg = "None" },
|
||||
}
|
||||
local progress = {
|
||||
"progress",
|
||||
color = { fg = colors.magenta },
|
||||
color = { fg = colors.magenta, bg = "None" },
|
||||
}
|
||||
local location = {
|
||||
"location",
|
||||
separator = { right = "" },
|
||||
separator = { left = "", right = "" },
|
||||
left_padding = 2,
|
||||
color = function()
|
||||
return { bg = mode_color[vim.fn.mode()], fg = colors.bg }
|
||||
end,
|
||||
}
|
||||
local sep = {
|
||||
"%=",
|
||||
color = { fg = colors.bg, bg = "None" },
|
||||
}
|
||||
|
||||
lualine.setup({
|
||||
options = {
|
||||
component_separators = "",
|
||||
section_separators = { left = "", right = "" },
|
||||
section_separators = { left = "", right = "" },
|
||||
},
|
||||
sections = {
|
||||
lualine_a = { mode },
|
||||
lualine_b = { filename, branch },
|
||||
lualine_c = { diagnostics, "%=", harpoon },
|
||||
lualine_c = { diagnostics, sep, harpoon },
|
||||
lualine_x = { copilot, diff, fileformat, lazy, mason },
|
||||
lualine_y = { filetype, progress },
|
||||
lualine_z = { location },
|
||||
|
||||
Reference in New Issue
Block a user