summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--server/src/method/textDocument/didClose.lua2
-rw-r--r--server/src/service.lua15
2 files changed, 12 insertions, 5 deletions
diff --git a/server/src/method/textDocument/didClose.lua b/server/src/method/textDocument/didClose.lua
index d4edb624..d7f2841a 100644
--- a/server/src/method/textDocument/didClose.lua
+++ b/server/src/method/textDocument/didClose.lua
@@ -1,5 +1,5 @@
return function (lsp, params)
local doc = params.textDocument
- lsp:removeText(doc.uri, doc.version)
+ --lsp:removeText(doc.uri, doc.version)
return true
end
diff --git a/server/src/service.lua b/server/src/service.lua
index 267ac29e..e6515fa5 100644
--- a/server/src/service.lua
+++ b/server/src/service.lua
@@ -37,7 +37,7 @@ function mt:_callMethod(name, params)
local suc, res, res2 = pcall(f, self, params)
local passed = os.clock() - clock
if passed > 0.01 then
- log.debug(('Task [%s] takes [%.3f] sec.'):format(name, passed))
+ log.debug(('Task [%s] takes [%.3f]sec.'):format(name, passed))
end
if suc then
return res, res2
@@ -86,18 +86,25 @@ function mt:_buildTextCache()
size = size + #obj.text
end
local passed = os.clock() - clock
+
+ local sum = 0
+ for _ in pairs(self._file) do
+ sum = sum + 1
+ end
log.debug(('\n\z
Cache completion\n\z
- Cost: [%.3f] sec\n\z
+ Cost: [%.3f]sec\n\z
Num: [%d]\n\z
Size: [%.3f]kb\n\z
Speed:[%.3f]kb/s\n\z
- Mem: [%.3f]kb'):format(
+ Mem: [%.3f]kb\n\z
+ Sum: [%d]'):format(
passed,
#list,
size / 1000,
size / passed / 1000,
- collectgarbage 'count'
+ collectgarbage 'count',
+ sum
))
end