ref(nvim-lualine)

This commit is contained in:
thek4n 2024-04-05 08:50:06 +03:00
parent 9c5fc4147d
commit c96fdfba56

View File

@ -18,6 +18,10 @@ function DETECT_INDENT_TYPE()
end end
end end
local function is_absolute_path(path)
return string.sub(path, 1, 1) == '/' or string.sub(path, 1, 1) == '~'
end
return { return {
'nvim-lualine/lualine.nvim', 'nvim-lualine/lualine.nvim',
config = function() config = function()
@ -46,7 +50,7 @@ return {
fmt = function(str) fmt = function(str)
local res = str local res = str
if string.sub(res, 1, 1) == '/' then if is_absolute_path(res) then
res = " " .. res res = " " .. res
else else
res = "/" .. res res = "/" .. res