aboutsummaryrefslogtreecommitdiff
path: root/share/home/helix.nix
blob: c7b7caddb998f92e581be3c23eae03f6a3227fc8 (plain)
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
{ pkgs, ... }: {
  programs.helix = {
    enable = true;
    defaultEditor = true;

    extraPackages = with pkgs; [
      rust-analyzer
      rustfmt
      nil
      nixfmt
      python311Packages.python-lsp-server
      clang-tools
      black
    ];

    settings = {
      theme = "tokyonight";
      editor = {
        line-number = "relative";
        cursor-shape = {
          insert = "bar";
          normal = "block";
          select = "underline";
        };
        whitespace.render = {
          space = "all";
          tab = "all";
          newline = "none";
        };
        whitespace.characters = {
          space = "·";
          nbsp = "⍽";
          tab = "→";
          newline = "⏎";
          tabpad = "·"; # Tabs will look like "→···" (depending on tab width)
        };
        cursorline = true;
        lsp.display-messages = true;
      };
    };
  };
}