set winbar statusline

This commit is contained in:
Oliver Hartmann 2022-06-26 13:22:46 +02:00
parent 3a0e386252
commit a1bff62966

View File

@ -55,3 +55,28 @@ opt.shortmess:append('sI')
opt.foldlevel = 20
opt.foldmethod = 'expr'
opt.foldexpr = 'nvim_treesitter#foldexpr()'
local function status_line()
local mode = "%-5{%v:lua.string.upper(v:lua.vim.fn.mode())%}"
local file_name = "%-.16t"
local buf_nr = "[%n]"
local modified = " %-m"
local file_type = " %y"
local right_align = "%="
local line_no = "%10([%l/%L%)]"
local pct_thru_file = "%5p%%"
return string.format(
"%s%s%s%s%s%s%s%s",
mode,
file_name,
buf_nr,
modified,
file_type,
right_align,
line_no,
pct_thru_file
)
end
opt.winbar = status_line()