Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip Migrating from UI to YAML configuration.Use the |
What Changed
This updates the open-in-editor flow to respect VISUAL and EDITOR when resolving available editors and launching files. If the configured command matches a known editor, the existing editor option is reused. If it points to another runnable editor, a System Editor option is shown instead. The change also adds tests covering configured known editors and unknown configured commands.
Why
Users with a preferred editor configured through VISUAL or EDITOR could still be blocked by the current hardcoded editor detection flow. This keeps the existing behavior for known editors while allowing configured system editors to work without requiring a dedicated built-in entry first.
Checklist
Note
Add system editor support via VISUAL/EDITOR environment variables
VISUALandEDITORenv vars to detect a user-configured system editor, tokenizing the command with basic quote handling and matching it against known built-in editor IDs.'system-editor'as a recognized editor ID in the contracts and surfaces it as a "System Editor" option in the editor picker when available.resolveAvailableEditorsnow includes the configured editor even when its default binary is not on PATH, and lists'system-editor'for unknown-but-available commands.resolveEditorLaunchuses the configured command and args when launching'system-editor', applies--gotofor file:line:col targets, and returns an explicit error if'system-editor'is requested but no env var is configured.VISUAL/EDITORpath instead of their default binary when the default is absent from PATH.Macroscope summarized f9c2f48.