diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-08-18 20:48:44 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-08-18 20:48:44 +0800 |
commit | ce58034bb7df77fb295d6f47f08c296b0847bf38 (patch) | |
tree | 8e4afd0634a04e1e50bb6d971b10e0d39fcfea64 /script/provider | |
parent | 56cc87d03267040e6c8df1e948f1dc9b4e96e3a7 (diff) | |
download | lua-language-server-ce58034bb7df77fb295d6f47f08c296b0847bf38.zip |
`Lua.diagnostics.libraryFiles`
Diffstat (limited to 'script/provider')
-rw-r--r-- | script/provider/diagnostic.lua | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/script/provider/diagnostic.lua b/script/provider/diagnostic.lua index 7fb1bdd2..db377ea0 100644 --- a/script/provider/diagnostic.lua +++ b/script/provider/diagnostic.lua @@ -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 - return + 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() |