Add xref support for LaTeX

This commit is contained in:
contrapunctus 2022-02-11 15:34:27 +05:30
parent 8a267574ab
commit b302052dbb
1 changed files with 25 additions and 1 deletions

View File

@ -1032,6 +1032,7 @@ Don't try to check if there are files with a certain extension...it will lead to
((derived-mode-p 'sh-mode) (my-shell-hydra/body))
((derived-mode-p 'sql-mode) (my-sql-hydra/body))
((derived-mode-p 'comint-mode) (my-comint-hydra/body))
((derived-mode-p 'tex-mode) (my-tex-hydra/body))
(t (my-general-hydra/body))))
(use-package boon
@ -1080,6 +1081,13 @@ Don't try to check if there are files with a certain extension...it will lead to
("r" comint-next-prompt "next"))
#+END_SRC
*** LaTeX
#+BEGIN_SRC emacs-lisp
(my-defhydra my-tex-hydra (:color blue)
("j" xref-find-definitions "Jump to definition")
("h" my-help-hydra/body "Help"))
#+END_SRC
** marginalia
:PROPERTIES:
:CREATED: 2022-01-16T00:28:51+0530
@ -3048,7 +3056,9 @@ PR ideas
("m" . #'mu4e-headers-mark-for-something)
("u" . #'mu4e-headers-mark-for-unmark)
("Q" . #'mu4e-mark-execute-all)
("+" . #'my-mu4e-mkdir))
("+" . #'my-mu4e-mkdir)
("h" . #'mu4e-headers-prev-unread)
("s" . #'mu4e-headers-next-unread))
(:map mu4e-view-mode-map
("c" . #'mu4e-view-headers-prev)
("r" . #'mu4e-view-headers-next))
@ -4449,6 +4459,14 @@ Used by Eldev documentation.
:CUSTOM_ID: programming
:END:
** FIXME common [%]
*** xref
#+BEGIN_SRC emacs-lisp
(use-package xref
:bind (:map xref--xref-buffer-mode-map
("c" . #'xref-prev-line)
("r" . #'xref-next-line)))
#+END_SRC
*** swap keys :disabled:
1. [X] =keyswap-mode= swaps numeric keys with symbols by default. We want to swap just () with [] (to begin with), but the code below doesn't work, for some reason.
2. [ ] Does not always work in the minibuffer, namely =eval-expression=
@ -4751,6 +4769,12 @@ Create advice for =lispy-pair= - if =lispy--in-string-or-comment-p= is true, sel
("c" . previous-line))))
#+END_SRC
*** dump-jump
#+BEGIN_SRC emacs-lisp
(use-package dumb-jump
:init (add-hook 'xref-backend-functions #'dumb-jump-xref-activate))
#+END_SRC
** lisp
:PROPERTIES:
:CREATED: 2022-01-13T21:03:15+0530