Support env variables in project configurations
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 72/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Lua
- Star
- 1.4k
- Fork
- 117
- Merge trung bình
- 9 giờ 54 phút
- Pull request đã merge (30 ngày)
- 22
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của nvim-flutter/flutter-tools.nvim
-
Plenary will be archivedĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
nvim-flutter/flutter-tools.nvim#524 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 42/100
nvim-flutter/flutter-tools.nvim#426 · 2 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] Errors in github actionsĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
nvim-flutter/flutter-tools.nvim#393 · 2 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của nvim-flutter/flutter-tools.nvim
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
EmmyLuaLs/emmylua-analyzer-rust#1301 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
review-2026-10 Trad En
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
zigbeefordomoticz/wiki#343 ·
-
Data Correction Forever
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100