summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-12-08 18:44:43 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-12-08 18:44:43 +0800
commit9f425d8b8f734d954ad9c7524a00240302b3f037 (patch)
tree972bc584be714a594f7352adb80506f1f4b0039e /server
parentc11314297d912569a90784c0000592930fb32694 (diff)
downloadlua-language-server-9f425d8b8f734d954ad9c7524a00240302b3f037.zip
不等待空闲了
Diffstat (limited to 'server')
-rw-r--r--server/src/service.lua10
1 files changed, 2 insertions, 8 deletions
diff --git a/server/src/service.lua b/server/src/service.lua
index b3ff0d07..652fa7d5 100644
--- a/server/src/service.lua
+++ b/server/src/service.lua
@@ -223,15 +223,10 @@ end
function mt:on_tick()
local proto = thread.proto()
if proto then
- self._idleClock = os.clock()
self:_doProto(proto)
- return
- end
- if os.clock() - self._idleClock >= 0.2 then
- self._idleClock = os.clock()
- self:_buildTextCache()
- self:_doDiagnostic()
end
+ self:_buildTextCache()
+ self:_doDiagnostic()
end
function mt:listen()
@@ -254,7 +249,6 @@ return function ()
_file = {},
_needCompile = {},
_needDiagnostics = {},
- _idleClock = os.clock(),
}, mt)
return session
end