-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
87 lines (71 loc) · 2.07 KB
/
flake.nix
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
{
description =
"golang development environment (neovim + nvim_lsp + treesitter)";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
vimrc = ''
source ${pkgs.fzf.out}/share/vim-plugins/fzf/plugin/fzf.vim
lua << EOF
${builtins.readFile ./base-neovim-config.lua}
EOF
${builtins.readFile ./extra-neovim-config.vim};
'';
# bat.vim syntax highlighting:
bat-vim = pkgs.vimUtils.buildVimPlugin {
name = "bat.vim";
src = pkgs.fetchFromGitHub {
owner = "jamespwilliams";
repo = "bat.vim";
rev = "e2319b07ed6e74cdd70df2be6e8bf066377e22f7";
sha256 = "0bmlvziha1crk7x7p1yzdsb55bvpsj434sc28r7xspin9kfnd6y9";
};
};
overriden-neovim = pkgs.neovim.override {
configure = {
customRC = vimrc;
packages.packages = with pkgs.vimPlugins; {
start = [
bat-vim
fzf-vim
nvim-lspconfig
(nvim-treesitter.withPlugins
(plugins: pkgs.tree-sitter.allGrammars))
rust-tools-nvim
sensible
vim-crystal
];
};
};
};
in with pkgs; {
devShell = mkShell {
nativeBuildInputs = [
fzf
go
gopls
nodePackages.vim-language-server
overriden-neovim
ripgrep
sumneko-lua-language-server
tmux
python3
pyright
cargo
rustc
rustfmt
rust-analyzer
perl
perlPackages.PLS
nodePackages.typescript
nodePackages.typescript-language-server
terraform
terraform-ls
crystal
crystalline
];
};
});
}