@@ -16,12 +16,10 @@ const languageServerPaths = [
16
16
function activateLanguageServer ( context : vscode . ExtensionContext ) {
17
17
// The server is implemented in an executable application.
18
18
let serverModule : string = null ;
19
- for ( let p of languageServerPaths )
20
- {
19
+ for ( let p of languageServerPaths ) {
21
20
p = context . asAbsolutePath ( p ) ;
22
21
// console.log(p);
23
- if ( fs . existsSync ( p ) )
24
- {
22
+ if ( fs . existsSync ( p ) ) {
25
23
serverModule = p ;
26
24
break ;
27
25
}
@@ -30,7 +28,7 @@ function activateLanguageServer(context: vscode.ExtensionContext) {
30
28
let workPath = path . dirname ( serverModule ) ;
31
29
console . log ( `Use ${ serverModule } as server module.` ) ;
32
30
console . log ( `Work path: ${ workPath } .` ) ;
33
-
31
+
34
32
35
33
// If the extension is launched in debug mode then the debug server options are used
36
34
// Otherwise the run options are used
@@ -46,7 +44,10 @@ function activateLanguageServer(context: vscode.ExtensionContext) {
46
44
// Synchronize the setting section 'languageServerExample' to the server
47
45
configurationSection : "demoLanguageServer" ,
48
46
// Notify the server about file changes to '.clientrc files contain in the workspace
49
- fileEvents : vscode . workspace . createFileSystemWatcher ( "**/.clientrc" )
47
+ fileEvents : [
48
+ vscode . workspace . createFileSystemWatcher ( "**/.clientrc" ) ,
49
+ vscode . workspace . createFileSystemWatcher ( "**/.demo" ) ,
50
+ ]
50
51
} ,
51
52
}
52
53
0 commit comments