summaryrefslogtreecommitdiff
path: root/script/provider
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-11-24 17:16:35 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-11-24 17:16:35 +0800
commitf7d0ab6a8696eb6d19b275ee437d69826ca3cd6e (patch)
treea1593965a69862ae88d2bb40fa9ba8059504a2e0 /script/provider
parent74fbf75e54c11fae1a40e4fec0e68d10b3cdec96 (diff)
downloadlua-language-server-f7d0ab6a8696eb6d19b275ee437d69826ca3cd6e.zip
limit the num of diags in one file
Diffstat (limited to 'script/provider')
-rw-r--r--script/provider/diagnostic.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/script/provider/diagnostic.lua b/script/provider/diagnostic.lua
index 40849638..f93de54c 100644
--- a/script/provider/diagnostic.lua
+++ b/script/provider/diagnostic.lua
@@ -97,11 +97,17 @@ local function merge(a, b)
local t = {}
if a then
for i = 1, #a do
+ if #t >= 100 then
+ break
+ end
t[#t+1] = a[i]
end
end
if b then
for i = 1, #b do
+ if #t >= 100 then
+ break
+ end
t[#t+1] = b[i]
end
end