[FEATURE]: Add "editor" configuration option in config.json to override system EDITOR #4766

Open
opened 2026-02-16 17:45:21 -05:00 by yindo · 1 comment
Owner

Originally created by @eduardolat on GitHub (Jan 11, 2026).

Originally assigned to: @thdxr on GitHub.

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Hi, first of all, thanks for this amazing project

I've been running into a bit of friction when using OpenCode across different environments (especially DevContainers).

Right now, OpenCode relies entirely on the system's EDITOR environment variable. While this is standard, it becomes a hassle when I share/mount my config.json into a container but the environment variables don't carry over. I end up having to create shell aliases or modify .bashrc in every single container just to force it to use my preferred editor (like micro or code --wait)

The Request:

It would be super useful to have an optional "editor" field in the config.json file that takes precedence over the system variable.

For example:

{
  "theme": "dark",
  "editor": "micro"
}

This would make the configuration truly portable. I could just mount my config directory into any DevContainer or machine, and my editor preference would work immediately without needing to touch the shell environment.

Thanks!

Originally created by @eduardolat on GitHub (Jan 11, 2026). Originally assigned to: @thdxr on GitHub. ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request Hi, first of all, thanks for this amazing project I've been running into a bit of friction when using OpenCode across different environments (especially DevContainers). Right now, OpenCode relies entirely on the system's `EDITOR` environment variable. While this is standard, it becomes a hassle when I share/mount my `config.json` into a container but the environment variables don't carry over. I end up having to create shell aliases or modify `.bashrc` in every single container just to force it to use my preferred editor (like `micro` or `code --wait`) **The Request:** It would be super useful to have an optional `"editor"` field in the `config.json` file that takes precedence over the system variable. For example: ```json { "theme": "dark", "editor": "micro" } ``` This would make the configuration truly portable. I could just mount my config directory into any DevContainer or machine, and my editor preference would work immediately without needing to touch the shell environment. Thanks!
yindo added the discussion label 2026-02-16 17:45:21 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 11, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #4526: [FEATURE]: Full portable mode - Requests environment variables to make OpenCode fully portable across different devices and environments
  • #5900: Opencode doesn't work in devcontainer (M1 rosetta) - Another issue reporting problems with DevContainers where environment variables aren't available

The editor configuration option you're requesting is part of a broader effort to make OpenCode more portable. Feel free to ignore if these don't address your specific case.

@github-actions[bot] commented on GitHub (Jan 11, 2026): This issue might be a duplicate of existing issues. Please check: - #4526: [FEATURE]: Full portable mode - Requests environment variables to make OpenCode fully portable across different devices and environments - #5900: Opencode doesn't work in devcontainer (M1 rosetta) - Another issue reporting problems with DevContainers where environment variables aren't available The editor configuration option you're requesting is part of a broader effort to make OpenCode more portable. Feel free to ignore if these don't address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4766