Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Support env variables in project configurations

Abierto
#562 0 comentarios 0 reacciones 0 asignados Ver en GitHub

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
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
dart, flutter, lua, neovim
Área
devtools

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

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de nvim-flutter/flutter-tools.nvim

Todos los issues de nvim-flutter/flutter-tools.nvim

Issues similares

Más issues de Lua

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.