nvim-lualine / lualine.nvim

A blazing fast and easy to configure neovim statusline plugin written in pure lua.
MIT License
6.02k stars 462 forks source link

Feat: Middle custom options #1211

Open TakenMC opened 6 months ago

TakenMC commented 6 months ago

Requested feature

Could you add an option for customizing the middle portion of the lualine in between sections c and x with options to change the separation character and highlights of the space

Motivation

I been trying to make a transparent lualine - the left and right pills. Tho i can't make the last part transparent

image

Ajaymamtora commented 6 months ago

Sorry this is irrelevant but could you send me your lualine & theme config please?

TakenMC commented 6 months ago

Sorry this is irrelevant but could you send me your lualine & theme config please?

lualine I actually did a temp fix by specifying the theme as a table which i didnt know you can do so now it is transparent

Ajaymamtora commented 6 months ago

Sorry this is irrelevant but could you send me your lualine & theme config please?

lualine

I actually did a temp fix by specifying the theme as a table which i didnt know you can do so now it is transparent

Thanks!

shadmansaleh commented 6 months ago

The bubles example config does something similar (left light pills will transparency)

lualine background colors precedence basically goes like this:

components color > themes color > screens color

whenever a higher level fails it falls back on a lower level color.

screen color is what you see as trasparent. so if you remove bg from theme color you'll get trasparent background.

TakenMC commented 6 months ago

well i use a plugin that sets the hl values of set items to be transparent since apperantly not all plugins link their hl to normal normalfloat etc.

Parsifa1 commented 2 months ago

@TakenMC maybe you can try this:

config = function()
        local auto = require "lualine.themes.auto"
        local lualine_modes = { "insert", "normal", "visual", "command", "replace", "inactive", "terminal" }
        for _, field in ipairs(lualine_modes) do
            if auto[field] and auto[field].c then
                auto[field].c.bg = "NONE"
            end
        end
        opts.options.theme = auto
        require("lualine").setup(opts)
    end,

you can still use the auto-generated theme and with transparent middle image