Fix lispyville mode hooks

This commit is contained in:
Howard Abrams 2023-03-20 12:07:32 -07:00
parent 4be00bd345
commit 94ab832ba7
2 changed files with 5 additions and 6 deletions

View file

@ -171,7 +171,7 @@ Use the ~>~ key to /slurp/ in outside objects into the current expression… in
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package lispyville (use-package lispyville
:after lispy :after lispy
:hook ((emacs-lisp-mode-hook lisp-mode-hook) . lispyville-mode) :hook ((emacs-lisp-mode lisp-mode) . lispyville-mode)
:config :config
(lispyville-set-key-theme '(operators atom-movement (lispyville-set-key-theme '(operators atom-movement

View file

@ -165,7 +165,6 @@ To take advantage of this, type:
- ~z a~ :: Toggles open to close - ~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 well see if I need those. 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 well see if I need those.
** Navigation with dumb-jump
** Smart Parenthesis ** 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: 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 #+begin_src emacs-lisp
@ -207,17 +206,17 @@ But one of those functions doesnt exist:
(end-of-defun) (end-of-defun)
(beginning-of-defun)) (beginning-of-defun))
#+end_src #+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: 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 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. - 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 #+begin_src emacs-lisp
(use-package dumb-jump (use-package dumb-jump
:init
(setq dumb-jump-prefer-searcher 'rg)
:config :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-hook 'xref-backend-functions #'dumb-jump-xref-activate)
;; (add-to-list 'evil-goto-definition-functions #'dumb-jump) ;; (add-to-list 'evil-goto-definition-functions #'dumb-jump)