From 24177998deb685c7a8bb6a792d187d74878f1e02 Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Wed, 5 Apr 2023 11:17:13 -0400 Subject: [PATCH] Switch out flycheck for flymake and add eglot keybindings --- emacs/.emacs.d/config/init-ide.el | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/emacs/.emacs.d/config/init-ide.el b/emacs/.emacs.d/config/init-ide.el index 2ec2aa8..90de730 100644 --- a/emacs/.emacs.d/config/init-ide.el +++ b/emacs/.emacs.d/config/init-ide.el @@ -15,12 +15,6 @@ ([remap indent-for-tab-command] #'company-indent-or-complete-common) ([remap c-indent-line-or-region] #'company-indent-or-complete-common)) -;; Flycheck gives you error squigglies -(use-package flycheck - :hook (after-init . global-flycheck-mode) - :custom - (flycheck-disabled-checkers '(emacs-lisp-checkdoc emacs-lisp))) - ;; Quick file overview for supported modes (use-package imenu :straight (:type built-in) @@ -47,6 +41,21 @@ `(html-web-mode . ,(eglot-alternatives '(("vscode-html-language-server" "--stdio") ("html-languageserver" "--stdio"))))) + :init + (defvar eglot-prefix-map (make-sparse-keymap) + "Prefix keymap for eglot commands.") + (general-def eglot-prefix-map + "a" #'eglot-code-actions + "r" #'eglot-reconnect + "s" #'eglot-shutdown + "R" #'eglot-rename + "f" #'eglot-format-buffer + "i" #'eglot-code-action-organize-imports + "h" #'eldoc + "e" #'flymake-show-buffer-diagnostics + "E" #'flymake-show-project-diagnostics) + :general + (eglot-mode-map "C-c l" `(,eglot-prefix-map :which-key "eglot")) :hook (java-mode . eglot-ensure) (rust-mode . eglot-ensure)