Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkg/terminal: support zed editor and allow args in DELVE_EDITOR #3899

Merged
merged 1 commit into from
Jan 12, 2025

Conversation

derekparker
Copy link
Member

Enhance editor support for the DELVE_EDITOR environment variable

  1. Add support for the Zed editor by recognizing the 'zed' command and setting the appropriate line number syntax

  2. Allow users to specify editor-specific arguments in DELVE_EDITOR by parsing the env var value into command and args parts

  3. Modify runEditor() to pass through any user-specified args before appending the file/line args

This change allows more configuration flexibility through DELVE_EDITOR while maintaining backwards compatibility. The Zed editor is now supported alongside VSCode, Helix and Vim variants.

Fixes #3627

Enhance editor support for the DELVE_EDITOR environment variable

1. Add support for the Zed editor by recognizing the 'zed' command and setting
   the appropriate line number syntax

2. Allow users to specify editor-specific arguments in DELVE_EDITOR by parsing
   the env var value into command and args parts

3. Modify runEditor() to pass through any user-specified args before appending
   the file/line args

This change allows more configuration flexibility through DELVE_EDITOR while
maintaining backwards compatibility. The Zed editor is now supported alongside
VSCode, Helix and Vim variants.

Fixes go-delve#3627
Copy link
Member

@aarzilli aarzilli left a comment

Choose a reason for hiding this comment

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

LGTM

@aarzilli aarzilli merged commit 0b1ef9b into go-delve:master Jan 12, 2025
2 checks passed
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.

DELVE_EDITOR should support extra arguments
2 participants