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)