vim: make lualine config clearer with some comments

This commit is contained in:
Fernando Schauenburg 2022-02-06 23:19:48 +01:00
parent ea887c4af4
commit 0945175fe5

View file

@ -28,7 +28,12 @@ local paste = {
color = { fg = colors.base3, bg = colors.yellow, gui = 'bold' }, color = { fg = colors.base3, bg = colors.yellow, gui = 'bold' },
cond = function() return vim.opt.paste:get() end cond = function() return vim.opt.paste:get() end
} }
local relative_path = { 'filename', path = 1 }
local relative_path = {
'filename',
path = 1 -- 0: just filenane, 1: realtive path, 2: absolute path
}
local encoding = function () local encoding = function ()
local fenc = vim.opt.fileencoding:get() local fenc = vim.opt.fileencoding:get()
if fenc ~= '' then if fenc ~= '' then
@ -36,7 +41,10 @@ local encoding = function ()
end end
return vim.opt.encoding:get() return vim.opt.encoding:get()
end end
-- let padding when using icons leaves too much space
local fileformat = { 'fileformat', padding = { left = 0, right = 1} } local fileformat = { 'fileformat', padding = { left = 0, right = 1} }
local progress = '%3l/%L%-2v' -- line / total column local progress = '%3l/%L%-2v' -- line / total column
require('lualine').setup { require('lualine').setup {