diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-09-13 18:36:31 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-09-13 18:36:31 +0800 |
commit | 044342b769a858297ffa35c03db84ed613cd95bb (patch) | |
tree | f027a871a4fba985d5f31b190750baf0ef5a1a1a | |
parent | 0354b01b082384279945c6ef02be8f297b3e9919 (diff) | |
download | lua-language-server-044342b769a858297ffa35c03db84ed613cd95bb.zip |
搜索路径支持空串
-rw-r--r-- | script-beta/core/completion.lua | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/script-beta/core/completion.lua b/script-beta/core/completion.lua index 3e272f72..86225a4a 100644 --- a/script-beta/core/completion.lua +++ b/script-beta/core/completion.lua @@ -493,7 +493,7 @@ local function checkUri(ast, text, offset, results) } end -- TODO 翻译 - collect[info.expect][#collect[info.expect]+1] = ([=[* (%s)[%s] (假设搜索路径包含 `%s`)]=]):format( + collect[info.expect][#collect[info.expect]+1] = ([=[* [%s](%s) (假设搜索路径包含 `%s`)]=]):format( path, files.getOriginUri(uri), info.searcher @@ -581,7 +581,8 @@ local function isFuncArg(ast, offset) end local function trySpecial(ast, text, offset, results) - if isInString(ast.ast, offset) then + if isInString(ast, offset) then + checkUri(ast, text, offset, results) return end -- x[#x+1] @@ -596,9 +597,6 @@ local function tryWord(ast, text, offset, results) end local hasSpace = finish ~= offset if isInString(ast, offset) then - if not hasSpace then - checkUri(ast, text, offset, results) - end else local parent, oop = findParent(ast, text, start - 1) if parent then |