[Utils] Improve definitions of custom helm sources
Instead of giving a list, we now create the sources directly. This gives us the possibility to configure certain aspects of the sources like matching behavior and highlighting. Now we are much closer to the standard behavior of helm than before.
This commit is contained in:
parent
d28e51f5e6
commit
43ece81b2d
|
@ -353,10 +353,10 @@ output, separated by \\n, when called with
|
||||||
;;; helm configuration
|
;;; helm configuration
|
||||||
|
|
||||||
(defvar db/helm-source-frequently-used-features
|
(defvar db/helm-source-frequently-used-features
|
||||||
'((name . "Frequently Used")
|
(helm-make-source "Frequently Used" 'helm-source-sync
|
||||||
(candidates . db/frequently-used-features)
|
:candidates #'db/frequently-used-features
|
||||||
(action . (("Open" . funcall)))
|
:action '(("Open" . funcall))
|
||||||
(filtered-candidate-transformer . helm-adaptive-sort))
|
:filtered-candidate-transformer #'helm-adaptive-sort)
|
||||||
"Helm source for `db/helm-frequently-used-features’.")
|
"Helm source for `db/helm-frequently-used-features’.")
|
||||||
|
|
||||||
(defun db/important-documents ()
|
(defun db/important-documents ()
|
||||||
|
@ -399,10 +399,10 @@ path."
|
||||||
(start-process "" nil "xdg-open" path))))
|
(start-process "" nil "xdg-open" path))))
|
||||||
|
|
||||||
(defvar db/helm-source-important-documents
|
(defvar db/helm-source-important-documents
|
||||||
'((name . "Important files")
|
(helm-make-source "Important files" 'helm-source-sync
|
||||||
(candidates . db/important-documents)
|
:candidates #'db/important-documents
|
||||||
(action . (("Open externally" . db/system-open)
|
:action '(("Open externally" . db/system-open)
|
||||||
("Find file" . find-file))))
|
("Find file" . find-file)))
|
||||||
"Helm source for important documents.")
|
"Helm source for important documents.")
|
||||||
|
|
||||||
(defun db/helm-shortcuts (arg)
|
(defun db/helm-shortcuts (arg)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user