From 69785157382a627544dcaf917e1162577b8b7ae9 Mon Sep 17 00:00:00 2001 From: Katharina Fey Date: Tue, 9 Nov 2021 14:38:15 +0100 Subject: [PATCH] libkookie: update emacs config --- .../overlays/kookie/emacs/base/default.el | 3 +++ .../overlays/kookie/emacs/base/default.nix | 8 +++++++- infra/libkookie/overlays/kookie/emacs/builder.nix | 14 +++++++++----- infra/libkookie/overlays/kookie/emacs/default.nix | 3 +++ .../libkookie/overlays/kookie/emacs/org/default.el | 7 +++++++ .../overlays/kookie/emacs/org/default.nix | 2 +- 6 files changed, 30 insertions(+), 7 deletions(-) diff --git a/infra/libkookie/overlays/kookie/emacs/base/default.el b/infra/libkookie/overlays/kookie/emacs/base/default.el index 498e249417d..dda590c7f8b 100644 --- a/infra/libkookie/overlays/kookie/emacs/base/default.el +++ b/infra/libkookie/overlays/kookie/emacs/base/default.el @@ -77,6 +77,9 @@ ;;; Capn Proto mode (add-to-list 'auto-mode-alist '("\\.capnp$" . protobuf-mode)) +;;; Load centaur tabl and treemacs on new init +(require 'centaur-tabs) +(require 'treemacs) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Function definitions diff --git a/infra/libkookie/overlays/kookie/emacs/base/default.nix b/infra/libkookie/overlays/kookie/emacs/base/default.nix index 157eed18701..78f27bb493b 100644 --- a/infra/libkookie/overlays/kookie/emacs/base/default.nix +++ b/infra/libkookie/overlays/kookie/emacs/base/default.nix @@ -1,3 +1,9 @@ { buildModule, pkgs, epkgs }: + with epkgs; -(buildModule "base" ./. [ direnv smex sublimity scad-mode protobuf-mode ]) +(buildModule "base" ./. [ + centaur-tabs + direnv + smex + sublimity +]) diff --git a/infra/libkookie/overlays/kookie/emacs/builder.nix b/infra/libkookie/overlays/kookie/emacs/builder.nix index 45a02e3eced..77b76e4afbe 100644 --- a/infra/libkookie/overlays/kookie/emacs/builder.nix +++ b/infra/libkookie/overlays/kookie/emacs/builder.nix @@ -12,15 +12,19 @@ rec { /** * Create a new elisp module with a set of package dependencies. * + * When calling this function three arguments are required. It + * returns a "module", which is an attribute set. + * * { * name = "base"; - * lisp = ./default.el; - * deps = [ pkgs.hello ]; + * path = ./.; + * pkgs = [ hello ]; * } * - * The lisp path is the main file contained in the nix store, and deps - * contains a set of emacsPackages, and base packages that the module - * depends on to function. + * The path must point to the root of the module, which is then used + * as an offset. The pkgs set may contain both emacs and non-emacs + * packages that the module depends on to function. depends on to + * function. */ buildModule = with pkgs; (name: path: pkgs: { inherit name pkgs; diff --git a/infra/libkookie/overlays/kookie/emacs/default.nix b/infra/libkookie/overlays/kookie/emacs/default.nix index 5d20d515af2..142d2419e3b 100644 --- a/infra/libkookie/overlays/kookie/emacs/default.nix +++ b/infra/libkookie/overlays/kookie/emacs/default.nix @@ -30,7 +30,9 @@ pkgs.emacsWithPackages (epkgs: markdown-mode nim-mode nix-mode + protobuf-mode raku-mode + scad-mode # Utility moduse fzf @@ -38,6 +40,7 @@ pkgs.emacsWithPackages (epkgs: treemacs undo-tree visual-fill-column + vterm which-key ]) diff --git a/infra/libkookie/overlays/kookie/emacs/org/default.el b/infra/libkookie/overlays/kookie/emacs/org/default.el index 2dc75237975..800225834fa 100644 --- a/infra/libkookie/overlays/kookie/emacs/org/default.el +++ b/infra/libkookie/overlays/kookie/emacs/org/default.el @@ -9,6 +9,9 @@ (provide 'kookie-org) (require 'org) +(require 'ox-reveal) + +(load-library "ox-reveal") ;;; Set .org as my file ending of choice (add-to-list 'auto-mode-alist '("\\.org$" . org-mode)) @@ -25,6 +28,10 @@ )) (org-open-at-point))) +(defun org-insert-block () + "Insert a matching set of blocks statements" + (interactive)) + ;;; Org mode key bindings replicated here to make it easier for me (define-key org-mode-map "\C-c\C-o" 'org-open-at-point-in-current-window) (define-key org-mode-map "\C-S-" nil) diff --git a/infra/libkookie/overlays/kookie/emacs/org/default.nix b/infra/libkookie/overlays/kookie/emacs/org/default.nix index 382f00d07f4..1ff637c1ef6 100644 --- a/infra/libkookie/overlays/kookie/emacs/org/default.nix +++ b/infra/libkookie/overlays/kookie/emacs/org/default.nix @@ -1,4 +1,4 @@ { buildModule, epkgs, pkgs }: with epkgs; with pkgs; -(buildModule "kookie-org" ./. [ org ]) +(buildModule "kookie-org" ./. [ org ox-reveal ])