Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions script/config/template.lua
Original file line number Diff line number Diff line change
Expand Up @@ -317,12 +317,12 @@ local template = {
['Lua.workspace.maxPreload'] = Type.Integer >> 5000,
['Lua.workspace.preloadFileSize'] = Type.Integer >> 500,
['Lua.workspace.library'] = Type.Array(Type.String),
['Lua.workspace.checkThirdParty'] = Type.String >> 'Ask' << {
['Lua.workspace.checkThirdParty'] = Type.Or(Type.String >> 'Ask' << {
'Ask',
'Apply',
'ApplyInMemory',
'Disable',
},
}, Type.Boolean),
['Lua.workspace.userThirdParty'] = Type.Array(Type.String),
['Lua.completion.enable'] = Type.Boolean >> true,
['Lua.completion.callSnippet'] = Type.String >> 'Disable' << {
Expand Down
8 changes: 2 additions & 6 deletions script/library.lua
Original file line number Diff line number Diff line change
Expand Up @@ -610,13 +610,9 @@ local function check3rd(uri)
end
local checkThirdParty = config.get(uri, 'Lua.workspace.checkThirdParty')
-- Backwards compatability: `checkThirdParty` used to be a boolean.
-- Note: `checkThirdParty` is defined as a string, so if a boolean is
-- supplied, it's converted to a string by the `config.config` module.
-- Hence we check for the strings `'true'` and `'false`' here, rather than
-- the boolean literals.
if checkThirdParty == 'Disable' or checkThirdParty == 'false' then
if not checkThirdParty or checkThirdParty == 'Disable' then
return
elseif checkThirdParty == 'true' then
elseif checkThirdParty == true then
checkThirdParty = 'Ask'
end
local scp = scope.getScope(uri)
Expand Down