diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-02-25 15:30:58 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-02-25 15:30:58 +0800 |
commit | cd6ac072254b8583a4b8d7f8a973977b7f054766 (patch) | |
tree | 723b1da2ce276235df949ee23a988c3cc669f700 /script/core/hover | |
parent | bf9828d40bd2c7803866138a925b9326ddc2cef3 (diff) | |
download | lua-language-server-cd6ac072254b8583a4b8d7f8a973977b7f054766.zip |
improve hover of `table<K, V>`
Diffstat (limited to 'script/core/hover')
-rw-r--r-- | script/core/hover/label.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/script/core/hover/label.lua b/script/core/hover/label.lua index 68af973e..a54abd09 100644 --- a/script/core/hover/label.lua +++ b/script/core/hover/label.lua @@ -48,7 +48,9 @@ local function asValue(source, title) local class = vm.getClass(source, 0) local literal = vm.getInferLiteral(source, 0) local cont - if not vm.hasInferType(source, 'string', 0) and not type:find('%[%]$') then + if not vm.hasInferType(source, 'string', 0) + and not type:find('%[%]$') + and not type:find('%w%<') then if #vm.getFields(source, 0) > 0 or vm.hasInferType(source, 'table', 0) then cont = buildTable(source) |