@@ -5,55 +5,58 @@ import { LanguageClient, LanguageClientOptions, ServerOptions, TransportKind } f
55let client : LanguageClient ;
66
77export 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+ ) ;
1111
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+ } ;
3030
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 : {
3437 configurationSection : 'unrealscript' ,
35- fileEvents : [
38+ fileEvents : [
3639 workspace . createFileSystemWatcher ( '**/*.{uc,uci}' ) ,
3740 // Let's not watch for upk changes, just u files because those are expected to change often.
3841 workspace . createFileSystemWatcher ( '**/*.{u}' )
3942 ]
40- } ,
43+ } ,
4144 diagnosticCollectionName : 'UnrealScript' ,
42- outputChannelName : 'UnrealScript' ,
43- } ;
45+ outputChannelName : 'UnrealScript' ,
46+ } ;
4447
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 ( ) ;
5255}
5356
5457export 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