Skip to content

Commit 05ca02f

Browse files
committed
refactor(vscode): split lsp releated code to linter.ts (#15789)
> This PR refactors the VSCode extension by extracting LSP-related functionality from extension.ts into a new linter.ts module, improving code organization and separation of concerns. > > Key Changes: > > - Moved LSP client initialization, configuration, and lifecycle management from extension.ts to linter.ts > - Created a new commands.ts file to centralize command constants > - Simplified extension.ts to focus on extension-level orchestration by delegating to linter-specific functions
1 parent 61c21d6 commit 05ca02f

File tree

3 files changed

+374
-329
lines changed

3 files changed

+374
-329
lines changed

editors/vscode/client/commands.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
const commandPrefix = 'oxc';
2+
3+
export const enum OxcCommands {
4+
RestartServer = `${commandPrefix}.restartServer`,
5+
ShowOutputChannel = `${commandPrefix}.showOutputChannel`,
6+
ToggleEnable = `${commandPrefix}.toggleEnable`,
7+
// only for linter.ts usage
8+
ApplyAllFixesFile = `${commandPrefix}.applyAllFixesFile`,
9+
}

0 commit comments

Comments
 (0)