Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(editor): misaligned command prefixes (#6628)
In the client code, we were registering commands under the `oxc` prefix, but in our `package.json` we were advertising a `oxc_language_server` prefix.
  • Loading branch information
DonIsaac committed Oct 16, 2024
commit d9159a24455f419523409375bb6dc75c161c7d10
11 changes: 6 additions & 5 deletions editors/vscode/client/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ const languageClientId = 'oxc-vscode';
const languageClientName = 'oxc';
const outputChannelName = 'oxc_language_server';
const traceOutputChannelName = 'oxc_language_server.trace';
const commandPrefix = 'oxc';

const enum OxcCommands {
RestartServer = 'oxc.restartServer',
ApplyAllFixes = 'oxc.applyAllFixes',
ShowOutputChannel = 'oxc.showOutputChannel',
ShowTraceOutputChannel = 'oxc.showTraceOutputChannel',
ToggleEnable = 'oxc.toggleEnable',
RestartServer = `${commandPrefix}.restartServer`,
ApplyAllFixes = `${commandPrefix}.applyAllFixes`,
ShowOutputChannel = `${commandPrefix}.showOutputChannel`,
ShowTraceOutputChannel = `${commandPrefix}.showTraceOutputChannel`,
ToggleEnable = `${commandPrefix}.toggleEnable`,
}

let client: LanguageClient;
Expand Down
8 changes: 4 additions & 4 deletions editors/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"type": "object",
"title": "oxc",
"properties": {
"oxc_language_server.run": {
"oxc.lint.run": {
"scope": "resource",
"type": "string",
"enum": [
Expand All @@ -74,12 +74,12 @@
"default": "onType",
"description": "Run the linter on save (onSave) or on type (onType)"
},
"oxc_language_server.enable": {
"oxc.enable": {
"type": "boolean",
"default": true,
"description": "enable oxc language server"
},
"oxc_language_server.trace.server": {
"oxc.trace.server": {
"type": "string",
"scope": "window",
"enum": [
Expand All @@ -95,7 +95,7 @@
"default": "off",
"description": "Traces the communication between VS Code and the language server."
},
"oxc_language_server.configPath": {
"oxc.configPath": {
"type": "string",
"scope": "window",
"default": ".eslintrc",
Expand Down