dotemacs

My Emacs configuration
git clone git://git.entf.net/dotemacs
Log | Files | Refs | LICENSE

commit 67fe06fbeb68e543af064f725f3256a283893c50
parent 0c68037c0f69526fcabd6bf4ae1e131baec8593f
Author: Lukas Henkel <lh@entf.net>
Date:   Mon, 18 Oct 2021 18:42:31 +0200

Use eglot instead of lsp-mode

lsp-mode never worked well for me. It's also a lot of configuration,
eglot is much simpler and is enough for my use case.

Diffstat:
Mconfig.org | 33+++++++++++++--------------------
1 file changed, 13 insertions(+), 20 deletions(-)

diff --git a/config.org b/config.org @@ -381,29 +381,22 @@ Disable tabs for indenting in any lisps, I really hate this. (use-package lua-mode :straight t) #+end_src -** LSP and DAP +** LSP Using the language server protocol, we can support a lot of different programming languages #+begin_src emacs-lisp - (use-package lsp-mode + (use-package eglot :straight t - :init - (setq lsp-keymap-prefix "C-c l") - :hook ((go-mode . lsp-mode) - (csharp-mode . lsp-mode) - (lsp-mode . lsp-enable-which-key-integration)) - :commands lsp) - - (use-package lsp-ui - :straight t - :commands lsp-ui-mode - :init - (setq lsp-ui-sideline-show-diagnostics t) - :bind (:map lsp-mode-map - ("M-ß" . lsp-ui-peek-find-definitions) - ("M-?" . lsp-ui-peek-find-references))) - - (use-package dap-mode - :straight t) + :hook ((go-mode . eglot-ensure) + (c-mode . eglot-ensure) + (csharp-mode . eglot-ensure)) + :bind (:map eglot-mode-map + ("C-c r" . eglot-rename) + ("C-c h" . eldoc) + ("C-c f" . eglot-format) + ("C-c F" . eglot-format-buffer)) + :config + (add-to-list 'eglot-server-programs + '(csharp-mode . ("omnisharp" "-lsp")))) #+end_src ** JSON #+begin_src emacs-lisp