From bbe189d70be102c5f76acdd10f09c442f1e67778 Mon Sep 17 00:00:00 2001 From: Robert Morrison Date: Fri, 10 Apr 2026 02:53:58 +0100 Subject: [PATCH] feat(lualine): enable winbar support This also refactors the spec to fit all the other ones --- lua/plugins/spec/lualine.lua | 134 +++++++++++++++++++++++++---------- 1 file changed, 95 insertions(+), 39 deletions(-) diff --git a/lua/plugins/spec/lualine.lua b/lua/plugins/spec/lualine.lua index 416f8d0..cb29a99 100644 --- a/lua/plugins/spec/lualine.lua +++ b/lua/plugins/spec/lualine.lua @@ -1,46 +1,102 @@ +---@module "lazy.nvim" +---@type LazySpec[] return { - "nvim-lualine/lualine.nvim", - dependencies = { - "nvim-tree/nvim-web-devicons", - "sherlock5512/lualine-spell-status", - }, - opts = { - options = { - theme = "auto", - component_separators = { left = "|", right = "|" }, - section_separators = { left = "", right = "" }, - disabled_filetypes = {}, - always_divide_middle = true, - globalstatus = true, + {"nvim-lualine/lualine.nvim", + dependencies = { + "nvim-tree/nvim-web-devicons", + "sherlock5512/lualine-spell-status", }, - sections = { - lualine_a = { - "mode", - "spell_status", + opts = { + options = { + theme = "auto", + component_separators = { left = "|", right = "|" }, + section_separators = { left = "", right = "" }, + disabled_filetypes = { + winbar = { + 'neo-tree', + 'help', + 'snacks_dashboard', + 'telescope', + 'trouble' + }, + }, + always_divide_middle = true, + globalstatus = true, }, - lualine_b = { - "branch", - "diff", - "diagnostics", + sections = { + lualine_a = { + "mode", + "spell_status", + "lsp_status", + }, + lualine_b = { + "branch", + "diff", + "diagnostics", + }, + lualine_c = { + { "filename", path = 1 }, + { "filetype", icon_only = true }, + }, + lualine_x = { + "encoding", + "fileformat", + "filetype", + { require("lazy.status").updates, cond = require("lazy.status").has_updates }, + }, + lualine_y = { + "progress", + "searchcount", + }, + lualine_z = { + "location", + }, }, - lualine_c = { - { "filename", path = 1 }, - { "filetype", icon_only = true }, - }, - lualine_x = { - "encoding", - "fileformat", - "filetype", - { require("lazy.status").updates, cond = require("lazy.status").has_updates }, - }, - lualine_y = { - "progress", - "searchcount", - }, - lualine_z = { - "location", + tabline = {}, + winbar = { + lualine_a = { + { + "buffers", + mode = 3, + show_modified_status = false, + icons_enabled = false, + }, + { + "filetype", + icon_only = true, + }, + { + "filename", + file_status = false, + newfile_status = false, + path = 0, + symbols = { + modified = '', + readonly = '', + unnamed = '', + newfile = '', + }, + }, + }, }, + winbar_inactive = { + lualine_a = { + { + "filename", + file_status = false, + newfile_status = false, + path = 0, + symbols = { + modified = '', + readonly = '', + unnamed = '', + newfile = '', + }, + disabled_filetypes = { 'neo-tree' } + }, + } + } }, - tabline = {}, - }, + + } }