feat: new symlink_target to style the target of symbolic links

This commit is contained in:
sxyazi 2025-03-24 16:36:38 +08:00
parent 913a92d610
commit 6a8420f4b1
No known key found for this signature in database
4 changed files with 10 additions and 1 deletions

View file

@ -29,6 +29,9 @@ preview_hovered = { underline = true }
find_keyword = { fg = "yellow", bold = true, italic = true, underline = true }
find_position = { fg = "magenta", bg = "reset", bold = true, italic = true }
# Symlink
symlink_target = { italic = true }
# Marker
marker_copied = { fg = "lightgreen", bg = "lightgreen" }
marker_cut = { fg = "lightred", bg = "lightred" }

View file

@ -29,6 +29,9 @@ preview_hovered = { underline = true }
find_keyword = { fg = "yellow", bold = true, italic = true, underline = true }
find_position = { fg = "magenta", bg = "reset", bold = true, italic = true }
# Symlink
symlink_target = { italic = true }
# Marker
marker_copied = { fg = "lightgreen", bg = "lightgreen" }
marker_cut = { fg = "lightred", bg = "lightred" }

View file

@ -44,6 +44,9 @@ pub struct Mgr {
find_keyword: Style,
find_position: Style,
// Symlink
symlink_target: Style,
// Marker
marker_copied: Style,
marker_cut: Style,

View file

@ -73,7 +73,7 @@ function Entity:symlink()
end
local to = self._file.link_to
return to and ui.Span(string.format(" -> %s", to)):italic() or ""
return to and ui.Span(string.format(" -> %s", to)):style(th.mgr.symlink_target) or ""
end
function Entity:redraw()