From e1d3e987718b1c9d83fdd724fa8595a96fb557dd Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Tue, 5 Nov 2019 10:03:40 -0500 Subject: [PATCH] Delegate all mode-specific find defs/refs to xref --- emacs/init.org | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/emacs/init.org b/emacs/init.org index 9dd2fea..d7a4e91 100755 --- a/emacs/init.org +++ b/emacs/init.org @@ -617,6 +617,12 @@ Emacs has a shell for every mood! (general-def 'motion help-mode-map "TAB" #'forward-button) #+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 #+BEGIN_SRC emacs-lisp (setq whitespace-line-column 80 @@ -1247,10 +1253,7 @@ Use nvm to manage node versions: Emacs support for the Language Server Protocol #+BEGIN_SRC emacs-lisp - (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 lsp-mode) (use-package company-lsp :after (company) @@ -1325,7 +1328,6 @@ Integrate with pyenv: :config (pyvenv-mode)) - (defun eshell/workon (name) (pyvenv-workon name)) @@ -2474,7 +2476,6 @@ Use evil keybindings by default: (use-package dumb-jump :config (dumb-jump-mode)) - (jdormit/define-prefix "c" "code") (leader-def-key "cj" 'dumb-jump-go) (leader-def-key "cp" 'dumb-jump-go-prompt) #+END_SRC