summaryrefslogtreecommitdiff
path: root/server/src/method/textDocument
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/method/textDocument')
-rw-r--r--server/src/method/textDocument/hover.lua6
-rw-r--r--server/src/method/textDocument/implementation.lua6
-rw-r--r--server/src/method/textDocument/publishDiagnostics.lua10
-rw-r--r--server/src/method/textDocument/references.lua6
-rw-r--r--server/src/method/textDocument/rename.lua6
5 files changed, 17 insertions, 17 deletions
diff --git a/server/src/method/textDocument/hover.lua b/server/src/method/textDocument/hover.lua
index 29f7304a..3233b34a 100644
--- a/server/src/method/textDocument/hover.lua
+++ b/server/src/method/textDocument/hover.lua
@@ -2,13 +2,13 @@ local matcher = require 'matcher'
return function (lsp, params)
local uri = params.textDocument.uri
- local results, lines = lsp:loadText(uri)
- if not results then
+ local vm, lines = lsp:loadText(uri)
+ if not vm then
return nil
end
-- lua是从1开始的,因此都要+1
local position = lines:position(params.position.line + 1, params.position.character + 1)
- local text = matcher.hover(results, position)
+ local text = matcher.hover(vm.results, position)
if not text then
return nil
end
diff --git a/server/src/method/textDocument/implementation.lua b/server/src/method/textDocument/implementation.lua
index 07d48870..4d77882d 100644
--- a/server/src/method/textDocument/implementation.lua
+++ b/server/src/method/textDocument/implementation.lua
@@ -2,13 +2,13 @@ local matcher = require 'matcher'
return function (lsp, params)
local uri = params.textDocument.uri
- local results, lines = lsp:loadText(uri)
- if not results then
+ local vm, lines = lsp:loadText(uri)
+ if not vm then
return {}
end
-- lua是从1开始的,因此都要+1
local position = lines:position(params.position.line + 1, params.position.character + 1)
- local positions = matcher.implementation(results, position)
+ local positions = matcher.implementation(vm.results, position)
if not positions then
return {}
end
diff --git a/server/src/method/textDocument/publishDiagnostics.lua b/server/src/method/textDocument/publishDiagnostics.lua
index b0b36cb9..aa4a8340 100644
--- a/server/src/method/textDocument/publishDiagnostics.lua
+++ b/server/src/method/textDocument/publishDiagnostics.lua
@@ -76,12 +76,12 @@ local function createInfo(data, lines)
end
return function (lsp, params)
- local results = params.results
- local ast = params.ast
- local lines = params.lines
- local uri = params.uri
+ local vm = params.vm
+ local ast = params.ast
+ local lines = params.lines
+ local uri = params.uri
- local datas = matcher.diagnostics(ast, results, lines, uri)
+ local datas = matcher.diagnostics(ast, vm.results, lines, uri)
if not datas then
-- 返回空表以清空之前的结果
diff --git a/server/src/method/textDocument/references.lua b/server/src/method/textDocument/references.lua
index a4d8e6ab..22552fbd 100644
--- a/server/src/method/textDocument/references.lua
+++ b/server/src/method/textDocument/references.lua
@@ -3,13 +3,13 @@ local matcher = require 'matcher'
return function (lsp, params)
local uri = params.textDocument.uri
local declarat = params.context.includeDeclaration
- local results, lines = lsp:loadText(uri)
- if not results then
+ local vm, lines = lsp:loadText(uri)
+ if not vm then
return {}
end
-- lua是从1开始的,因此都要+1
local position = lines:position(params.position.line + 1, params.position.character + 1)
- local positions = matcher.references(results, position, declarat)
+ local positions = matcher.references(vm.results, position, declarat)
if not positions then
return {}
end
diff --git a/server/src/method/textDocument/rename.lua b/server/src/method/textDocument/rename.lua
index 6dd0d5ae..f9b16237 100644
--- a/server/src/method/textDocument/rename.lua
+++ b/server/src/method/textDocument/rename.lua
@@ -3,13 +3,13 @@ local matcher = require 'matcher'
return function (lsp, params)
local uri = params.textDocument.uri
local newName = params.newName
- local results, lines = lsp:loadText(uri)
- if not results then
+ local vm, lines = lsp:loadText(uri)
+ if not vm then
return {}
end
-- lua是从1开始的,因此都要+1
local position = lines:position(params.position.line + 1, params.position.character + 1)
- local positions = matcher.rename(results, position, newName)
+ local positions = matcher.rename(vm.results, position, newName)
if not positions then
return {}
end