aboutsummaryrefslogtreecommitdiff
path: root/nix/users/fcuny/emacs.nix
blob: 9b7bbe8c8d6d7292919ab775e64fec1872e3bf0e (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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
{ pkgs, ... }:
let
  packages =
    epkgs: with epkgs; [
      # completion
      cape
      consult
      corfu
      marginalia
      orderless
      vertico

      # development
      git-link
      direnv
      docker
      docker-compose-mode
      dockerfile-mode
      go-mode
      gotest
      hcl-mode
      jq-mode
      json-mode
      json-reformat
      magit
      nix-mode
      protobuf-mode
      terraform-mode
      toml-mode
      tree-sitter
      tree-sitter-langs
      treesit-grammars.with-all-grammars
      yaml-mode

      # misc
      exec-path-from-shell
      rg
      yasnippet
      yasnippet-capf
    ];
in
{
  home.file.".config/emacs/early-init.el".source = ./configs/emacs/early-init.el;
  home.file.".config/emacs/init.el".source = ./configs/emacs/init.el;

  programs.emacs = {
    enable = true;
    extraPackages = packages;
    package = pkgs.emacs.override { withNativeCompilation = false; };
  };

  home.packages = with pkgs; [
    aspell
    aspellDicts.en
    aspellDicts.en-science
    aspellDicts.en-computers
  ];

  home.sessionVariables = {
    EDITOR = "${pkgs.emacs}/bin/emacsclient -a=";
  };
}