feat: new symlink_target to style the target of symbolic links (#2522)

This commit is contained in:
三咲雅 · Misaki Masa 2025-03-24 16:39:20 +08:00 committed by GitHub
parent 913a92d610
commit 83f4deecfe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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()