File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -317,12 +317,12 @@ local template = {
317
317
[' Lua.workspace.maxPreload' ] = Type .Integer >> 5000 ,
318
318
[' Lua.workspace.preloadFileSize' ] = Type .Integer >> 500 ,
319
319
[' Lua.workspace.library' ] = Type .Array (Type .String ),
320
- [' Lua.workspace.checkThirdParty' ] = Type .String >> ' Ask' << {
320
+ [' Lua.workspace.checkThirdParty' ] = Type .Or ( Type . String >> ' Ask' << {
321
321
' Ask' ,
322
322
' Apply' ,
323
323
' ApplyInMemory' ,
324
324
' Disable' ,
325
- },
325
+ }, Type . Boolean ),
326
326
[' Lua.workspace.userThirdParty' ] = Type .Array (Type .String ),
327
327
[' Lua.completion.enable' ] = Type .Boolean >> true ,
328
328
[' Lua.completion.callSnippet' ] = Type .String >> ' Disable' << {
Original file line number Diff line number Diff line change @@ -610,13 +610,9 @@ local function check3rd(uri)
610
610
end
611
611
local checkThirdParty = config .get (uri , ' Lua.workspace.checkThirdParty' )
612
612
-- Backwards compatability: `checkThirdParty` used to be a boolean.
613
- -- Note: `checkThirdParty` is defined as a string, so if a boolean is
614
- -- supplied, it's converted to a string by the `config.config` module.
615
- -- Hence we check for the strings `'true'` and `'false`' here, rather than
616
- -- the boolean literals.
617
- if checkThirdParty == ' Disable' or checkThirdParty == ' false' then
613
+ if not checkThirdParty or checkThirdParty == ' Disable' then
618
614
return
619
- elseif checkThirdParty == ' true' then
615
+ elseif checkThirdParty == true then
620
616
checkThirdParty = ' Ask'
621
617
end
622
618
local scp = scope .getScope (uri )
You can’t perform that action at this time.
0 commit comments