winbar only with nvim ^>= 0.8

This commit is contained in:
Oliver Hartmann 2022-09-09 20:51:18 +02:00
parent e72eaa724e
commit c19072c4cd

View File

@ -61,7 +61,8 @@ opt.foldlevel = 20
opt.foldmethod = 'expr'
opt.foldexpr = 'nvim_treesitter#foldexpr()'
local function status_line()
if vim.version().minor >= 8 then
local function status_line()
local file_name = "%-.32t"
local modified = " %-m"
local right_align = "%="
@ -76,6 +77,7 @@ local function status_line()
line_no,
pct_thru_file
)
end
end
opt.winbar = status_line()
opt.winbar = status_line()
end