Delegate all mode-specific find defs/refs to xref

This commit is contained in:
Jeremy Dormitzer 2019-11-05 10:03:40 -05:00
parent 2d96cc2586
commit e1d3e98771

View File

@ -617,6 +617,12 @@ Emacs has a shell for every mood!
(general-def 'motion help-mode-map "TAB" #'forward-button) (general-def 'motion help-mode-map "TAB" #'forward-button)
#+END_SRC #+END_SRC
** Code commands
#+BEGIN_SRC emacs-lisp
(jdormit/define-prefix "c" "code")
(general-def 'normal "SPC cd" #'xref-find-definitions)
(general-def 'normal "SPC cr" #'xref-find-references)
#+END_SRC
* Whitespace Visualation * Whitespace Visualation
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(setq whitespace-line-column 80 (setq whitespace-line-column 80
@ -1247,10 +1253,7 @@ Use nvm to manage node versions:
Emacs support for the Language Server Protocol Emacs support for the Language Server Protocol
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package lsp-mode (use-package lsp-mode)
:config
(general-def 'normal lsp-mode-map "SPC cd" #'lsp-find-definition)
(general-def 'normal lsp-mode-map "SPC cr" #'lsp-find-references))
(use-package company-lsp (use-package company-lsp
:after (company) :after (company)
@ -1325,7 +1328,6 @@ Integrate with pyenv:
:config :config
(pyvenv-mode)) (pyvenv-mode))
(defun eshell/workon (name) (defun eshell/workon (name)
(pyvenv-workon name)) (pyvenv-workon name))
@ -2474,7 +2476,6 @@ Use evil keybindings by default:
(use-package dumb-jump (use-package dumb-jump
:config (dumb-jump-mode)) :config (dumb-jump-mode))
(jdormit/define-prefix "c" "code")
(leader-def-key "cj" 'dumb-jump-go) (leader-def-key "cj" 'dumb-jump-go)
(leader-def-key "cp" 'dumb-jump-go-prompt) (leader-def-key "cp" 'dumb-jump-go-prompt)
#+END_SRC #+END_SRC