Starting to replace ha-local-leader for Major Mode Hydra

This commit is contained in:
Howard Abrams 2024-07-16 08:30:23 -07:00
parent 5c98dee1a0
commit 4a8dd29d68
2 changed files with 7 additions and 15 deletions

View file

@ -322,9 +322,7 @@ A feature I enjoyed from Spacemacs is the ability to evaluate the s-expression c
(if (region-active-p)
(eval-region (region-beginning) (region-end))
(unless (looking-at (rx (any ")" "]")))
(sp-end-of-sexp))
(sp-end-of-sexp)
(if (fboundp 'eros-eval-last-sexp)
(call-interactively 'eros-eval-last-sexp)
(call-interactively 'eval-last-sexp)))))

View file

@ -517,20 +517,14 @@ Once upon a time, we use to create a =TAGS= file that contained the database for
xref-show-definitions-function #'xref-show-definitions-completing-read)
(add-hook 'xref-backend-functions #'dumb-jump-xref-activate)
;; Never using the etags backend. GNU Global? Maybe.
(remove-hook 'xref-backend-functions #'etags--xref-backend))
#+end_src
;; Remove this now that https://github.com/jacktasia/dumb-jump/issues/338
;; (defun evil-set-jump-args (&rest ns) (evil-set-jump))
;; (advice-add 'dumb-jump-goto-file-line :before #'evil-set-jump-args)
(ha-local-leader :keymaps 'prog-mode-map
"s" '(:ignore t :which-key "search")
"s s" '("search" . xref-find-apropos)
"s d" '("definitions" . xref-find-definitions)
"s o" '("other window" . xref-find-definitions-other-window)
"s r" '("references" . xref-find-references)
"s b" '("back" . xref-go-back)
"s f" '("forward" . xref-go-forward))
While Im at it, lets connect various ~g~ sequence keys to =xref-= interface functions:
#+begin_src emacs-lisp
(use-package emacs
:general
(:states 'normal
"g ." '("find def" . xref-find-definitions)