diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-07-16 09:50:50 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-07-16 09:50:50 +0800 |
commit | e90b4d2aa2aa02ac55ca67a1be122267531ee658 (patch) | |
tree | cbdb640fb42f9036b0fe1239d74bbfbabbee99ec /server/src | |
parent | b194e1dcc6baff0274051a957d345366dd941977 (diff) | |
download | lua-language-server-e90b4d2aa2aa02ac55ca67a1be122267531ee658.zip |
close #62 支持禁用诊断
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 |