diff options
author | unknown <sumnekosun@intranet.123u.com> | 2019-04-01 19:01:55 +0800 |
---|---|---|
committer | unknown <sumnekosun@intranet.123u.com> | 2019-04-01 19:01:55 +0800 |
commit | 0897093f8dafdcf37967aa0a8db2c94d2532a279 (patch) | |
tree | 6c27c931c1e1cc4208f30c6b0c3aa256bb438e1d | |
parent | c0708092a2c256d61c2cdbc3217a588bb86757ca (diff) | |
download | lua-language-server-0897093f8dafdcf37967aa0a8db2c94d2532a279.zip |
预加载过滤100k以上的文件
-rw-r--r-- | server/src/service.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/server/src/service.lua b/server/src/service.lua index af71e965..302b6335 100644 --- a/server/src/service.lua +++ b/server/src/service.lua @@ -218,6 +218,9 @@ function mt:readText(uri, path, buf, compiled) log.debug('No file: ', path) return end + if #text > 100000 then + return + end if self:getCachedFileCount() >= config.config.workspace.maxPreload then if not self._hasShowHitMaxPreload then self._hasShowHitMaxPreload = true |