feat(emacs): Replace LSP-mode with eglot
LSP-mode in combination with the Rust language server does not really work as RLS is extremely unstable. This switches over to eglot, which automatically restarts RLS after every crash. From initial testing it seems to be slightly less annoying than the previous setup.
This commit is contained in:
parent
59cd0bbd8b
commit
6939aa9b3d
2 changed files with 15 additions and 7 deletions
18
emacs.nix
18
emacs.nix
|
@ -1,5 +1,4 @@
|
||||||
# Derivation for Emacs configured with the packages that I need:
|
# Derivation for Emacs configured with the packages that I need:
|
||||||
|
|
||||||
{ pkgs }:
|
{ pkgs }:
|
||||||
|
|
||||||
let emacsWithPackages = with pkgs; (emacsPackagesNgGen emacs).emacsWithPackages;
|
let emacsWithPackages = with pkgs; (emacsPackagesNgGen emacs).emacsWithPackages;
|
||||||
|
@ -58,6 +57,20 @@ nix-mode = with pkgs; emacsPackagesNg.melpaBuild {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# The default Rust language server mode is not really usable, install
|
||||||
|
# `eglot` instead and hope for the best.
|
||||||
|
eglot = with pkgs; emacsPackagesNg.melpaBuild rec {
|
||||||
|
pname = "eglot";
|
||||||
|
version = "0.8";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "joaotavora";
|
||||||
|
repo = "eglot";
|
||||||
|
rev = version;
|
||||||
|
sha256 = "1avsry84sp3s2vr2iz9dphm579xgw8pqlwffl75gn5akykgazwdx";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
in emacsWithPackages(epkgs:
|
in emacsWithPackages(epkgs:
|
||||||
# Pinned packages (from unstable):
|
# Pinned packages (from unstable):
|
||||||
(with pkgs; with lib; attrValues pinnedEmacs) ++
|
(with pkgs; with lib; attrValues pinnedEmacs) ++
|
||||||
|
@ -91,7 +104,6 @@ in emacsWithPackages(epkgs:
|
||||||
haskell-mode
|
haskell-mode
|
||||||
ht
|
ht
|
||||||
idle-highlight-mode
|
idle-highlight-mode
|
||||||
intero
|
|
||||||
kotlin-mode
|
kotlin-mode
|
||||||
magit
|
magit
|
||||||
multi-term
|
multi-term
|
||||||
|
@ -116,5 +128,5 @@ in emacsWithPackages(epkgs:
|
||||||
]) ++
|
]) ++
|
||||||
|
|
||||||
# Custom packaged Emacs packages:
|
# Custom packaged Emacs packages:
|
||||||
[ sly sly-company nix-mode pkgs.notmuch ]
|
[ sly sly-company nix-mode eglot pkgs.notmuch ]
|
||||||
)
|
)
|
||||||
|
|
|
@ -49,7 +49,6 @@ in {
|
||||||
# Override various Emacs packages from unstable:
|
# Override various Emacs packages from unstable:
|
||||||
pinnedEmacs = with unstable.emacsPackagesNg; {
|
pinnedEmacs = with unstable.emacsPackagesNg; {
|
||||||
inherit
|
inherit
|
||||||
company-lsp
|
|
||||||
counsel
|
counsel
|
||||||
counsel-tramp
|
counsel-tramp
|
||||||
exwm
|
exwm
|
||||||
|
@ -57,9 +56,6 @@ in {
|
||||||
ivy-gitlab
|
ivy-gitlab
|
||||||
ivy-hydra
|
ivy-hydra
|
||||||
ivy-pass
|
ivy-pass
|
||||||
lsp-mode
|
|
||||||
lsp-rust
|
|
||||||
lsp-ui
|
|
||||||
markdown-mode
|
markdown-mode
|
||||||
markdown-toc
|
markdown-toc
|
||||||
swiper;
|
swiper;
|
||||||
|
|
Loading…
Reference in a new issue