Support env variables in project configurations
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 72/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Lua
- Estrellas
- 1.4k
- Forks
- 117
- Merge medio
- 9 h 54 min
- PR fusionados (30 d)
- 22
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de nvim-flutter/flutter-tools.nvim
-
Plenary will be archivedAbierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
nvim-flutter/flutter-tools.nvim#524 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 42/100
nvim-flutter/flutter-tools.nvim#426 · 2 comentarios · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
[BUG] Errors in github actionsAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
nvim-flutter/flutter-tools.nvim#393 · 2 comentarios · 1 reacción ·
Los mantenedores suelen responder en 1 día
Todos los issues de nvim-flutter/flutter-tools.nvim
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 2 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
jangala-dev/devicecode-lua#344 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
luainkernel/lunatik#2018 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 86/100
LuaLS/lua-language-server#3481 ·
-
Kill Ishamuhale for Ishamuhale's FangPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertobug discord guide:04-the-barrens locale:enUS triage v0.2.6
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
Los mantenedores suelen responder en 1 día