about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@gmail.com>2018-06-03T20·35+0200
committerVincent Ambo <tazjin@gmail.com>2018-06-03T20·35+0200
commit6939aa9b3df2ebf304705833c17ba4483f9fc6ba (patch)
treeb1b81b5023ffde944f5b37355e79145bd0a46141
parent59cd0bbd8b76dc886ca4d1e3d6c613d7393a8fd3 (diff)
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.
-rw-r--r--emacs.nix18
-rw-r--r--packages.nix4
2 files changed, 15 insertions, 7 deletions
diff --git a/emacs.nix b/emacs.nix
index e5780812df..8700ac6454 100644
--- a/emacs.nix
+++ b/emacs.nix
@@ -1,5 +1,4 @@
 # Derivation for Emacs configured with the packages that I need:
-
 { pkgs }:
 
 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:
   # Pinned packages (from unstable):
   (with pkgs; with lib; attrValues pinnedEmacs) ++
@@ -91,7 +104,6 @@ in emacsWithPackages(epkgs:
     haskell-mode
     ht
     idle-highlight-mode
-    intero
     kotlin-mode
     magit
     multi-term
@@ -116,5 +128,5 @@ in emacsWithPackages(epkgs:
   ]) ++
 
   # Custom packaged Emacs packages:
-  [ sly sly-company nix-mode pkgs.notmuch ]
+  [ sly sly-company nix-mode eglot pkgs.notmuch ]
 )
diff --git a/packages.nix b/packages.nix
index a0163eedc7..4c96ebb9e5 100644
--- a/packages.nix
+++ b/packages.nix
@@ -49,7 +49,6 @@ in {
       # Override various Emacs packages from unstable:
       pinnedEmacs = with unstable.emacsPackagesNg; {
         inherit
-          company-lsp
           counsel
           counsel-tramp
           exwm
@@ -57,9 +56,6 @@ in {
           ivy-gitlab
           ivy-hydra
           ivy-pass
-          lsp-mode
-          lsp-rust
-          lsp-ui
           markdown-mode
           markdown-toc
           swiper;