Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display indentation in lualine #3

Open
aquaherd opened this issue Nov 27, 2023 · 0 comments
Open

Display indentation in lualine #3

aquaherd opened this issue Nov 27, 2023 · 0 comments

Comments

@aquaherd
Copy link
Owner

aquaherd commented Nov 27, 2023

local indent = {
    function()
        local style = vim.bo.expandtab and "Spaces" or "Tab Size"
        local size = vim.bo.expandtab and vim.bo.tabstop or vim.bo.shiftwidth
        return style .. ": " .. size
    end,
    cond = function()
        return vim.bo.filetype ~= ""
    end,
}

-- in your lualine section
-- ...
sections = {
    -- ...
    lualine_x = { indent, 'encoding', 'fileformat', 'filetype' },
    -- ...
},

-- ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant