diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-05-19 20:13:17 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-05-19 20:13:17 +0800 |
commit | 4b444113489aae83d31f97b41161822efd0b16f6 (patch) | |
tree | 092abe86d083d29af451b05c03a43d9d2727d2f7 /script/core/searcher.lua | |
parent | 2f6d6b215d1c902533936a8ef6fc49b3b3f7f658 (diff) | |
download | lua-language-server-4b444113489aae83d31f97b41161822efd0b16f6.zip |
update
Diffstat (limited to 'script/core/searcher.lua')
-rw-r--r-- | script/core/searcher.lua | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/script/core/searcher.lua b/script/core/searcher.lua index 47fadf98..f2f2bd18 100644 --- a/script/core/searcher.lua +++ b/script/core/searcher.lua @@ -64,8 +64,7 @@ function m.pushResult(status, mode, source) results[#results+1] = source end end - if parent.type == 'return' - or parent.type == 'callargs' then + if parent.type == 'return' then if noder.getID(source) ~= status.id then results[#results+1] = source end @@ -88,6 +87,10 @@ function m.pushResult(status, mode, source) or source.type == 'tablefield' or source.type == 'function' or source.type == 'table' + or source.type == 'string' + or source.type == 'boolean' + or source.type == 'number' + or source.type == 'nil' or source.type == 'doc.class.name' or source.type == 'doc.type.name' or source.type == 'doc.alias.name' @@ -359,9 +362,10 @@ function m.searchRefsByID(status, uri, expect, mode) return end status.crossedGlobal[firstID] = true + local tid = id .. (field or '') for guri in files.eachFile() do if not files.eq(uri, guri) then - crossSearch(status, guri, id, mode) + crossSearch(status, guri, tid, mode) end end end |