1
0
Fork 0

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 <lucas@priime.dev>
This commit is contained in:
Lucas Sta Maria 2024-12-07 23:07:01 -05:00
parent 88cf920079
commit 3d8b4e3ff3
No known key found for this signature in database
GPG key ID: F07FB16A826E3B47

View file

@ -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