Skip to content

Commit

Permalink
add support for Cursor AI Code Editor
Browse files Browse the repository at this point in the history
  • Loading branch information
nonoroazoro committed Sep 12, 2024
1 parent 6f7e078 commit a674575
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,9 @@ export const VSCODE_BUILTIN_ENVIRONMENTS: Record<VSCodeEdition, {
[VSCodeEdition.CODESERVER]: {
dataDirectoryName: "../.local/share/code-server",
extensionsDirectoryName: ".local/share/code-server"
},
[VSCodeEdition.CURSOR]: {
dataDirectoryName: "Cursor",
extensionsDirectoryName: ".cursor"
}
};
7 changes: 6 additions & 1 deletion src/types/VSCodeEdition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,10 @@ export enum VSCodeEdition
/**
* The OSS VSCode server provided by [Coder](https://coder.com), which is running on a remote or self-hosted server.
*/
CODESERVER
CODESERVER,

/**
* Cursor AI Code Editor, see [Cursor](https://www.cursor.com/).
*/
CURSOR
}
3 changes: 3 additions & 0 deletions src/utils/vscodeAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ export function getVSCodeEdition()
case "code-server":
return VSCodeEdition.CODESERVER;

case "Cursor":
return VSCodeEdition.CURSOR;

default:
throw new Error(localize("error.env.unknown.vscode"));
}
Expand Down

0 comments on commit a674575

Please sign in to comment.