From d2f6170b8e7da5c5a26797a9e2da97965d472d62 Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Sat, 20 Feb 2021 17:49:36 -0500 Subject: [PATCH] Fix xref keybinds and add LSP mode --- emacs/.emacs.d/config/init-ide.el | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/emacs/.emacs.d/config/init-ide.el b/emacs/.emacs.d/config/init-ide.el index 6faf127..ad93f5c 100644 --- a/emacs/.emacs.d/config/init-ide.el +++ b/emacs/.emacs.d/config/init-ide.el @@ -19,9 +19,32 @@ ;; Find definition/references (use-package xref :straight (:type built-in) + :config + (evil-collection-xref-setup) :general (normal "M-." #'xref-find-definitions) (normal "M-," #'xref-pop-marker-stack) - (normal "M-r" #'xref-find-references)) + (normal "M-r" #'xref-find-references) + :custom + (xref-prompt-for-identifier nil)) + +;; Full-on IDE functionality via LSP mode +(use-package lsp-mode + :hook + (python-mode . lsp-deferred) + (rust-mode . lsp-deferred) + (go-mode . lsp-deferred) + (sh-mode . lsp-deferred) + :config + (add-hook 'lsp-mode-hook #'lsp-enable-which-key-integration) + :custom + (lsp-keymap-prefix "C-c l") + (lsp-headerline-breadcrumb-enable nil) + (lsp-file-watch-threshold 100000) + :general + ("C-c l" lsp-mode-map :which-key "lsp")) + +(use-package lsp-ui + :after lsp) (provide 'init-ide)