@@ -5,55 +5,58 @@ import { LanguageClient, LanguageClientOptions, ServerOptions, TransportKind } f
5
5
let client : LanguageClient ;
6
6
7
7
export function activate ( context : ExtensionContext ) {
8
- const serverModule = context . asAbsolutePath (
9
- path . join ( 'out' , 'server.js' )
10
- ) ;
8
+ const serverModule = context . asAbsolutePath (
9
+ path . join ( 'out' , 'server.js' )
10
+ ) ;
11
11
12
- const memoryOption = '--max-old-space-size=8192' ;
13
- const debugOptions = {
14
- execArgv : [ memoryOption , '--nolazy' , '--inspect=6010' ]
15
- } ;
16
- const serverOptions : ServerOptions = {
17
- run : {
18
- module : serverModule ,
19
- transport : TransportKind . ipc ,
20
- options : {
21
- execArgv : [ memoryOption ]
22
- }
23
- } ,
24
- debug : {
25
- module : serverModule ,
26
- transport : TransportKind . ipc ,
27
- options : debugOptions ,
28
- }
29
- } ;
12
+ const memoryOption = '--max-old-space-size=8192' ;
13
+ const debugOptions = {
14
+ execArgv : [ memoryOption , '--nolazy' , '--inspect=6010' ]
15
+ } ;
16
+ const serverOptions : ServerOptions = {
17
+ run : {
18
+ module : serverModule ,
19
+ transport : TransportKind . ipc ,
20
+ options : {
21
+ execArgv : [ memoryOption ]
22
+ }
23
+ } ,
24
+ debug : {
25
+ module : serverModule ,
26
+ transport : TransportKind . ipc ,
27
+ options : debugOptions ,
28
+ }
29
+ } ;
30
30
31
- const clientOptions : LanguageClientOptions = {
32
- documentSelector : [ { scheme : 'file' , language : 'unrealscript' } ] ,
33
- synchronize : {
31
+ const clientOptions : LanguageClientOptions = {
32
+ documentSelector : [
33
+ { scheme : 'file' , language : 'unrealscript' } ,
34
+ { scheme : 'file' , language : 'unrealscript-pp' }
35
+ ] ,
36
+ synchronize : {
34
37
configurationSection : 'unrealscript' ,
35
- fileEvents : [
38
+ fileEvents : [
36
39
workspace . createFileSystemWatcher ( '**/*.{uc,uci}' ) ,
37
40
// Let's not watch for upk changes, just u files because those are expected to change often.
38
41
workspace . createFileSystemWatcher ( '**/*.{u}' )
39
42
]
40
- } ,
43
+ } ,
41
44
diagnosticCollectionName : 'UnrealScript' ,
42
- outputChannelName : 'UnrealScript' ,
43
- } ;
45
+ outputChannelName : 'UnrealScript' ,
46
+ } ;
44
47
45
- client = new LanguageClient (
46
- 'ucLanguageServer' ,
47
- 'UnrealScript' ,
48
- serverOptions ,
49
- clientOptions
50
- ) ;
51
- client . start ( ) ;
48
+ client = new LanguageClient (
49
+ 'ucLanguageServer' ,
50
+ 'UnrealScript' ,
51
+ serverOptions ,
52
+ clientOptions
53
+ ) ;
54
+ client . start ( ) ;
52
55
}
53
56
54
57
export function deactivate ( ) : Thenable < void > | undefined {
55
- if ( ! client ) {
56
- return undefined ;
57
- }
58
- return client . stop ( ) ;
59
- }
58
+ if ( ! client ) {
59
+ return undefined ;
60
+ }
61
+ return client . stop ( ) ;
62
+ }
0 commit comments