Skip to content

Commit 42b9352

Browse files
committed
Move OnAutoInsertFeature creation into RoslynLanguageServer ctor
1 parent ac85eb7 commit 42b9352

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/lsptoolshost/roslynLanguageServer.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export class RoslynLanguageServer {
101101
/** The project files previously opened; we hold onto this for the same reason as _solutionFile. */
102102
private _projectFiles: vscode.Uri[] = new Array<vscode.Uri>();
103103

104-
private _onAutoInsertFeature: OnAutoInsertFeature | undefined;
104+
public readonly _onAutoInsertFeature: OnAutoInsertFeature;
105105

106106
public _buildDiagnosticService: BuildDiagnosticsService;
107107

@@ -129,6 +129,8 @@ export class RoslynLanguageServer {
129129
this.registerDebuggerAttach();
130130

131131
registerShowToastNotification(this._languageClient);
132+
133+
this._onAutoInsertFeature = new OnAutoInsertFeature(this._languageClient);
132134
}
133135

134136
private registerSetTrace() {
@@ -242,7 +244,6 @@ export class RoslynLanguageServer {
242244

243245
const server = new RoslynLanguageServer(client, platformInfo, context, telemetryReporter, languageServerEvents);
244246

245-
server._onAutoInsertFeature = new OnAutoInsertFeature(client);
246247
client.registerFeature(server._onAutoInsertFeature);
247248

248249
// Start the client. This will also launch the server process.

0 commit comments

Comments
 (0)