Skip to content

feat: checking dependencies, and installing with dialogue box#11

Open
4rrw wants to merge 3 commits intodangooddd:mainfrom
4rrw:feature/auto-install-deps-when-missing
Open

feat: checking dependencies, and installing with dialogue box#11
4rrw wants to merge 3 commits intodangooddd:mainfrom
4rrw:feature/auto-install-deps-when-missing

Conversation

@4rrw
Copy link
Copy Markdown

@4rrw 4rrw commented Apr 13, 2026

One thing that i relatively frequently stumble upon in my workflow is reinstalling and rerunning virtual environment.
Currently when using local env for pyrepl dependencies, reinstalling venv requires user to run Pyrepl install each time.

VSCode Jupyter implementation handles it in such way that when there are no required deps in the envirnoment it installs it when starting a kernel. So this feature does the same. It also adds dialog box for pyrepl install during this action.

So it summary:

  • User opens pyrepl
  • pyrepl checks for required deps in the activate environment
  • when there are no required deps in the env, the dialog box shows up for pip/uv options
  • deps are installed and kernel is launched

I find it very handy for myself so i think it might be useful overall.

@dangooddd
Copy link
Copy Markdown
Owner

dangooddd commented Apr 13, 2026

Hello! In my opinion package autoinstallation is not a good choice atleast to be the default behaviour. In your implementation I do not really like window popup. For this type of things it is better to do vim.cmd("!uv pip install jupyter-console pynvim") - this way neovim will hadle popup for us. Or even do it silently.

There is also plan to get rid of tool choice - we can autodetect is uv installed and use it by default, with fallback to pip. But for now it is out of scope of this PR)

For now we definetely should atleast introduce config option to enable/disable this feature, and docs about it.
vim.cmd("!uv pip ...") is nice in new neovim ui2, but I do not know if it will play nice with Press enter. If it doesn't, I suggest to install packages silently with notification on operation end.

4rrw added 2 commits April 22, 2026 14:15
- removed popup window in favor of vim.system() call
- no package manager dialog box, defined in config
@4rrw
Copy link
Copy Markdown
Author

4rrw commented Apr 22, 2026

Okay, makes sense. But it think it's a good option for certain workflows since it removes some friction that can compound.

Following with your suggestions
Instead of popup, package manager is now defined in config as auto_install parameter
Since there is no autodetect for now and dialog box is not something that you want for package manager selection i opted for something like this (although its unclear to my why because there is dialog box select for venv already).

auto_install = false | "uv" | "pip" (default false)

false throws notification about missing dependencies, uv or pip use given package manager to install dependencies automatically.

I also added description to docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants