summaryrefslogtreecommitdiff
path: root/server/src/method
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-12-20 18:55:46 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-12-20 18:55:46 +0800
commit750834e2d06cd6a6a461987001be9cb991c89bc7 (patch)
tree217f3eb3f5f39390debedb4c3c259f8bf639d589 /server/src/method
parent835254c0283940eb6127aa42b49cb1850e8bc8b6 (diff)
downloadlua-language-server-750834e2d06cd6a6a461987001be9cb991c89bc7.zip
跨文件跳转定义
Diffstat (limited to 'server/src/method')
-rw-r--r--server/src/method/textDocument/definition.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/src/method/textDocument/definition.lua b/server/src/method/textDocument/definition.lua
index d2ff7c3f..6be93ff8 100644
--- a/server/src/method/textDocument/definition.lua
+++ b/server/src/method/textDocument/definition.lua
@@ -15,11 +15,11 @@ return function (lsp, params)
local locations = {}
for i, position in ipairs(positions) do
- local start, finish = position[1], position[2]
+ local start, finish, valueUri = position[1], position[2], position[3]
local start_row, start_col = lines:rowcol(start)
local finish_row, finish_col = lines:rowcol(finish)
locations[i] = {
- uri = uri,
+ uri = valueUri or uri,
range = {
start = {
line = start_row - 1,