-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vim-plug and Nixos? #1010
Comments
Did you check NixOS/nixpkgs#56338? |
I did skim it, but reading it again, I'm not sure there is anything in there that can help me :( |
This is not something we can answer. Please use the issue tracker of NixOS. FWIW, you can set up your Vim configuration file to automatically download vim-plug. |
I'm working on my test vim configuration in a Nixos project. vim-plug almost works for me, with the following configuration {
# ...
plugvim = pkgs.vim_configurable.customize {
name = "plugvim";
vimrcConfig.packages.myVimPackage = with pkgs.vimPlugins; {
start = [
vim-plug
# Below is an example of how to modify the plugin before installation.
# This particular modification doesn't work for me.
# (vim-plug.overrideAttrs (old: {
# postInstall = ''
# mkdir -pv $target/autoload
# ln -s $target/plug.vim $target/autoload
# '';
# }))
];
};
vimrcConfig.customRC = ''
runtime! plug.vim
call plug#begin($HOME.'/_vim')
Plug 'https://github.com/grwlf/litrepl.vim' , { 'rtp': 'vim' }
call plug#end()
'';
};
# ...
} The expression defines a barebone Vim with a single The only problem I see is probably a Vim-related one. The Do you have an idea what could prevent Vim from loading the plugin and how to fix it? |
@sergei-mironov Did you end up figuring out this issue? |
Hi @tankorsmash . As of vim-plug-2024-05-14 my Nix expression contains a workaround and looks like this. vim-plug-test = pkgs.vim_configurable.customize {
name = "vim-plug-test";
vimrcConfig.packages.myVimPackage = with pkgs.vimPlugins; {
start = [
# vim-plug # <--- Does not work as-is, so the below override is required.
(vim-plug.overrideAttrs (old: {
postInstall = ''
mkdir -pv $target/autoload
ln -s $target/plug.vim $target/autoload
'';
}))
];
};
vimrcConfig.customRC = ''
call plug#begin($HOME.'/_vim')
Plug 'https://github.com/sergei-mironov/litrepl.vim' , { 'rtp': 'vim' }
call plug#end()
" Setting PATH is a custom requirement of the above Litrepl plugin
let $PATH="${pkgs.socat}/bin:${litrepl python}/bin:".$PATH
'';
}; It defines a vim with Plug installing a single plugin. Note the absence of the |
Hello!
I really, really like vim-plug, but at the moment I am installing Nixos on all my systems, and it's a bit of a hassle to get vim-plug to be my prefered plugin manager, because I haven't figured out how to get vim-plug to start, without putting plug.vim in the corret autoload folder, but I have no idea how to do that with Nixos configuration files.
I have a
vim.nix
file where I override neovim, and ask it to start with vim-plug, but that doesn't seem to work. Anyone have any ideas?The text was updated successfully, but these errors were encountered: