style(nvim-lualine)

This commit is contained in:
thek4n 2024-04-04 13:03:45 +03:00
parent 2ddc7c2f51
commit 7d8e1c3e22

View File

@ -23,7 +23,7 @@ return {
config = function() config = function()
require("lualine").setup({ require("lualine").setup({
options = { options = {
component_separators = { left = '/', right = '' }, component_separators = { left = '', right = '' },
}, },
sections = { sections = {
lualine_a = {'mode'}, lualine_a = {'mode'},
@ -32,13 +32,28 @@ return {
{ {
'vim.fn.getcwd()', 'vim.fn.getcwd()',
fmt = function(str) fmt = function(str)
return str:gsub(os.getenv("HOME"), "~") local res = str
res = str:gsub(os.getenv("HOME"), "~")
return res
end, end,
color = { fg = 'white', gui='bold' }, color = { fg = 'white', gui='bold' },
padding = { left = 1, right = 0 } padding = { left = 1, right = 0 }
}, },
{ {
'filename', 'filename',
fmt = function(str)
local res = str
if string.sub(res, 1, 1) == '/' then
res = " " .. res
else
res = "/" .. res
end
return res
end,
file_status = true, file_status = true,
path = 1, path = 1,
padding = { left = 0, right = 1 } padding = { left = 0, right = 1 }