summaryrefslogtreecommitdiff
path: root/server/src/method/textDocument/references.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-01-30 13:43:48 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-01-30 13:43:48 +0800
commitb14edd27b790ea984276f40202e5ba4acba652ba (patch)
tree27d643011a5ed4907d76e848c4e78fe36604d65e /server/src/method/textDocument/references.lua
parent3b6db7fa2512f2af92abc758cbf79844ad9f0301 (diff)
downloadlua-language-server-b14edd27b790ea984276f40202e5ba4acba652ba.zip
简单支持查找引用
Diffstat (limited to 'server/src/method/textDocument/references.lua')
-rw-r--r--server/src/method/textDocument/references.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/src/method/textDocument/references.lua b/server/src/method/textDocument/references.lua
index d4478d0e..ffa4d9e3 100644
--- a/server/src/method/textDocument/references.lua
+++ b/server/src/method/textDocument/references.lua
@@ -17,7 +17,7 @@ return function (lsp, params)
local locations = {}
for i, position in ipairs(positions) do
- local start, finish = position[1], position[2]
+ local start, finish, uri = position[1], position[2], position[3]
local start_row, start_col = lines:rowcol(start)
local finish_row, finish_col = lines:rowcol(finish)
locations[i] = {
@@ -35,6 +35,7 @@ return function (lsp, params)
}
}
end
+ log.debug(table.dump(locations))
local response = locations