diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-11-18 21:07:47 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-11-18 21:07:47 +0800 |
commit | 9ad3190aa784bf4830d495ea02f2bc4601ae0b00 (patch) | |
tree | 272048ef1b4d465fb4720271e0ff07a58caa512d | |
parent | 1827e053fa17863a7a3632a731540176648242ae (diff) | |
download | lua-language-server-9ad3190aa784bf4830d495ea02f2bc4601ae0b00.zip |
meta 文件不要预览上下文
-rw-r--r-- | script-beta/core/completion.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/script-beta/core/completion.lua b/script-beta/core/completion.lua index 840d4cd7..b466edcd 100644 --- a/script-beta/core/completion.lua +++ b/script-beta/core/completion.lua @@ -208,7 +208,10 @@ local function getSnip(source) local text = files.getText(uri) local lines = files.getLines(uri) if not text then - return nil + goto CONTINUE + end + if vm.isMetaFile(uri) then + goto CONTINUE end local row = guide.positionOf(lines, def.start) local firstRow = lines[row] @@ -216,6 +219,7 @@ local function getSnip(source) local snip = text:sub(firstRow.start, lastRow.finish) return snip end + ::CONTINUE:: end end |