aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie
diff options
context:
space:
mode:
authorMx Kookie <kookie@spacekookie.de>2020-12-31 11:21:50 +0100
committerMx Kookie <kookie@spacekookie.de>2020-12-31 11:21:50 +0100
commit31d9ff075c935cf4fe4d8b13ed530901481d4fb8 (patch)
treeb7dca2486c8c595fe6f620dc0cac3a3d2c6e855b /infra/libkookie
parentaefe49ed887042804d45b5c384af7ef0c3e12f7c (diff)
libkookie: emacs: add theme loading and rust mode
Diffstat (limited to 'infra/libkookie')
-rw-r--r--infra/libkookie/overlays/kookie/emacs/default.nix48
-rw-r--r--infra/libkookie/overlays/kookie/emacs/init.el2
-rw-r--r--infra/libkookie/overlays/kookie/emacs/rust/default.el10
-rw-r--r--infra/libkookie/overlays/kookie/emacs/rust/default.nix14
-rw-r--r--infra/libkookie/overlays/kookie/emacs/theme/default.el2
-rw-r--r--infra/libkookie/overlays/kookie/emacs/theme/default.nix5
6 files changed, 52 insertions, 29 deletions
diff --git a/infra/libkookie/overlays/kookie/emacs/default.nix b/infra/libkookie/overlays/kookie/emacs/default.nix
index ab61ec450549..be3a634fe47a 100644
--- a/infra/libkookie/overlays/kookie/emacs/default.nix
+++ b/infra/libkookie/overlays/kookie/emacs/default.nix
@@ -4,7 +4,7 @@ with (import ./builder.nix args);
pkgs.emacsWithPackages (epkgs:
let
include = path: (import path { inherit buildModule pkgs epkgs; });
- modules = [ ./base ./move-lines ./theme ];
+ modules = [ ./base ./move-lines ./theme ./rust ];
kookie-config = bootstrap (map (p: include p) modules);
in [
kookie-config
@@ -24,27 +24,27 @@ pkgs.emacsWithPackages (epkgs:
# python-mode
# rust-mode
- # color-identifiers-mode
- # color-theme-sanityinc-tomorrow
- # company
- # company-lsp
- # direnv
- # fzf
- # ido-vertical-mode
- # ledger-mode
- # lsp-ui
- # magit
- # monokai-theme
- # multiple-cursors
- # notmuch
- # org
- # protobuf-mode
- # scad-mode
- # smex
- # sublimity
- # treemacs
- # undo-tree
- # visual-fill-column
- # which-key
- # yasnippet
+ # color-identifiers-mode
+ # color-theme-sanityinc-tomorrow
+ # company
+ # company-lsp
+ # direnv
+ # fzf
+ # ido-vertical-mode
+ # ledger-mode
+ # lsp-ui
+ # magit
+ # monokai-theme
+ # multiple-cursors
+ # notmuch
+ # org
+ # protobuf-mode
+ # scad-mode
+ # smex
+ # sublimity
+ # treemacs
+ # undo-tree
+ # visual-fill-column
+ # which-key
+ # yasnippet
# ]))
diff --git a/infra/libkookie/overlays/kookie/emacs/init.el b/infra/libkookie/overlays/kookie/emacs/init.el
index 560e53df082c..5db8d806958b 100644
--- a/infra/libkookie/overlays/kookie/emacs/init.el
+++ b/infra/libkookie/overlays/kookie/emacs/init.el
@@ -62,7 +62,7 @@
(setq message-auto-save-directory backup-dir))
;; Explicitly enable lsp-mode for certain languages
-(add-hook 'rust-mode-hook #'lsp)
+
(add-hook 'c-mode-hook #'lsp)
(add-hook 'c++-mode-hook #'lsp)
diff --git a/infra/libkookie/overlays/kookie/emacs/rust/default.el b/infra/libkookie/overlays/kookie/emacs/rust/default.el
new file mode 100644
index 000000000000..7be109575535
--- /dev/null
+++ b/infra/libkookie/overlays/kookie/emacs/rust/default.el
@@ -0,0 +1,10 @@
+;;;
+
+(provide 'rust)
+
+;; Use rust-analyzer for completions
+(setq lsp-rust-server 'rust-analyzer)
+
+;; Start lsp mode for Rust buffers
+(add-hook 'rust-mode-hook #'lsp)
+
diff --git a/infra/libkookie/overlays/kookie/emacs/rust/default.nix b/infra/libkookie/overlays/kookie/emacs/rust/default.nix
new file mode 100644
index 000000000000..bb5e5e5841fb
--- /dev/null
+++ b/infra/libkookie/overlays/kookie/emacs/rust/default.nix
@@ -0,0 +1,14 @@
+{ buildModule, epkgs, pkgs }:
+
+with epkgs; with pkgs;
+(buildModule "rust" ./. [
+
+ # lsp integration
+ lsp-mode lsp-ui
+
+ # real-time diagnostigs
+ flycheck
+
+ # rust specifics
+ rust-mode rust-analyzer
+])
diff --git a/infra/libkookie/overlays/kookie/emacs/theme/default.el b/infra/libkookie/overlays/kookie/emacs/theme/default.el
index 2057b13b6191..324cdf502039 100644
--- a/infra/libkookie/overlays/kookie/emacs/theme/default.el
+++ b/infra/libkookie/overlays/kookie/emacs/theme/default.el
@@ -1,6 +1,8 @@
(provide 'theme)
+(load-theme 'sanityinc-tomorrow-eighties t)
+
(custom-set-variables
'(custom-safe-themes
'("628278136f88aa1a151bb2d6c8a86bf2b7631fbea5f0f76cba2a0079cd910f7d" default))
diff --git a/infra/libkookie/overlays/kookie/emacs/theme/default.nix b/infra/libkookie/overlays/kookie/emacs/theme/default.nix
index a80dc020367c..cd19253d957b 100644
--- a/infra/libkookie/overlays/kookie/emacs/theme/default.nix
+++ b/infra/libkookie/overlays/kookie/emacs/theme/default.nix
@@ -1,6 +1,3 @@
{ buildModule, pkgs, epkgs }:
with epkgs;
-(buildModule "theme" ./. [
- color-theme-sanityinc-tomorrow
- color-identifiers-mode
-])
+(buildModule "theme" ./. [ color-theme-sanityinc-tomorrow ])