winbar only with nvim ^>= 0.8
This commit is contained in:
parent
e72eaa724e
commit
c19072c4cd
@ -61,21 +61,23 @@ opt.foldlevel = 20
|
|||||||
opt.foldmethod = 'expr'
|
opt.foldmethod = 'expr'
|
||||||
opt.foldexpr = 'nvim_treesitter#foldexpr()'
|
opt.foldexpr = 'nvim_treesitter#foldexpr()'
|
||||||
|
|
||||||
local function status_line()
|
if vim.version().minor >= 8 then
|
||||||
local file_name = "%-.32t"
|
local function status_line()
|
||||||
local modified = " %-m"
|
local file_name = "%-.32t"
|
||||||
local right_align = "%="
|
local modified = " %-m"
|
||||||
local line_no = "%10([%l/%L%)]"
|
local right_align = "%="
|
||||||
local pct_thru_file = "%5p%%"
|
local line_no = "%10([%l/%L%)]"
|
||||||
|
local pct_thru_file = "%5p%%"
|
||||||
|
|
||||||
return string.format(
|
return string.format(
|
||||||
"%s%s%s%s%s",
|
"%s%s%s%s%s",
|
||||||
file_name,
|
file_name,
|
||||||
modified,
|
modified,
|
||||||
right_align,
|
right_align,
|
||||||
line_no,
|
line_no,
|
||||||
pct_thru_file
|
pct_thru_file
|
||||||
)
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
opt.winbar = status_line()
|
||||||
end
|
end
|
||||||
|
|
||||||
opt.winbar = status_line()
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user