diff options
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/config.lua | 1 | ||||
-rw-r--r-- | server/src/service.lua | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/server/src/config.lua b/server/src/config.lua index eded1c9d..ec01bd08 100644 --- a/server/src/config.lua +++ b/server/src/config.lua @@ -100,6 +100,7 @@ local ConfigTemplate = { }, Array(String)}, }, diagnostics = { + enable = {true, Boolean}, globals = {{}, Str2Hash ';'}, disable = {{}, Str2Hash ';'}, severity = { diff --git a/server/src/service.lua b/server/src/service.lua index fb8c3123..9242a61d 100644 --- a/server/src/service.lua +++ b/server/src/service.lua @@ -536,6 +536,10 @@ end ---@param uri uri function mt:doDiagnostics(uri) + if not config.config.diagnostics.enable then + self._needDiagnostics[uri] = nil + return + end if not self._needDiagnostics[uri] then return end |