Neovim environment manager project questions and considerations

Kind of a general question, so I’ve got an idea for a tool I’d like to create for neovim and vim. Basically, I’m looking for some input on if it makes sense and would be received well by the vim community.

Basically the tool is nvm/venv/update-alternatives for nvim/vim installations. Each configuration could be managed in an isolated workspace without having to reinstall the version and plugins when switching.

Problems to solve:

  • When working on a new config you often need your old one that’s set up to work for other projects before the new config is finished
  • Distributed vim/nvim configs may require a specific version and come with a host of dependencies
  • Migrating between LSP’s and their dependencies is not fun
  • Configurations and plugins might be different depending on the system and terminal
  • Configurations might be different depending on the type of work you’re doing (project coding, writing a paper, system editor)

What I’m considering:

Instead of cloning the entire vim distribution or creating new aliases for a new custom config, this tool would manage vim instances through docker containers. New container images would be generated dynamically by inspecting the current environment. Vim distributions could be installed by pointing the tool to the dockerhub image and tag. The tool would attach to the selected container with the host mounted and cd-ed to wherever the command was run from.

I like this option because it isolates the dependencies of a particular system from my computer. Like I could have a configuration with all the latex dependencies installed that compiles on save without worrying that I’ll have to reinstall those later. If I’m on a different computer all I have to do is install one tool and point it to the image to get my workflow. Docker might not be the best method so I’ll consider different ways of going about it.

Further down the line, a system for injecting one environment into the other could be implemented so that if, for instance, I want to use spacevim but with my obscure language support, I can do that easily.

I’m not sure if all of the problems I list require this dramatic solution. I also don’t know if anyone would actually be motivated to use this. I’ve done some hacking on my dwm config and suckless’ philosophy follows that the user should edit the source to make all changes they need, not sure if the vim philosophy would be similar but with respect to the configs and deps. The big problem for me is I find myself spending so much time setting things up, adding new features and changing things that I don’t get as much time to code. Thanks for the help.

I’ve been pushing nix for this, I added a flake to GitHub - mjlbach/defaults.nvim: A small, featureful neovim template and @teto and I have been working on the flake in neovim/contrib and the community neovim-nightly-overlay, eventually intending to add pre-made configurations built-into the flake itself. Similar idea to docker, and makes it pretty easy to get started with language servers.