vim: nouvelle façon d'appeler les plugins, reorga du code

nixos-21.05-preparation
Yves Dubromelle 3 years ago
parent 4fd9d0d7f8
commit f7264ae434

@ -29,7 +29,6 @@ mkIf true {
tmux # nécessaire pour byobu
tree # affiche une arborescence de fichiers et dossiers
usbutils
(import ./vim.nix)
wget # client HTTP console
which # pour connaitre le chemin d'un exécutable
];
@ -70,6 +69,5 @@ mkIf true {
};
lfs.enable = true;
};
};
};
}

@ -27,6 +27,7 @@ in
./edition-video.nix # modifier les vidéos
./jeux.nix # jouer, tout simplement ;)
./radio.nix # outils pour faire de la radio SDR
./vim.nix # vim avec plugins
## if isDesktop
./adminsys.nix # pour gérer le système dans son ensemble et les services

@ -1,22 +1,28 @@
with import <nixpkgs> {};
{pkgs, ... }:
vim_configurable.customize {
# Specifies the vim binary name.
# E.g. set this to "my-vim" and you need to type "my-vim" to open this vim
# This allows to have multiple vim packages installed (e.g. with a different set of plugins)
name = "vim";
vimrcConfig.customRC = builtins.readFile ./vimrc;
vimrcConfig.vam.knownPlugins = pkgs.vimPlugins;
vimrcConfig.vam.pluginDictionaries = [
{ names = [
# Here you can place all your vim plugins
# They are installed managed by `vam` (a vim plugin manager)
#"vim-addon-nix"
"elm-vim"
"vim-fish"
"vim-nix"
"wombat256-vim"
"vimwiki"
]; }
];
let
myVim = pkgs.vim_configurable.customize {
# Specifies the vim binary name.
# E.g. set this to "my-vim" and you need to type "my-vim" to open this vim
# This allows to have multiple vim packages installed (e.g. with a different set of plugins)
name = "vim";
vimrcConfig.customRC = builtins.readFile ./vimrc;
vimrcConfig.packages.myVimPackage = with pkgs.vimPlugins; {
start = [
wombat256-vim
];
opt = [
elm-vim
vim-fish
vim-nix
vimwiki
];
};
};
in {
programs.vim = {
defaultEditor = true;
package = myVim;
};
}

@ -2,6 +2,8 @@
" This must be first, because it changes other options as a side effect.
set nocompatible
syntax on
" allow backspacing over everything in insert mode
set backspace=indent,eol,start

Loading…
Cancel
Save