Home-manager: Not all vim plugins available (or naming unclear?)

Created on 14 Sep 2018  Â·  7Comments  Â·  Source: nix-community/home-manager

The file https://github.com/NixOS/nixpkgs/blob/master/pkgs/misc/vim-plugins/vim-plugin-names lists all supported vim plugins. It's not always straightforward to match the plugin name from that list with the string I have to add to programs.vim.plugins.

  • To add vim-sensible, I can add "sensible" or "vim-sensible" to the list.
  • To add fzf, there seems no correct string. None of "junegunn/fzf.vim", "junegunn/fzf", "fzf.vim" or "fzf" work. I always get error: attribute ... missing.

Most helpful comment

I guess you could check the output of

$ nix-env -f '<nixpkgs>' -qaP -A vimPlugins --description
vimPlugins.pluginnames2nix                 vim-plugin-names-to-nix                              
vimPlugins.a-vim                           vimplugin-a-vim-2010-11-06                           
vimPlugins.ack-vim                         vimplugin-ack-vim-2018-02-28                         
vimPlugins.acp                             vimplugin-acp-2013-02-05                             
vimPlugins.agda-vim                        vimplugin-agda-vim-2017-11-21
…

All 7 comments

You can see all names in generated.nix, for fzf it's fzf-vim.

The . seems to be replaced with a -.

https://github.com/NixOS/nixpkgs/blob/master/pkgs/misc/vim-plugins/generated.nix#L531

So it seems like a documentation problem. If someone can explain what the algorithm is (I stared at the code and don't understand it) I'd update the manpage.

I guess you could check the output of

$ nix-env -f '<nixpkgs>' -qaP -A vimPlugins --description
vimPlugins.pluginnames2nix                 vim-plugin-names-to-nix                              
vimPlugins.a-vim                           vimplugin-a-vim-2010-11-06                           
vimPlugins.ack-vim                         vimplugin-ack-vim-2018-02-28                         
vimPlugins.acp                             vimplugin-acp-2013-02-05                             
vimPlugins.agda-vim                        vimplugin-agda-vim-2017-11-21
…

Created PR that improves documentation using command suggested by @rycee. Thank you for rising the issue and I hope the PR solves it @turion.

@uvNikita, that's a good idea!

Awesome!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pmiddend picture pmiddend  Â·  3Comments

wpcarro picture wpcarro  Â·  3Comments

rschulman picture rschulman  Â·  5Comments

btomasini picture btomasini  Â·  4Comments

dermetfan picture dermetfan  Â·  6Comments