summaryrefslogtreecommitdiff
path: root/server/src/method/textDocument/definition.lua
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/method/textDocument/definition.lua')
-rw-r--r--server/src/method/textDocument/definition.lua16
1 files changed, 15 insertions, 1 deletions
diff --git a/server/src/method/textDocument/definition.lua b/server/src/method/textDocument/definition.lua
index 07f0f3d8..e419b57e 100644
--- a/server/src/method/textDocument/definition.lua
+++ b/server/src/method/textDocument/definition.lua
@@ -38,7 +38,7 @@ local function findResult(lsp, params)
if valueLines then
local start_row, start_col = valueLines:rowcol(start)
local finish_row, finish_col = valueLines:rowcol(finish)
- locations[i] = {
+ locations[#locations+1] = {
uri = valueUri,
range = {
start = {
@@ -52,6 +52,20 @@ local function findResult(lsp, params)
},
}
}
+ else
+ locations[#locations+1] = {
+ uri = valueUri,
+ range = {
+ start = {
+ line = 0,
+ character = 0,
+ },
+ ['end'] = {
+ line = 0,
+ character = 0,
+ },
+ }
+ }
end
end