@@ -116,22 +116,6 @@ export function getServerPlatform() : ServerPlatform {
116
116
}
117
117
}
118
118
119
- function notifyConfigurationChange ( context : vscode . ExtensionContext , client : LanguageClient ) {
120
- context . subscriptions . push (
121
- vscode . workspace . onDidChangeConfiguration ( async ( event : vscode . ConfigurationChangeEvent ) => {
122
- if ( event . affectsConfiguration ( "shader-validator" ) ) {
123
- if ( event . affectsConfiguration ( "shader-validator.trace.server" ) ||
124
- event . affectsConfiguration ( "shader-validator.serverPath" ) ) {
125
- //restartServer();
126
- }
127
- await client . sendNotification ( DidChangeConfigurationNotification . type , {
128
- settings : "" ,
129
- } ) ;
130
- }
131
- } )
132
- ) ;
133
- }
134
-
135
119
function getMiddleware ( ) : Middleware {
136
120
return {
137
121
async provideDocumentSymbols ( document : vscode . TextDocument , token : vscode . CancellationToken , next : ProvideDocumentSymbolsSignature ) {
@@ -194,6 +178,10 @@ export async function createLanguageClient(context: vscode.ExtensionContext): Pr
194
178
}
195
179
}
196
180
async function createLanguageClientStandard ( context : vscode . ExtensionContext , platform : ServerPlatform ) : Promise < LanguageClient | null > {
181
+ const channelName = 'Shader language Server' ; // For trace option, need same name
182
+ const channel = vscode . window . createOutputChannel ( channelName ) ;
183
+ context . subscriptions . push ( channel ) ;
184
+
197
185
const executable = getPlatformBinaryUri ( context . extensionUri , platform ) ;
198
186
const cwd = getPlatformBinaryDirectoryPath ( context . extensionUri , platform ) ;
199
187
console . info ( `Executing server ${ executable } with working directory ${ cwd } ` ) ;
@@ -223,13 +211,14 @@ async function createLanguageClientStandard(context: vscode.ExtensionContext, pl
223
211
{ scheme : 'file' , language : 'glsl' } ,
224
212
{ scheme : 'file' , language : 'wgsl' } ,
225
213
] ,
214
+ outputChannel : channel ,
226
215
middleware : getMiddleware ( ) ,
227
216
errorHandler : new ShaderErrorHandler ( )
228
217
} ;
229
218
230
219
let client = new LanguageClient (
231
220
'shader-validator' ,
232
- 'Shader language server' ,
221
+ channelName ,
233
222
serverOptions ,
234
223
clientOptions ,
235
224
context . extensionMode === vscode . ExtensionMode . Development
@@ -238,9 +227,6 @@ async function createLanguageClientStandard(context: vscode.ExtensionContext, pl
238
227
// Start the client. This will also launch the server
239
228
await client . start ( ) ;
240
229
241
- // Ensure configuration is sent
242
- notifyConfigurationChange ( context , client ) ;
243
-
244
230
return client ;
245
231
}
246
232
async function createLanguageClientWASI ( context : vscode . ExtensionContext ) : Promise < LanguageClient > {
@@ -340,7 +326,6 @@ async function createLanguageClientWASI(context: vscode.ExtensionContext) : Prom
340
326
} catch ( error ) {
341
327
client . error ( `Start failed` , error , 'force' ) ;
342
328
}
343
- notifyConfigurationChange ( context , client ) ;
344
329
345
330
return client ;
346
331
}
0 commit comments