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.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/src/method/textDocument/definition.lua b/server/src/method/textDocument/definition.lua
index f6557061..bb8918d6 100644
--- a/server/src/method/textDocument/definition.lua
+++ b/server/src/method/textDocument/definition.lua
@@ -6,7 +6,7 @@ return function (lsp, params)
local uri = params.textDocument.uri
local ast, lines = lsp:loadText(uri)
if not ast then
- return nil, '找不到文件:' .. uri
+ return {}
end
-- lua是从1开始的,因此都要+1
local position = lines:position(params.position.line + 1, params.position.character + 1, 'utf8')