summaryrefslogtreecommitdiff
path: root/server/src/method/textDocument
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-12-28 15:07:33 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-12-28 15:07:33 +0800
commit1f6dc773d1af5bab029e5c1864360c3f40b06874 (patch)
tree5765ca287d6ef652f0d1407b297e9875e845e4d9 /server/src/method/textDocument
parent4574e0c6033bf8358989a5f14f8861c3627026f7 (diff)
downloadlua-language-server-1f6dc773d1af5bab029e5c1864360c3f40b06874.zip
修正报错
Diffstat (limited to 'server/src/method/textDocument')
-rw-r--r--server/src/method/textDocument/definition.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/src/method/textDocument/definition.lua b/server/src/method/textDocument/definition.lua
index 1f21d67d..0df5c522 100644
--- a/server/src/method/textDocument/definition.lua
+++ b/server/src/method/textDocument/definition.lua
@@ -1,6 +1,9 @@
local matcher = require 'matcher'
local function checkWorkSpaceComplete(lsp, result)
+ if result.type ~= 'field' and result.type ~= 'local' then
+ return
+ end
if result.value then
if not result.value.isRequire then
return