summaryrefslogtreecommitdiff
path: root/lisp/km-helm.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/km-helm.el')
-rw-r--r--lisp/km-helm.el13
1 files changed, 13 insertions, 0 deletions
diff --git a/lisp/km-helm.el b/lisp/km-helm.el
index 5295e2a..eda178b 100644
--- a/lisp/km-helm.el
+++ b/lisp/km-helm.el
@@ -68,5 +68,18 @@
(display-buffer (find-file-noselect f)
'(display-buffer-below-selected)))))))
+(defvar km/helm-etags-mode-map
+ (let ((map (make-sparse-keymap)))
+ (define-key map (kbd "M-.") #'helm-etags-select)
+ map))
+
+(define-minor-mode km/helm-etags-mode
+ "Override `xref-find-definitions' with `helm-etags-select'."
+ :keymap km/helm-etags-mode-map)
+
+(defun km/helm-maybe-override-xref ()
+ (when (helm-etags-find-tag-file-directory default-directory)
+ (km/helm-etags-mode 1)))
+
(provide 'km-helm)
;;; km-helm.el ends here