Add +link-hint-map

This commit is contained in:
Case Duckworth 2022-01-05 11:24:46 -06:00
parent b2980816c5
commit f66b316f8a
2 changed files with 9 additions and 1 deletions

View File

@ -1081,7 +1081,12 @@ See also `crux-reopen-as-root-mode'."
(:require +link-hint)
(+link-hint-setup-open-secondary)
(:option link-hint-avy-style 'at-full)
(:+key "M-l" #'+link-hint-open-link))
(:+key "M-l" +link-hint-map)
(:with-map +link-hint-map
(:bind "M-l" #'+link-hint-open-link "l" #'+link-hint-open-link
"M-m" #'link-hint-open-multiple-links
"m" #'link-hint-open-multiple-links
"M-c" #'link-hint-copy-link "c" #'link-hint-copy-link)))
(setup (:straight marginalia)
(marginalia-mode +1))

View File

@ -22,6 +22,9 @@
w3m-message-link)
"Link types to define `:open-secondary' for.")
(defvar +link-hint-map (make-sparse-keymap)
"Keymap for `link-hint' functionality.")
(defun +link-hint-setup-open-secondary (&optional types)
"Define the `:open-secondary' link-hint type for TYPES.
If TYPES is nil, define it for `+link-hint-open-secondary-types'."