aboutsummaryrefslogtreecommitdiff
path: root/programs/neovim.nix
blob: 08a1adaa16c0d59eaf8f343fda62ac0d3be702ac (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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
{ config
, pkgs
, self
, ...
}:

{
  programs.neovim = {
    enable = true;
    extraConfig = builtins.readFile ./init.vim;
    withNodeJs = false;
    vimAlias = true;
    withPython3 = true;
    extraPackages = with pkgs; [
      # gcc
      python311Packages.yapf
      nodePackages.bash-language-server
      # hlint
      # ocamlformat
    ];
    plugins = with pkgs.vimPlugins; [
      # neovim only
      nvim-lspconfig
      (nvim-treesitter.withPlugins (_: pkgs.tree-sitter.allGrammars))
      nvim-cmp

      # tree-sitter dev
      playground

      # completion sources
      cmp-nvim-lsp
      cmp-buffer
      cmp-path
      cmp-cmdline

      # tpope
      vim-surround
      vim-unimpaired
      vim-repeat
      vim-fugitive

      # syntax
      rust-vim
      haskell-vim
      vim-nix

      # handy
      tabular
      fzf-vim

      # motion
      leap-nvim
    ] ++ [
      # own
      pkgs.better-text-objs
      pkgs.vim-colors-plain
    ];
  };
}