From e5b552bab73cbd9410198c5eaf050245376c8a03 Mon Sep 17 00:00:00 2001 From: rootiest Date: Tue, 24 Sep 2024 14:48:30 -0400 Subject: [PATCH] feat: add detailed status messages for updater terminal states --- lua/plugins/nvim_updater.lua | 1 + lua/plugins/statusline/lualine.lua | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/lua/plugins/nvim_updater.lua b/lua/plugins/nvim_updater.lua index c08cdad..f72cabd 100644 --- a/lua/plugins/nvim_updater.lua +++ b/lua/plugins/nvim_updater.lua @@ -2,6 +2,7 @@ local data = require("data") return { -- Neovim Updater "rootiest/nvim-updater.nvim", + lazy = false, opts = { verbose = false, check_for_updates = true, diff --git a/lua/plugins/statusline/lualine.lua b/lua/plugins/statusline/lualine.lua index 38b90e6..91a8d04 100644 --- a/lua/plugins/statusline/lualine.lua +++ b/lua/plugins/statusline/lualine.lua @@ -197,19 +197,26 @@ return { -- Lualine LazyVim.lualine.pretty_path(), padding = { left = 0, right = 0 }, cond = function() - return vim.bo.filetype ~= "neovim_updater_term" + return not string.find(vim.bo.filetype, "neovim_updater_term") end, }, { -- Neovim Updater function() - return "Neovim Updating.." + local ft = vim.bo.filetype + if ft == "neovim_updater_term.updating" then + return "Neovim Updating.." + elseif ft == "neovim_updater_term.cloning" then + return "Neovim Source Cloning.." + elseif ft == "neovim_updater_term.changes" then + return "Neovim Source Changelog" + end end, icon = "󰅢 ", color = "lualine_a_terminal", separator = { left = "", right = "" }, padding = { left = 0, right = 0 }, cond = function() - return vim.bo.filetype == "neovim_updater_term" + return string.find(vim.bo.filetype, "neovim_updater_term") ~= nil end, }, }, @@ -302,7 +309,7 @@ return { -- Lualine end, padding = { left = 1, right = 1 }, cond = function() - return vim.bo.filetype ~= "neovim_updater_term" + return not string.find(vim.bo.filetype, "neovim_updater_term") end, }, }, @@ -369,6 +376,7 @@ return { -- Lualine }, { -- Encoding "encoding", + show_bomb = true, padding = { left = 0, right = 1 }, separator = "", icon = "󱁻",