From 751bec6eb2d03b3e86c72a810504e83ec8b5cb5c Mon Sep 17 00:00:00 2001 From: larstvei Date: Sun, 26 Feb 2023 16:47:28 +0100 Subject: [PATCH] Remove lsp, add eglot --- init.org | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/init.org b/init.org index 4020616..da9cef9 100644 --- a/init.org +++ b/init.org @@ -203,9 +203,6 @@ ivy-posframe ; Using posframe to show Ivy jedi ; Python auto-completion for Emacs js2-mode ; Improved JavaScript editing mode - lsp-java ; Java support for lsp-mode - lsp-mode ; LSP mode - lsp-ui ; UI modules for lsp-mode magit ; control Git from Emacs markdown-mode ; Emacs Major mode for Markdown-formatted files maude-mode ; Emacs mode for the programming language Maude @@ -868,19 +865,6 @@ #+END_SRC * Mode specific -** LSP - - LSP mode works really well, especially with languages like Java, which - traditionally has had quite poor Emacs support. - - #+BEGIN_SRC emacs-lisp - (with-eval-after-load 'lsp-mode - (define-key lsp-mode-map (kbd "C-c f") lsp-command-map) - (add-hook 'lsp-mode-hook #'lsp-enable-which-key-integration) - (add-hook 'lsp-mode-hook #'yas-minor-mode) - (add-hook 'lsp-mode-hook (lambda () (lsp-headerline-breadcrumb-mode 0))) - (add-to-list 'lsp-file-watch-ignored-directories "[/\\\\]\\.hypothesis\\'")) - #+END_SRC ** Compilation @@ -1040,7 +1024,7 @@ activated. #+BEGIN_SRC emacs-lisp - (add-hook 'java-mode-hook 'lsp) + (add-hook 'java-mode-hook 'eglot-ensure) #+END_SRC ** Assembler @@ -1219,8 +1203,14 @@ ** Rust #+begin_src emacs-lisp - (setq lsp-rust-server 'rust-analyzer) - (setq lsp-rust-analyzer-cargo-watch-command "clippy") + (add-hook 'rust-mode-hook 'eglot-ensure) + #+end_src + +** Go + + #+begin_src emacs-lisp + (add-to-list 'auto-mode-alist '("\\.go\\'" . go-mode)) + (add-hook 'go-mode-hook 'eglot-ensure) #+end_src * Key bindings