You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support env variables in project configurations #562
Today there is no way to set environment variables for the flutter run command per project configuration. The process started by FlutterRun inherits Neovim's environment, so env vars have to be exported in the shell before starting Neovim, or set with vim.env in pre_run_callback. The vim.env approach leaks the value into the whole Neovim session and is not undone when switching to another configuration.
Other editors support this per run configuration (IntelliJ "Environment variables", VS Code launch.json "env").
Proposal: add an optional env field to setup_project configurations:
The values would be merged on top of Neovim's environment and only applied to the run/debug process of that configuration: the job runner (plenary Job env) and the debugger runner (launch config env). Other jobs like pub get or devices stay unchanged, which keeps the scope small (see #89).
Thanks for the detailed proposal and the offer to send a PR! I went ahead and implemented it in #565 following your design: env on a project configuration is merged on top of Neovim's environment for the job runner, and passed as the launch configuration's env for the debugger runner. Other jobs like pub get and devices are unchanged.
Activity
sidlatau commentedon Oct 30, 2026
Thanks for the detailed proposal and the offer to send a PR! I went ahead and implemented it in #565 following your design:
envon a project configuration is merged on top of Neovim's environment for the job runner, and passed as the launch configuration'senvfor the debugger runner. Other jobs likepub getanddevicesare unchanged.