NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
16.52k stars 13.01k forks source link

Feature Request: Improve workflow for adding Vim plugins #294029

Open Bodleum opened 4 months ago

Bodleum commented 4 months ago

Problem

When adding a Vim plugin, the steps described in the docs are incomplete. As well as running ./update.py, you need to go and edit generated.nix. Not only is this missing from the docs, but goes against the "do not edit" notice at the top of the file. You can see my confusion in this PR.

Suggested fix

If VimEditor (defined in pkgs/applications/editors/vim/plugins/update.py) overrides Editor.add (defined in maintainers/scripts/pluginupdate.py) and adds on a bit to append the necessary code to generated.nix before committing, then that will improve adding basic plugins. This seems to me to be the most user friendly change, and the docs can stay as they are.

I'm not sure how to handle plugins which need an entry in overrides.nix. Perhaps that just needs to be done manually.

phijor commented 2 months ago

:+1: from me, this is incredibly confusing. I'm currently trying to add a plugin myself, and I'm kind of at a loss how to get update.py to show me the generated nix expression for that plugin only. And it seems like I am not the only one, here's at least one recent change that introduces a new plugin without updating generated.nix: