summaryrefslogtreecommitdiff
path: root/server/src/service.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-12-06 18:07:10 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-12-06 18:07:10 +0800
commit979676be219b83c7295409824ee8280a3335cc5a (patch)
treee4928df884ddd961671d62876e84d2bec7c9ab19 /server/src/service.lua
parentd119c1cefff8a6a2812ac10375297f033a8cf5f0 (diff)
downloadlua-language-server-979676be219b83c7295409824ee8280a3335cc5a.zip
枚举
Diffstat (limited to 'server/src/service.lua')
-rw-r--r--server/src/service.lua20
1 files changed, 10 insertions, 10 deletions
diff --git a/server/src/service.lua b/server/src/service.lua
index ab33b8e2..98d993f2 100644
--- a/server/src/service.lua
+++ b/server/src/service.lua
@@ -66,20 +66,20 @@ end
function mt:_doProto(proto)
local id = proto.id
- local method = proto.method
+ local name = proto.method
local params = proto.params
- local response, err = self:_callMethod(method, params)
+ local response, err = self:_callMethod(name, params)
if not id then
return
end
- local proto = json.table()
- proto.id = id
+ local container = table.container()
+ container.id = id
if err then
- proto.error = err
+ container.error = err
else
- proto.result = response
+ container.result = response
end
- self:_send(proto)
+ self:_send(container)
end
function mt:_doDiagnostic()
@@ -95,11 +95,11 @@ function mt:_doDiagnostic()
self._needDiagnostics[uri] = nil
end
for uri, data in pairs(copy) do
- local method = 'textDocument/publishDiagnostics'
- local res = self:_callMethod(method, data)
+ local name = 'textDocument/publishDiagnostics'
+ local res = self:_callMethod(name, data)
if res then
self:_send {
- method = method,
+ method = name,
params = {
uri = uri,
diagnostics = res,