summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-12-02 21:50:21 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-12-02 21:50:21 +0800
commit62f15442152461495afcebcc0d0b048f3eacc96b (patch)
treeaaaac28532a75c3402b2b400144cf8b7ce4b6286
parent949666e808b3e75b002958cddf663b2b0d1856aa (diff)
downloadlua-language-server-62f15442152461495afcebcc0d0b048f3eacc96b.zip
enable meta reference when source is meta
-rw-r--r--script/core/reference.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/script/core/reference.lua b/script/core/reference.lua
index ae07c71e..a522909f 100644
--- a/script/core/reference.lua
+++ b/script/core/reference.lua
@@ -69,13 +69,15 @@ return function (uri, offset)
return nil
end
+ local metaSource = vm.isMetaFile(uri)
+
local results = {}
for _, src in ipairs(vm.getRefs(source, 5)) do
local root = guide.getRoot(src)
if not root then
goto CONTINUE
end
- if vm.isMetaFile(root.uri) then
+ if not metaSource and vm.isMetaFile(root.uri) then
goto CONTINUE
end
if ( src.type == 'doc.class.name'