feat(lualine): add modified_sign to pretty_path (#2754)

Closes #2752

I left the initial text blank on purpose, so that it doesn't change
anything stylistically and let the user decide what he wants to add
in his personal configuration for `lualine` spec.
This commit is contained in:
Iordanis Petkakis 2024-03-19 23:28:31 +02:00 committed by GitHub
parent 6a37171df6
commit ed44b246b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -80,6 +80,7 @@ function M.pretty_path(opts)
modified_hl = "MatchParen",
directory_hl = "",
filename_hl = "Bold",
modified_sign = "",
}, opts or {})
return function(self)
@ -106,6 +107,7 @@ function M.pretty_path(opts)
end
if opts.modified_hl and vim.bo.modified then
parts[#parts] = parts[#parts] .. opts.modified_sign
parts[#parts] = M.format(self, parts[#parts], opts.modified_hl)
else
parts[#parts] = M.format(self, parts[#parts], opts.filename_hl)