diff --git a/vscode/src/extension.ts b/vscode/src/extension.ts index e3cc13ec8..82595e7f5 100644 --- a/vscode/src/extension.ts +++ b/vscode/src/extension.ts @@ -8,8 +8,6 @@ import { LOG_CHANNEL } from "./common"; let extension: RubyLsp; export async function activate(context: vscode.ExtensionContext) { - await migrateManagerConfigurations(); - if (!vscode.workspace.workspaceFolders) { // We currently don't support usage without any workspace folders opened. Here we warn the user, point to the issue // and offer to open a folder instead @@ -38,38 +36,6 @@ export async function deactivate(): Promise { await extension.deactivate(); } -type InspectKeys = - | "globalValue" - | "workspaceValue" - | "workspaceFolderValue" - | "globalLanguageValue" - | "workspaceLanguageValue" - | "workspaceFolderLanguageValue"; -// Function to migrate the old version manager configuration to the new format. Remove this after a few months -async function migrateManagerConfigurations() { - const configuration = vscode.workspace.getConfiguration("rubyLsp"); - const currentManagerSettings = - configuration.inspect("rubyVersionManager")!; - let identifier: string | undefined; - - const targetMap: Record = { - globalValue: vscode.ConfigurationTarget.Global, - globalLanguageValue: vscode.ConfigurationTarget.Global, - workspaceFolderLanguageValue: vscode.ConfigurationTarget.WorkspaceFolder, - workspaceFolderValue: vscode.ConfigurationTarget.WorkspaceFolder, - workspaceLanguageValue: vscode.ConfigurationTarget.Workspace, - workspaceValue: vscode.ConfigurationTarget.Workspace, - }; - - for (const [key, target] of Object.entries(targetMap)) { - identifier = currentManagerSettings[key as InspectKeys]; - - if (identifier && typeof identifier === "string") { - await configuration.update("rubyVersionManager", { identifier }, target); - } - } -} - async function createLogger(context: vscode.ExtensionContext) { let sender;