Vim: Difference between revisions
imported>Mic92 |
imported>Mic92 No edit summary |
||
| Line 1: | Line 1: | ||
Vim plugins can be installed with the help of nix. You can omit using vim plugin managers and do everything in your <code>.nixpkgs/config</code>. | Vim plugins can be installed with the help of nix. You can omit using vim plugin managers and do everything in your <code>.nixpkgs/config</code>. | ||
= Customizations = | |||
Both vim and neovim can be further configured to include your favorite plugins and additional libraries. | |||
Add the following code to your <code>~/.nixpkgs/config.nix</code>: | |||
<syntaxHighlight lang="nix"> | |||
{ | |||
packageOverrides = pkgs: with pkgs; { | |||
myVim = vim_configurable.customize { | |||
name = "vim-with-plugins"; | |||
# add here code from the example section | |||
} | |||
myNeovim = neovim.override { | |||
configure = { | |||
customRC = '' | |||
# here you custom configuration goes! | |||
''; | |||
packages.myVimPackage = with pkgs.vimPlugins; { | |||
# see examples below how to use custom packages | |||
start = [ ]; | |||
opt = [ ]; | |||
}; | |||
} | |||
} | |||
} | |||
</syntaxHighlight> | |||
After that you can install your special grafted `myVim` or `myNeovim` package. | |||
= Examples = | = Examples = | ||