diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-08-09 11:31:02 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-08-09 11:31:02 +0800 |
commit | 93b2a0384da629c9ce94955cd88e490b6f12dc80 (patch) | |
tree | edc8882b4aa83f4e3eabe970f2a2a97a74a984b1 /script/core | |
parent | df2f020ea023379f462ee5df861f708e69427994 (diff) | |
download | lua-language-server-93b2a0384da629c9ce94955cd88e490b6f12dc80.zip |
`FIX` completion: may not find results
Diffstat (limited to 'script/core')
-rw-r--r-- | script/core/searcher.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/script/core/searcher.lua b/script/core/searcher.lua index 6ea15d97..8f5af96b 100644 --- a/script/core/searcher.lua +++ b/script/core/searcher.lua @@ -361,8 +361,8 @@ local uriMapMT = {__index = function (self, uri) end} function m.searchRefsByID(status, suri, expect, mode) - local ast = files.getState(suri) - if not ast then + local state = files.getState(suri) + if not state then return end local searchStep @@ -380,6 +380,8 @@ function m.searchRefsByID(status, suri, expect, mode) local elockMap = setmetatable({}, uriMapMT) local ecallMap = setmetatable({}, uriMapMT) + compileAllNodes(state.ast) + local function lockExpanding(elock, ecall, id, field) if not field then field = '' |