Skip to content

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

@eduardolat

Description

@eduardolat

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!

Metadata

Metadata

Assignees

Labels

discussionUsed for feature requests, proposals, ideas, etc. Open discussion

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions