Replies: 1 comment
-
|
I have the same problem here, I used the same approach as you except I use buffers in the tabline instead of actual tabs, it still follows the general theme (same as the status bar). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using the "auto" theme config and, unlike what it does for the winbar, lualine colors the "empty" part of the tabline; I'd like to de-emphasize it (I use this bright green to indicate the currently selected / focused window).
How can I change that fill color?
And how can I change the
winbarandstatuslinecomponents and empty space to follow theStatusLineNChighlight for non-current windows. I don't want colors per mode--there are so many modes and colors that they have no specific meanings for me and become visual noise, and cursor shape & color work for me, especially because and that's where my eyes are when editing)?Many thanks!!! And thanks for the amazing plugin!
Here are the relevant vim highlights; lualine seems to be ignoring
StatusLineNC:Here's my config so far:
{ dir = "~/github/lualine.nvim", dependencies = { "nvim-tree/nvim-web-devicons", "SmiteshP/nvim-navic" }, opts = function() local empty_separators = { left = "", right = "" }; local winbar = { lualine_a = { { "filename", path = 1, -- 1: relative path color = "StatusLine", fmt = function(s) -- "<filename> <readonly>?<saved>" local s1 = s:gsub(" %[%+%]", "") local modified = (#s1 ~= #s) local s2 = s1:gsub(" %[%-%]", "") local readonly = (#s2 ~= #s1) return s2 .. " " .. (readonly and "%5*%*" or "") .. (modified and "%4*•%*" or " ") end, } }, lualine_b = { { "diagnostics", always_visible = true, sources = { 'nvim_diagnostic' }, on_click = function() Snacks.picker.diagnostics() end, fmt = function(s) local buffer_has_lsp = #vim.lsp.get_clients({ bufnr = 0 }) > 0; if buffer_has_lsp then if s:find(" 0 ") then if #vim.lsp.status() > 0 then local spinners = { "⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏" }; local ms = vim.loop.hrtime() / 1000000; local frame = math.floor(ms / 120) % #spinners; local replacement = spinners[frame + 1]; return s:gsub(" %d ", " " .. replacement .. " "):gsub(" %d$", " " .. replacement) else return s:gsub(" 0 ", " · "):gsub(" 0$", " ·") end end end return " "; end, }, }, lualine_c = { { "navic", color = { bg = "Black", }, }, }, lualine_x = {}, lualine_y = {}, lualine_z = {}, }; local tabline = { lualine_a = { { "tabs", } }, lualine_b = { { function() if #vim.lsp.status() > 0 then return require('lsp-progress').progress(); end return " "; end, color = { fg = "LightGreen", bg = "Black", }, } }, lualine_c = {}, lualine_x = {}, lualine_y = {}, lualine_z = {}, }; local function handle_fileinfo_click() vim.notify( "fileformat: " .. vim.bo.fileformat .. "\n" .. "filetype: " .. vim.bo.filetype .. "\n" .. "fileencoding: " .. vim.bo.fileencoding .. "\n" .. "\n" .. "shiftwidth: " .. vim.bo.shiftwidth .. "\n" .. "tabstop: " .. vim.bo.tabstop .. "\n" .. "expandtab: " .. tostring(vim.bo.expandtab) .. "\n" .. "textwidth: " .. vim.bo.textwidth ); end; local statusline = { lualine_a = {}, lualine_b = {}, lualine_c = {}, lualine_x = {}, lualine_y = {}, lualine_z = { "diff", { function() local warnings = {}; local enc = (vim.bo.fenc or vim.go.enc); if enc ~= "utf-8" then table.insert(warnings, enc); end local fmt = "" .. vim.bo.fileformat; if fmt ~= "unix" then table.insert(warnings, fmt); end return table.concat(warnings, " "); end, color = { bg = "Orange" }, on_click = handle_fileinfo_click, }, { "location", on_click = handle_fileinfo_click, }, }, }; return { options = { icons_enabled = true, theme = "auto", component_separators = empty_separators, -- work around tabline attempt to concat nil val section_separators = empty_separators, disabled_filetypes = { statusline = {}, winbar = {}, }, ignore_focus = {}, always_divide_middle = true, always_show_tabline = true, globalstatus = false, refresh = { statusline = 100, tabline = 100, winbar = 100, } }, sections = statusline, inactive_sections = statusline, tabline = tabline, winbar = winbar, inactive_winbar = winbar, extensions = {} } end, },Beta Was this translation helpful? Give feedback.
All reactions