1
0
Fork 0
mirror of https://github.com/pnx/dotfiles synced 2026-06-16 11:24:55 +02:00

nvim: update statusline config

This commit is contained in:
Henrik Hautakoski 2024-09-08 13:38:56 +02:00
parent 058b658b85
commit 9bade906b1

View file

@ -6,6 +6,14 @@ local function indent_settings()
.. (vim.bo.shiftwidth == 0 and vim.bo.tabstop or vim.bo.shiftwidth)
end
local function is_not_popup()
local types = {
"TelescopePrompt"
}
return not vim.tbl_contains(types, vim.bo.filetype)
end
return {
"nvim-lualine/lualine.nvim",
event = "VeryLazy",
@ -57,10 +65,7 @@ return {
},
sections = {
lualine_a = {
{
"mode",
separator = "|"
},
"mode",
},
lualine_b = {
{"branch"},
@ -98,6 +103,7 @@ return {
lualine_c = {
{
"filename",
cond = is_not_popup,
path = 1,
symbols = vim.tbl_deep_extend("force", icons.file_status, {
unnamed = "",
@ -105,14 +111,16 @@ return {
},
},
lualine_x = {
"filetype",
{
"filetype",
cond = is_not_popup
},
"fileformat",
-- '(vim.bo.expandtab and "SPC" or "TAB") .. " " .. (vim.bo.shiftwidth == 0 and vim.bo.tabstop or vim.bo.shiftwidth)',
indent_settings,
},
lualine_y = {
"location",
"progress",
"location",
"progress",
},
lualine_z = {},
},