Updated plugins

This commit is contained in:
2024-03-18 20:19:40 +01:00
parent 546b3c836d
commit 78413f7b13
2 changed files with 45 additions and 1 deletions

View File

@@ -3,6 +3,7 @@ return {
"akinsho/bufferline.nvim", "akinsho/bufferline.nvim",
version = "*", version = "*",
dependencies = "nvim-tree/nvim-web-devicons", dependencies = "nvim-tree/nvim-web-devicons",
enabled = false,
config = function() config = function()
vim.keymap.set("n", "<leader><Tab>", ":BufferLineCycleNext <CR>", { silent = true, desc = "Cycle tabs" }) vim.keymap.set("n", "<leader><Tab>", ":BufferLineCycleNext <CR>", { silent = true, desc = "Cycle tabs" })
vim.keymap.set("n", "<leader>bn", ":BufferLineCycleNext <CR>", { silent = true, desc = "Next tab" }) vim.keymap.set("n", "<leader>bn", ":BufferLineCycleNext <CR>", { silent = true, desc = "Next tab" })
@@ -66,6 +67,12 @@ return {
tab_close = { tab_close = {
guibg = "None", guibg = "None",
}, },
tab_separator = {
guibg = "None",
},
tab_separator_selected = {
guibg = "None",
},
}, },
}, },
}) })

View File

@@ -51,6 +51,32 @@ return {
t = colors.red, t = colors.red,
} }
local function mason_updates()
local registry = require("mason-registry")
local installed_packages = registry.get_installed_package_names()
local upgrades_available = false
local packages_outdated = 0
function myCallback(success, result_or_err)
if success then
upgrades_available = true
packages_outdated = packages_outdated + 1
end
end
for _, pkg in pairs(installed_packages) do
local p = registry.get_package(pkg)
if p then
p:check_new_version(myCallback)
end
end
if upgrades_available then
return packages_outdated
else
return 0
end
end
local mode = { local mode = {
"mode", "mode",
separator = { left = "" }, separator = { left = "" },
@@ -120,6 +146,17 @@ return {
end) end)
end, end,
} }
local mason = {
mason_updates() .. "",
color = { fg = colors.violet },
cond = function()
return mason_updates() > 0
end,
icon = "",
on_click = function()
vim.cmd("Mason")
end,
}
local filetype = { local filetype = {
"filetype", "filetype",
color = { fg = colors.darkblue }, color = { fg = colors.darkblue },
@@ -146,7 +183,7 @@ return {
lualine_a = { mode }, lualine_a = { mode },
lualine_b = { filename, branch }, lualine_b = { filename, branch },
lualine_c = { diagnostics, "%=", harpoon }, lualine_c = { diagnostics, "%=", harpoon },
lualine_x = { copilot, diff, fileformat, lazy }, lualine_x = { copilot, diff, fileformat, lazy, mason },
lualine_y = { filetype, progress }, lualine_y = { filetype, progress },
lualine_z = { location }, lualine_z = { location },
}, },