From 3d8b4e3ff36739586ede4c2d26290c022b041f1a Mon Sep 17 00:00:00 2001 From: Lucas Sta Maria Date: Sat, 7 Dec 2024 23:07:01 -0500 Subject: [PATCH] fix(emacs): configure LSP correctly for rust `(use-package rust-mode ... :hook (rust-mode . eglot))` would error when generating my blog pages, since for some reason `eglot` expected more than zero arguments. This was also redundant, since `eglot`'s package already configured `eglot-ensure` for the correct modes. *Solution*: remove the hooks. `rustic` apparently requires specific configuration of `rustic-lsp-client`. During generation, it kept asking to install `lsp-mode`: > lsp-mode not found. Install it ? (y or n) Since `lsp-mode` is apparently the default. *Solution*: explicitly set `eglot` as the default. Signed-off-by: Lucas Sta Maria --- .emacs.d/include/priime-languages.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.emacs.d/include/priime-languages.el b/.emacs.d/include/priime-languages.el index 8a2d3e4..4f6ba67 100644 --- a/.emacs.d/include/priime-languages.el +++ b/.emacs.d/include/priime-languages.el @@ -61,9 +61,9 @@ ("\\.pm$" . pollen-mode) ("\\.pmd$" . pollen-mode)) auto-mode-alist))) -(use-package rust-mode :straight t - :hook (rust-mode . eglot)) -(use-package rustic :straight t) +(use-package rust-mode :straight t) +(use-package rustic :straight t + :custom (rustic-lsp-client 'eglot)) (use-package rjsx-mode :straight t) (use-package poetry :straight t) (use-package sly :straight t