fork
Configure Feed
Select the types of activity you want to include in your feed.
nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
fork
Configure Feed
Select the types of activity you want to include in your feed.
1{ vimUtils, vim_configurable, writeText, vimPlugins
2, lib, fetchFromGitHub
3, pkgs
4}:
5let
6 inherit (vimUtils) buildVimPluginFrom2Nix;
7
8 packages.myVimPackage.start = with vimPlugins; [ vim-nix ];
9
10in
11 pkgs.recurseIntoAttrs (rec {
12 vim_empty_config = vimUtils.vimrcFile { beforePlugins = ""; customRC = ""; };
13
14 ### vim tests
15 ##################
16 vim_with_vim2nix = vim_configurable.customize {
17 name = "vim"; vimrcConfig.vam.pluginDictionaries = [ "vim-addon-vim2nix" ];
18 };
19
20 # test cases:
21 test_vim_with_vim_nix_using_vam = vim_configurable.customize {
22 name = "vim-with-vim-addon-nix-using-vam";
23 vimrcConfig.vam.pluginDictionaries = [{name = "vim-nix"; }];
24 };
25
26 test_vim_with_vim_nix_using_pathogen = vim_configurable.customize {
27 name = "vim-with-vim-addon-nix-using-pathogen";
28 vimrcConfig.pathogen.pluginNames = [ "vim-nix" ];
29 };
30
31 test_vim_with_vim_nix_using_plug = vim_configurable.customize {
32 name = "vim-with-vim-addon-nix-using-plug";
33 vimrcConfig.plug.plugins = with vimPlugins; [ vim-nix ];
34 };
35
36 test_vim_with_vim_nix = vim_configurable.customize {
37 name = "vim-with-vim-addon-nix";
38 vimrcConfig.packages.myVimPackage.start = with vimPlugins; [ vim-nix ];
39 };
40
41 # regression test for https://github.com/NixOS/nixpkgs/issues/53112
42 # The user may have specified their own plugins which may not be formatted
43 # exactly as the generated ones. In particular, they may not have the `pname`
44 # attribute.
45 test_vim_with_custom_plugin = vim_configurable.customize {
46 name = "vim_with_custom_plugin";
47 vimrcConfig.vam.knownPlugins =
48 vimPlugins // ({
49 vim-trailing-whitespace = buildVimPluginFrom2Nix {
50 name = "vim-trailing-whitespace";
51 src = fetchFromGitHub {
52 owner = "bronson";
53 repo = "vim-trailing-whitespace";
54 rev = "4c596548216b7c19971f8fc94e38ef1a2b55fee6";
55 sha256 = "0f1cpnp1nxb4i5hgymjn2yn3k1jwkqmlgw1g02sq270lavp2dzs9";
56 };
57 # make sure string dependencies are handled
58 dependencies = [ "vim-nix" ];
59 };
60 });
61 vimrcConfig.vam.pluginDictionaries = [ { names = [ "vim-trailing-whitespace" ]; } ];
62 };
63})