1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-12-14 11:57:34 +00:00

Add ability to load custom vim plugins

This commit is contained in:
Brandon Kase 2017-03-05 15:48:56 -08:00
parent 395ee139c4
commit b26de8a84e

View file

@ -9,7 +9,10 @@ let
vim = pkgs.vim_configurable.customize {
name = "vim";
vimrcConfig.customRC = config.environment.etc."vimrc".text;
vimrcConfig.vam.pluginDictionaries = cfg.plugins;
vimrcConfig.vam = {
knownPlugins = pkgs.vimPlugins // cfg.extraKnownPlugins;
pluginDictionaries = cfg.plugins;
};
};
text = import ../lib/write-text.nix {
@ -39,6 +42,29 @@ in {
'';
};
programs.vim.extraKnownPlugins = mkOption {
type = types.attrsOf types.package;
default = {};
example = literalExample
''
{
vim-jsx = pkgs.vimUtils.buildVimPluginFrom2Nix {
name = "vim-javascript-2016-07-29";
src = pkgs.fetchgit {
url = "git://github.com/mxw/vim-jsx";
rev = "261114c925ea81eeb4db1651cc1edced66d6b5d6";
sha256 = "17pffzwnvsimnnr4ql1qifdh4a0sqqsmcwfiqqzgglvsnzw5vpls";
};
dependencies = [];
};
}
'';
description = ''
Custom plugin declarations to add to VAM's knownPlugins.
'';
};
programs.vim.plugins = mkOption {
type = types.listOf types.attrs;
default = [];