Skip to content

Conversation

@ammar-agent
Copy link
Collaborator

Adds first-class vim/neovim support and a JavaScript-based editor configuration system.

Changes

  • Editors configured via ~/.mux/editors.js instead of localStorage
  • Two editor types: native (GUI) and web_term (terminal)
  • Ships with VS Code, Cursor, Zed, and Vim/Neovim
  • Terminal editors work everywhere: desktop, browser, SSH
  • Added initialCommand support to terminal windows
  • New documentation at /docs/editor

Generated with mux

@chatgpt-codex-connector
Copy link

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

- Add ~/.mux/editors.js configuration file for editor definitions
- Support two editor types: 'native' (GUI) and 'web_term' (terminal)
- Ship with VS Code, Cursor, Zed, and Vim/Neovim as built-in editors
- Add initialCommand support to terminal windows for vim integration
- Refactor EditorService to load user-customizable JavaScript config
- Add listEditors/setDefaultEditor IPC endpoints
- Update Settings UI to fetch editor list from backend
- Add comprehensive documentation at /docs/editor
- Remove old localStorage-based editor configuration

The editors.js file allows users to define custom editors with full
control over how they open workspaces, supporting different behaviors
for SSH vs local workspaces, browser vs desktop mode, etc.

_Generated with mux_
- Add shadcn dropdown-menu component
- Replace single edit button with dropdown showing all available editors
- Default editor is marked with a checkmark
- User can select any editor for one-off use
- Update useOpenInEditor to accept optional editorId parameter
Comment on lines +33 to +51
export type EditorOpenResult =
| {
/** Spawn a native/detached GUI process */
type: "native";
/** Command to execute */
command: string;
/** Arguments to pass */
args: string[];
}
| {
/** Open in web terminal with this command */
type: "web_term";
/** Full command string to run in terminal */
command: string;
}
| {
/** Editor cannot handle this context */
error: string;
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense to turn those into Zod schemas and validate on load?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants