mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
feat: new symlink_target to style the target of symbolic links (#2522)
This commit is contained in:
parent
913a92d610
commit
83f4deecfe
4 changed files with 10 additions and 1 deletions
|
|
@ -29,6 +29,9 @@ preview_hovered = { underline = true }
|
||||||
find_keyword = { fg = "yellow", bold = true, italic = true, underline = true }
|
find_keyword = { fg = "yellow", bold = true, italic = true, underline = true }
|
||||||
find_position = { fg = "magenta", bg = "reset", bold = true, italic = true }
|
find_position = { fg = "magenta", bg = "reset", bold = true, italic = true }
|
||||||
|
|
||||||
|
# Symlink
|
||||||
|
symlink_target = { italic = true }
|
||||||
|
|
||||||
# Marker
|
# Marker
|
||||||
marker_copied = { fg = "lightgreen", bg = "lightgreen" }
|
marker_copied = { fg = "lightgreen", bg = "lightgreen" }
|
||||||
marker_cut = { fg = "lightred", bg = "lightred" }
|
marker_cut = { fg = "lightred", bg = "lightred" }
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,9 @@ preview_hovered = { underline = true }
|
||||||
find_keyword = { fg = "yellow", bold = true, italic = true, underline = true }
|
find_keyword = { fg = "yellow", bold = true, italic = true, underline = true }
|
||||||
find_position = { fg = "magenta", bg = "reset", bold = true, italic = true }
|
find_position = { fg = "magenta", bg = "reset", bold = true, italic = true }
|
||||||
|
|
||||||
|
# Symlink
|
||||||
|
symlink_target = { italic = true }
|
||||||
|
|
||||||
# Marker
|
# Marker
|
||||||
marker_copied = { fg = "lightgreen", bg = "lightgreen" }
|
marker_copied = { fg = "lightgreen", bg = "lightgreen" }
|
||||||
marker_cut = { fg = "lightred", bg = "lightred" }
|
marker_cut = { fg = "lightred", bg = "lightred" }
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,9 @@ pub struct Mgr {
|
||||||
find_keyword: Style,
|
find_keyword: Style,
|
||||||
find_position: Style,
|
find_position: Style,
|
||||||
|
|
||||||
|
// Symlink
|
||||||
|
symlink_target: Style,
|
||||||
|
|
||||||
// Marker
|
// Marker
|
||||||
marker_copied: Style,
|
marker_copied: Style,
|
||||||
marker_cut: Style,
|
marker_cut: Style,
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ function Entity:symlink()
|
||||||
end
|
end
|
||||||
|
|
||||||
local to = self._file.link_to
|
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
|
end
|
||||||
|
|
||||||
function Entity:redraw()
|
function Entity:redraw()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue