From e49fbf7eaf11e61007e0e53cd7694913e9ea5a35 Mon Sep 17 00:00:00 2001 From: Martin Larsson Date: Sat, 6 Jul 2024 15:39:21 +0200 Subject: [PATCH] Fix lualine separator visualizers, additionally add a custom section for resizing mode. Finally, add buffers section. --- home/.config/nvim/lua/plugs/lualine.lua | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/home/.config/nvim/lua/plugs/lualine.lua b/home/.config/nvim/lua/plugs/lualine.lua index ed51e19..312d246 100644 --- a/home/.config/nvim/lua/plugs/lualine.lua +++ b/home/.config/nvim/lua/plugs/lualine.lua @@ -1,3 +1,13 @@ +local wm = require("window_management") + +local function resize_mode() + if wm.is_in_resizing_mode() then + return "▲ Resizing ▼" + else + return "" + end +end + return { "nvim-lualine/lualine.nvim", dependencies = { @@ -14,14 +24,20 @@ return { require("lualine").setup { options = { theme = catppuccin_theme, - section_separators = { "", "" }, - component_separators = { "", "" }, + section_separators = { + left = "", + right = "", + }, + component_separators = { + left = "", + right = "" + }, icons_enabled = true, }, sections = { lualine_a = { "mode" }, - lualine_b = { "branch" }, - lualine_c = {}, + lualine_b = { "branch", resize_mode }, + lualine_c = { "buffers" }, lualine_x = { "encoding", "fileformat", "filetype" }, lualine_y = { "progress" }, lualine_z = { "location" }