aboutsummaryrefslogtreecommitdiff
path: root/programs/neovim.nix
blob: f1089935c924c842e69ffc3f69a059c874a04a5d (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
{ config
, pkgs
, self
, ...
}:

{
  programs.neovim = {
    enable = true;
    extraConfig = builtins.readFile ./init.vim;
    withNodeJs = false;
    vimAlias = true;
    withPython3 = true;
    extraPackages = with pkgs; [
      gcc
      python37Packages.yapf
      hlint
      ocamlformat
      ocamlPackages.ocaml-lsp
    ];
    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
      elm-vim
      vim-nix
      vimtex

      # handy
      vim-gitgutter
      tabular
      emmet-vim
      vimwiki
      fzf-vim
    ];
  };
}