You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: support wiki style media links, improve custom links
## Details
Request: #410
Avoids rendering links if they contain a nested `shortcut_link`. This
avoid the double placement of icons and instead only uses the
`shortcut_link` based rendering. A link in a link will have the same
structure as a `wikilink` so really that is the rendering logic that
will ultimately get used.
To then allow a larger variety of icons to be configured have also
expanded custom link functionality. They now have 2 additional optional
properties, `kind` & `priority`.
- kind: changes how the pattern is matched against link destinations
- pattern: uses the existing lua pattern mechanism, is also the
default behavior if no value is set to avoid any breaking changes
- suffix: when set does a simple `vim.endswith` check, can be used to
easier support file extension matching
- because of how this is setup adding more kinds should be trivial
- priority: used when multiple patterns match a destination to decide
which to use, highest value wins, allows users more control rather
than being stuck with current behavior, uses the length of the pattern
if no value is set to avoid any changes to behavior out of the box
0 commit comments