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

Request for Windsurf or custom editor support #3990

Closed
renandecarlo opened this issue Jan 28, 2025 · 1 comment
Closed

Request for Windsurf or custom editor support #3990

renandecarlo opened this issue Jan 28, 2025 · 1 comment
Labels
duplicate Issue or pull request already exists feature New feature or request

Comments

@renandecarlo
Copy link

Description

This is basically a copy of what @Ran350 asked before (#3222), I'd like to ask for Windsurf support for the rebase custom editor.
As more AI editors based on vscode become popular, like Windsurf, and probably soon Trae as well, it would be a nice move to let the user specify their own "code" command at the settings.

Problem

There was a problem with the behavior of the GitLens: Git rebase command when using the Windsurf Editor.
What is expected is to open an "interactive rebase" tab on the Windsurf editor, but it actually opens on the VSCode.
Also, it opens a text file based rebase edit tab instead of a GUI.

Cause

I checked the git command executed in the terminal and found that code (VSCode) was specified in the editor option.

/usr/bin/git -C "path/to/repository" -c "core.editor=code --wait --reuse-window" -c "sequence.editor=code --wait --reuse-window" rebase --interactive c59a794bd118b6669a0e172a5e2d51854c446672

Solution

I ran the git command with core.editor and sequence.editor set to windsurf, and it opened the rebase edit tab in the Cursor Editor, as expected.

/usr/bin/git -C "path/to/repository" -c "core.editor=windsurf --wait --reuse-window" -c "sequence.editor=windsurf --wait --reuse-window" rebase --interactive c59a794bd118b6669a0e172a5e2d51854c446672

To support the Windsurf editor, I would expect the following parts of the GitLens source code to be changed.

export function getEditorCommand(): string {
let editor;
switch (env.appName) {
case 'Visual Studio Code - Insiders':
editor = 'code-insiders --wait --reuse-window';
break;
case 'Visual Studio Code - Exploration':
editor = 'code-exploration --wait --reuse-window';
break;
case 'VSCodium':
editor = 'codium --wait --reuse-window';
break;
case 'Cursor':
editor = 'cursor --wait --reuse-window';
break;
default:
editor = 'code --wait --reuse-window';
break;
}
return editor;
}

However, I am concerned that this may complicate the implementation since there is no easy way to determine whether the environment is a Windsurf Editor environment or not.

Question

Therefore, I would like to ask you, the maintainer, the following questions,

Do you intend to support Windsurf, the unofficial VSCode editor, in the first place?
If so, what would be the best way to implement it?

Version

GitLens Version: 16.2.1
Windsurf Version: 1.2.2
OS: Windows_NT x64 10

@renandecarlo renandecarlo added feature New feature or request triage Needs to be looked at labels Jan 28, 2025
@d13 d13 added duplicate Issue or pull request already exists and removed triage Needs to be looked at labels Jan 28, 2025
@d13
Copy link
Member

d13 commented Jan 28, 2025

Thanks @renandecarlo! This was put on our radar last week with #3969

@d13 d13 closed this as completed Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Issue or pull request already exists feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants