Support env variables in project configurations
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 72/100
Direzione di ricerca
Start by tracing how setup_project configurations reach FlutterRun, then inspect the job runner's plenary Job environment and the debugger launch config environment. Add an optional per-configuration env field that merges with Neovim's environment for run and debug processes only. Done means those processes receive the selected configuration's values while other jobs, such as pub get and devices, remain unchanged.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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:
require("flutter-tools").setup_project({
{
name = "Dev",
flavor = "dev",
env = { API_KEY = "abc", LOG_LEVEL = "debug" },
},
})
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).
Happy to open a PR if this sounds good.
- Lingua principale
- Lua
- Stelle
- 1.4k
- Fork
- 117
- Merge medio
- 9h 54m
- PR unite (30g)
- 22
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di nvim-flutter/flutter-tools.nvim
-
Plenary will be archivedAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
nvim-flutter/flutter-tools.nvim#524 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 42/100
nvim-flutter/flutter-tools.nvim#426 · 2 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
nvim-flutter/flutter-tools.nvim#393 · 2 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di nvim-flutter/flutter-tools.nvim
Issue simili
-
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 80/100
mason-org/mason.nvim#2117 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
mailcow/mailcow-dockerized#7518 ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG] rDNS lookups are performed even when the RDNS lists are emptyForse già presa @kocaemre l’ha presa oggi. Apertabug core plugins
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
bunkerity/bunkerweb#4057 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
msys2/MSYS2-packages#6825 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
fw876/helloworld#2066 ·
I maintainer di solito rispondono entro 1 giorno