diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-11-29 18:22:01 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-11-29 18:22:01 +0800 |
commit | 262def33acf15a611ccd1ae777e33b7a07d7977a (patch) | |
tree | 3d80032aa4bb6b6e5522a8050985d81f203e074e | |
parent | 76a4fde56b9eda83df05dc51ce18030336418a1c (diff) | |
download | lua-language-server-262def33acf15a611ccd1ae777e33b7a07d7977a.zip |
不在日志中记录语法错误
-rw-r--r-- | server/src/lsp.lua | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/server/src/lsp.lua b/server/src/lsp.lua index c557d480..0784ae04 100644 --- a/server/src/lsp.lua +++ b/server/src/lsp.lua @@ -121,11 +121,13 @@ function mt:_buildTextCache() 耗时:[%.3f]秒\n\z 数量:[%d]\n\z 总大小:[%.3f]kb\n\z - 速度:[%.3f]kb/s'):format( + 速度:[%.3f]kb/s\n\z + 内存:[%.3f]kb'):format( passed, #list, size / 1000, - size / passed / 1000 + size / passed / 1000, + collectgarbage 'count' )) end @@ -174,15 +176,15 @@ end function mt:compileText(uri) local obj = self._file[uri] if not obj then - return + return nil end if not self._need_compile[uri] then - return + return nil end self._need_compile[uri] = nil local ast, err = parser:ast(obj.text) if not ast then - log.error(err[1].err) + return nil end obj.ast = ast obj.lines = parser:lines(obj.text) |