summaryrefslogtreecommitdiff
path: root/script/provider/diagnostic.lua
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2022-01-23 19:24:49 +0800
committersumneko <sumneko@hotmail.com>2022-01-23 19:24:49 +0800
commit7fc0bde24d7ba080988b5bba6faf227376191ddc (patch)
tree6f06f895ba2687a85a7259b2c5135013104ca039 /script/provider/diagnostic.lua
parent48f59772c3fdf2fdc5a250f8f770ad16f1f0b3ab (diff)
downloadlua-language-server-7fc0bde24d7ba080988b5bba6faf227376191ddc.zip
diagnostic check file as folder before as library
Diffstat (limited to 'script/provider/diagnostic.lua')
-rw-r--r--script/provider/diagnostic.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/script/provider/diagnostic.lua b/script/provider/diagnostic.lua
index 676bc6c5..2ca5830d 100644
--- a/script/provider/diagnostic.lua
+++ b/script/provider/diagnostic.lua
@@ -187,7 +187,7 @@ function m.doDiagnostic(uri, isScopeDiag)
if not config.get(uri, 'Lua.diagnostics.enable') then
return
end
- if files.isLibrary(uri) then
+ if files.isLibrary(uri, true) then
local status = config.get(uri, 'Lua.diagnostics.libraryFiles')
if status == 'Disable' then
return
@@ -411,7 +411,7 @@ files.watch(function (ev, uri) ---@async
xpcall(m.doDiagnostic, log.error, uri)
end
elseif ev == 'close' then
- if files.isLibrary(uri)
+ if files.isLibrary(uri, true)
or ws.isIgnored(uri) then
m.clear(uri)
end