Helm: Add Magit action to find-files
parent
ac3233cb8a
commit
6175c6e8e4
|
@ -299,4 +299,17 @@ With prefix argument, UPDATE the databases with custom uptions thanks to the
|
|||
|
||||
(global-set-key (kbd "C-<f4>") 'helm-execute-kmacro)
|
||||
|
||||
;; From https://github.com/thierryvolpiatto/emacs-tv-config/blob/master/init-helm.el:
|
||||
(defmethod helm-setup-user-source ((source helm-source-ffiles))
|
||||
(helm-source-add-action-to-source-if
|
||||
"Magit status"
|
||||
(lambda (_candidate)
|
||||
(magit-status helm-ff-default-directory))
|
||||
source
|
||||
(lambda (candidate)
|
||||
(and (not (string-match-p ffap-url-regexp candidate))
|
||||
helm-ff-default-directory
|
||||
(locate-dominating-file helm-ff-default-directory ".git")))
|
||||
1))
|
||||
|
||||
(provide 'init-helm)
|
||||
|
|
Loading…
Reference in New Issue