@@ -33,29 +33,34 @@ export function activate(context: vscode.ExtensionContext): void {
33
33
commandRegistrar . register ( 'citeWeb' , addWebCiteFactory ) ;
34
34
35
35
configureLuaLibrary (
36
- " Scribunto" ,
37
- vscode . workspace . getConfiguration ( " wikitext" ) . get < string > ( " scopedLuaIntegration" ) !== " disabled"
36
+ ' Scribunto' ,
37
+ vscode . workspace . getConfiguration ( ' wikitext' ) . get < string > ( ' scopedLuaIntegration' ) !== ' disabled'
38
38
) ;
39
39
}
40
40
41
41
export function deactivate ( ) : void {
42
42
console . log ( "Extension is inactive." ) ;
43
43
44
- if ( vscode . workspace . getConfiguration ( " wikitext" ) . get < string > ( " scopedLuaIntegration" ) !== " enabled" ) {
45
- configureLuaLibrary ( " Scribunto" , false ) ;
44
+ if ( vscode . workspace . getConfiguration ( ' wikitext' ) . get < string > ( ' scopedLuaIntegration' ) !== ' enabled' ) {
45
+ configureLuaLibrary ( ' Scribunto' , false ) ;
46
46
}
47
47
}
48
48
49
49
export function configureLuaLibrary ( folder : string , enable : boolean ) {
50
- const extensionId = "rowewilsonfrederiskholme.wikitext" ;
50
+ // https://github.com/LuaLS/lua-language-server/issues/1689
51
+ if ( vscode . env . uiKind !== vscode . UIKind . Desktop ) {
52
+ return ;
53
+ }
54
+
55
+ const extensionId = 'rowewilsonfrederiskholme.wikitext' ;
51
56
const extensionPath = vscode . extensions . getExtension ( extensionId ) ?. extensionPath ;
52
57
if ( extensionPath === undefined ) {
53
58
return ;
54
59
}
55
60
56
- const folderPath = path . join ( extensionPath , " EmmyLua" , folder ) ;
57
- const config = vscode . workspace . getConfiguration ( " Lua" ) ;
58
- let library : string [ ] | undefined = config . get ( " workspace.library" ) ;
61
+ const folderPath = path . join ( extensionPath , ' EmmyLua' , folder ) ;
62
+ const config = vscode . workspace . getConfiguration ( ' Lua' ) ;
63
+ let library : string [ ] | undefined = config . get ( ' workspace.library' ) ;
59
64
if ( library === undefined ) {
60
65
return ;
61
66
}
@@ -75,6 +80,6 @@ export function configureLuaLibrary(folder: string, enable: boolean) {
75
80
else if ( index >= 0 ) {
76
81
library . splice ( index , 1 ) ;
77
82
}
78
- config . update ( " workspace.library" , library , false ) ;
83
+ config . update ( ' workspace.library' , library , false ) ;
79
84
}
80
85
}
0 commit comments