From 94ab832ba734117be59de4b63be31b426399da17 Mon Sep 17 00:00:00 2001 From: Howard Abrams Date: Mon, 20 Mar 2023 12:07:32 -0700 Subject: [PATCH] Fix lispyville mode hooks --- ha-programming-elisp.org | 2 +- ha-programming.org | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/ha-programming-elisp.org b/ha-programming-elisp.org index af647b6..334db5a 100644 --- a/ha-programming-elisp.org +++ b/ha-programming-elisp.org @@ -171,7 +171,7 @@ Use the ~>~ key to /slurp/ in outside objects into the current expression… in #+begin_src emacs-lisp (use-package lispyville :after lispy - :hook ((emacs-lisp-mode-hook lisp-mode-hook) . lispyville-mode) + :hook ((emacs-lisp-mode lisp-mode) . lispyville-mode) :config (lispyville-set-key-theme '(operators atom-movement diff --git a/ha-programming.org b/ha-programming.org index 4445e5f..b13976d 100644 --- a/ha-programming.org +++ b/ha-programming.org @@ -165,7 +165,6 @@ To take advantage of this, type: - ~z a~ :: Toggles open to close Note: Yes, we could use [[https://github.com/mrkkrp/vimish-fold][vimish-fold]] (and its cousin, [[https://github.com/alexmurray/evil-vimish-fold][evil-vimish-fold]]) and we’ll see if I need those. -** Navigation with dumb-jump ** Smart Parenthesis We need to make sure we keep the [[https://github.com/Fuco1/smartparens][smartparens]] project always in /strict mode/, because who wants to worry about paren-matching: #+begin_src emacs-lisp @@ -207,17 +206,17 @@ But one of those functions doesn’t exist: (end-of-defun) (beginning-of-defun)) #+end_src +*** dumb-jump Once upon a time, we use to create a =TAGS= file that contained the database for navigating code bases, but with new faster versions of grep, e.g. [[https://beyondgrep.com][ack]], [[https://github.com/ggreer/the_silver_searcher][ag]] (aka, the Silver Searcher), [[https://github.com/Genivia/ugrep][ugrep]] and [[https://github.com/BurntSushi/ripgrep][ripgrep]], we should be able to use them. but I want to: - Be in a function, and see its callers. For this, the [[help:rg-dwim][rg-dwim]] function is my bread-and-butter. - Be on a function, and jump to the definition. For this, I use [[https://github.com/jacktasia/dumb-jump][dumb-jump]], which uses the above utilities. #+begin_src emacs-lisp (use-package dumb-jump - :init - (setq dumb-jump-prefer-searcher 'rg) - :config - (setq xref-show-definitions-function #'xref-show-definitions-completing-read) + (setq dumb-jump-prefer-searcher 'rg + xref-history-storage #'xref-window-local-history + xref-show-definitions-function #'xref-show-definitions-completing-read) (add-hook 'xref-backend-functions #'dumb-jump-xref-activate) ;; (add-to-list 'evil-goto-definition-functions #'dumb-jump)