summaryrefslogtreecommitdiff
path: root/modules/emacs/package.nix
blob: 9bebd0fd484442976c4682b2568247d4b16551d6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{ pkgs }: let
  outside-emacs = with pkgs; [
    git
    nil
    ripgrep
    emacs-lsp-booster
    delta
  ];
in 
  pkgs.emacsWithPackagesFromUsePackage {
    package = pkgs.emacs-unstable.override {
      withGTK3 = true;
      withNativeCompilation = true;
      withAlsaLib = true;
      withSystemd = true;
      withToolkitScrollBars = true;
      withImageMagick = true;
    };
    override = epkgs: let
      callPackage = pkgs.lib.callPackageWith (pkgs // epkgs);
    in epkgs // {
      eglot-booster = callPackage ./eglot-booster.nix {};
    };
    config = ./README.org;
    alwaysTangle = true;
    defaultInitFile = true;
    extraEmacsPackages = epkgs: [
      (epkgs.treesit-grammars.with-grammars (g: with g; [
        tree-sitter-rust
        tree-sitter-python
      ]))
    ] ++ outside-emacs;
  }