-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
DELVE_EDITOR
should support extra arguments
#3627
Comments
The documentation of GIT_EDITOR actually says:
Also it would have to support something to pass filename and line number. The easiest way to do whatever you want to do is to write a wrapper script and set that as DELVE_EDITOR. |
derekparker
added a commit
to derekparker/delve
that referenced
this issue
Jan 7, 2025
…bles Allows using editors that require specific flags like "zed --wait" Fixes go-delve#3627
derekparker
added a commit
to derekparker/delve
that referenced
this issue
Jan 8, 2025
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As of now,
DELVE_EDITOR
expects just a binary name, but it would be useful if it could also accept extra arguments. For example, with Emacs, I would want the editor to be something likeemacsclient -c
so that it creates a new frame. This is the behavior withGIT_EDITOR
btw. I think the logic in git is to split the env var by space. If this sounds good, I can probably drop a PR with the change. As a workaround I currently have it call a shell script which in turn calls emacsclient with proper args.dlv version
)? ...1.21.0
go version
)? ...go1.21.3
linux/amd64
DELVE_EDITOR
asemacsclient -n
emacsclient -n
is not a binaryThe text was updated successfully, but these errors were encountered: