diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-08-15 18:15:11 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-08-15 18:15:11 +0800 |
commit | 67eae45b182fc8a7302970d71af4e76eafab0a2e (patch) | |
tree | dd8fa39ce2aaa9e5dabd03603f616bbfdfb05c69 /script-beta/core/completion.lua | |
parent | cbb42521abe5989a650915bbefa57215d4727ec3 (diff) | |
download | lua-language-server-67eae45b182fc8a7302970d71af4e76eafab0a2e.zip |
对锁进行分级
Diffstat (limited to 'script-beta/core/completion.lua')
-rw-r--r-- | script-beta/core/completion.lua | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/script-beta/core/completion.lua b/script-beta/core/completion.lua index 4792d7b8..ba4119fb 100644 --- a/script-beta/core/completion.lua +++ b/script-beta/core/completion.lua @@ -684,6 +684,10 @@ local function isAfterLocal(text, start) return word == 'local' end +local function checkUri(word, text, results) + +end + local function tryWord(ast, text, offset, results) local finish = skipSpace(text, offset) local word, start = findWord(text, finish) @@ -691,7 +695,11 @@ local function tryWord(ast, text, offset, results) return nil end local hasSpace = finish ~= offset - if not isInString(ast, offset) then + if isInString(ast, offset) then + if not hasSpace then + checkUri(word, text, results) + end + else local parent, oop = findParent(ast, text, start - 1) if parent then if not hasSpace then @@ -714,9 +722,9 @@ local function tryWord(ast, text, offset, results) end end end - end - if not hasSpace then - checkCommon(word, text, results) + if not hasSpace then + checkCommon(word, text, results) + end end end |