diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-02-23 20:37:59 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-02-23 20:37:59 +0800 |
commit | 64b7635a5022a13df67acc5632497d75b3c378c7 (patch) | |
tree | fe57f8416adbf4a4026d8fe1e590fa482e59ae16 /script | |
parent | 811a2f24aba428bad5e9e0d30860202e780ec0d2 (diff) | |
download | lua-language-server-64b7635a5022a13df67acc5632497d75b3c378c7.zip |
improve doc.type.table
Diffstat (limited to 'script')
-rw-r--r-- | script/parser/guide.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/script/parser/guide.lua b/script/parser/guide.lua index 53849a52..d510837a 100644 --- a/script/parser/guide.lua +++ b/script/parser/guide.lua @@ -2494,6 +2494,10 @@ function m.pushResult(status, mode, ref, simple) or ref.type == 'doc.alias.name' or ref.type == 'doc.field' then results[#results+1] = ref + elseif ref.type == 'doc.type' then + if #ref.enums > 0 or #ref.resumes > 0 then + results[#results+1] = ref + end end if ref.parent and ref.parent.type == 'return' then if m.getParentFunction(ref) ~= m.getParentFunction(simple.node) then @@ -2537,6 +2541,10 @@ function m.pushResult(status, mode, ref, simple) or ref.type == 'doc.alias.name' or ref.type == 'doc.field' then results[#results+1] = ref + elseif ref.type == 'doc.type' then + if #ref.enums > 0 or #ref.resumes > 0 then + results[#results+1] = ref + end end if ref.parent and ref.parent.type == 'return' then results[#results+1] = ref |