diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-02-01 16:00:15 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-02-01 16:00:15 +0800 |
commit | 72f18d0fb52ff5878549bf8e1d2be9c4ebf93340 (patch) | |
tree | ed880848c80e2e563a7f8d09265a038036b6ba27 /script | |
parent | 988266b411f82a5cd2c5534e9f8a68fe0867291b (diff) | |
download | lua-language-server-72f18d0fb52ff5878549bf8e1d2be9c4ebf93340.zip |
clean up code
Diffstat (limited to 'script')
-rw-r--r-- | script/core/hint.lua | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/script/core/hint.lua b/script/core/hint.lua index f1aea66c..f592bd77 100644 --- a/script/core/hint.lua +++ b/script/core/hint.lua @@ -20,8 +20,7 @@ local function typeHint(uri, edits, start, finish) if source[1] == '_' then return end - -- 排除掉 xx = function 与 xx = {} - if source.value and (source.value.type == 'function' or source.value.type == 'table') then + if source.value and guide.isLiteral(source.value) then return end if source.parent.type == 'funcargs' then @@ -33,9 +32,6 @@ local function typeHint(uri, edits, start, finish) return end end - if source.value and guide.isLiteral(source.value) then - return - end local infer = vm.getInferType(source, 0) if infer == 'any' or infer == 'nil' then |