summaryrefslogtreecommitdiff
path: root/script/core/completion.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-01-04 17:23:19 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-01-04 17:23:19 +0800
commit4de9d6fe6867e1aa079b7187c1252514a4e603e5 (patch)
tree913347a861ad91a0284a7620f7d0e52a486fd26f /script/core/completion.lua
parentfc5716feb8793140f63218fa2baefdf25c603dd7 (diff)
downloadlua-language-server-4de9d6fe6867e1aa079b7187c1252514a4e603e5.zip
completion: show words in string
Diffstat (limited to 'script/core/completion.lua')
-rw-r--r--script/core/completion.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/script/core/completion.lua b/script/core/completion.lua
index e7ebd1e0..a36cf8f4 100644
--- a/script/core/completion.lua
+++ b/script/core/completion.lua
@@ -1158,6 +1158,11 @@ local function tryWord(ast, text, offset, results)
end
local hasSpace = finish ~= offset
if isInString(ast, offset) then
+ if not hasSpace then
+ if #results == 0 then
+ checkCommon(ast, word, text, offset, results)
+ end
+ end
else
local parent, oop = findParent(ast, text, start - 1)
if parent then