diff --git a/lua/taken/plugins/bufferline.lua b/lua/taken/plugins/bufferline.lua index 07dfd9d..a2345d6 100644 --- a/lua/taken/plugins/bufferline.lua +++ b/lua/taken/plugins/bufferline.lua @@ -3,6 +3,7 @@ return { "akinsho/bufferline.nvim", version = "*", dependencies = "nvim-tree/nvim-web-devicons", + enabled = false, config = function() vim.keymap.set("n", "", ":BufferLineCycleNext ", { silent = true, desc = "Cycle tabs" }) vim.keymap.set("n", "bn", ":BufferLineCycleNext ", { silent = true, desc = "Next tab" }) @@ -66,6 +67,12 @@ return { tab_close = { guibg = "None", }, + tab_separator = { + guibg = "None", + }, + tab_separator_selected = { + guibg = "None", + }, }, }, }) diff --git a/lua/taken/plugins/lualine.lua b/lua/taken/plugins/lualine.lua index 3af77af..5cdff55 100644 --- a/lua/taken/plugins/lualine.lua +++ b/lua/taken/plugins/lualine.lua @@ -51,6 +51,32 @@ return { 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 = { "mode", separator = { left = "" }, @@ -120,6 +146,17 @@ return { 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 = { "filetype", color = { fg = colors.darkblue }, @@ -146,7 +183,7 @@ return { lualine_a = { mode }, lualine_b = { filename, branch }, lualine_c = { diagnostics, "%=", harpoon }, - lualine_x = { copilot, diff, fileformat, lazy }, + lualine_x = { copilot, diff, fileformat, lazy, mason }, lualine_y = { filetype, progress }, lualine_z = { location }, },