diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-01-05 16:46:08 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-01-05 16:46:08 +0800 |
commit | c9b94234048a9608a732e85251757d02fcf19c8a (patch) | |
tree | dc95e70c233ab72e46e8bcb1fe7b9d8f6731886e /script/core | |
parent | 2877f084943ba30a9970cbe9a5cb0be844a2ec64 (diff) | |
download | lua-language-server-c9b94234048a9608a732e85251757d02fcf19c8a.zip |
cleanup
Diffstat (limited to 'script/core')
-rw-r--r-- | script/core/diagnostics/init.lua | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/script/core/diagnostics/init.lua b/script/core/diagnostics/init.lua index 4e2a4976..50233559 100644 --- a/script/core/diagnostics/init.lua +++ b/script/core/diagnostics/init.lua @@ -19,7 +19,7 @@ table.sort(diagList, function (a, b) return (diagSort[a] or 0) < (diagSort[b] or 0) end) -local function check(uri, name, results) +local function check(uri, name, response) if config.get(uri, 'Lua.diagnostics.disable')[name] then return end @@ -53,7 +53,7 @@ local function check(uri, name, results) mark[result.start] = true result.level = severity or result.level result.code = name - results[#results+1] = result + response(result) end, name) local passed = os.clock() - clock if passed >= 0.5 then @@ -77,8 +77,6 @@ return function (uri, response) for _, name in ipairs(diagList) do await.delay() - local results = {} - check(uri, name, results) - response(results) + check(uri, name, response) end end |