Skip to content
Snippets Groups Projects
Commit ce58034b authored by 最萌小汐's avatar 最萌小汐
Browse files

`Lua.diagnostics.libraryFiles`

parent 56cc87d0
No related branches found
No related tags found
No related merge requests found
......@@ -166,6 +166,8 @@ local Template = {
>> util.deepCopy(define.DiagnosticDefaultNeededFileStatus),
['Lua.diagnostics.workspaceDelay'] = Type.Integer >> 0,
['Lua.diagnostics.workspaceRate'] = Type.Integer >> 100,
['Lua.diagnostics.libraryFiles'] = Type.String >> 'Disable',
['Lua.diagnostics.ignoredFiles'] = Type.String >> 'Disable',
['Lua.workspace.ignoreDir'] = Type.Hash(Type.String, Type.Boolean, ';'),
['Lua.workspace.ignoreSubmodules'] = Type.Boolean >> true,
['Lua.workspace.useGitIgnore'] = Type.Boolean >> true,
......
......@@ -182,8 +182,25 @@ function m.doDiagnostic(uri)
if not config.get 'Lua.diagnostics.enable' then
return
end
if files.isLibrary(uri) or ws.isIgnored(uri) then
if files.isLibrary(uri) then
local status = config.get 'Lua.diagnostics.libraryFiles'
if status == 'Disable' then
return
elseif status == 'Opened' then
if not files.isOpen(uri) then
return
end
end
end
if ws.isIgnored(uri) then
local status = config.get 'Lua.diagnostics.ignoredFiles'
if status == 'Disable' then
return
elseif status == 'Opened' then
if not files.isOpen(uri) then
return
end
end
end
await.delay()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment