diff --git a/extensions/mssql/src/contracts.ts b/extensions/mssql/src/contracts.ts index e4e09425c030..7c03fbfa9cf9 100644 --- a/extensions/mssql/src/contracts.ts +++ b/extensions/mssql/src/contracts.ts @@ -528,3 +528,26 @@ export namespace SerializeDataContinueRequest { export const type = new RequestType('serialize/continue'); } // ------------------------------- ----------------------------- + +// ------------------------------- < Load Completion Extension Request > ------------------------------------ +/** + * Completion extension load parameters + */ +export class CompletionExtensionParams { + /// + /// Absolute path for the assembly containing the completion extension + /// + public assemblyPath: string; + /// + /// The type name for the completion extension + /// + public typeName: string; + /// + /// Property bag for initializing the completion extension + /// + public properties: {}; +} + +export namespace CompletionExtLoadRequest { + export const type = new RequestType('completion/extLoad'); +} diff --git a/extensions/mssql/src/sqlToolsServer.ts b/extensions/mssql/src/sqlToolsServer.ts index 16566fc49647..b877bc94b16b 100644 --- a/extensions/mssql/src/sqlToolsServer.ts +++ b/extensions/mssql/src/sqlToolsServer.ts @@ -19,6 +19,7 @@ import { SchemaCompareService } from './schemaCompare/schemaCompareService'; import { AppContext } from './appContext'; import { DacFxService } from './dacfx/dacFxService'; import { CmsService } from './cms/cmsService'; +import { CompletionExtensionParams, CompletionExtLoadRequest } from './contracts'; const baseConfig = require('./config.json'); @@ -46,6 +47,9 @@ export class SqlToolsServer { setTimeout(() => { statusView.hide(); }, 1500); + vscode.commands.registerCommand('mssql.loadCompletionExtension', (params: CompletionExtensionParams) => { + this.client.sendRequest(CompletionExtLoadRequest.type, params); + }); Telemetry.sendTelemetryEvent('startup/LanguageClientStarted', { installationTime: String(installationComplete - installationStart), processStartupTime: String(processEnd - processStart),