diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-12-17 22:44:08 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-12-17 22:44:08 +0800 |
commit | ca24380b0ead49aa28d44af959f780a58cbe9699 (patch) | |
tree | c70bf4fb2d1c282daa28dd13f675a36a03a1b4d7 /server/src/matcher | |
parent | 07c3230d29cb7b2660d6027733756c8e4adb591e (diff) | |
download | lua-language-server-ca24380b0ead49aa28d44af959f780a58cbe9699.zip |
强制字面量
Diffstat (limited to 'server/src/matcher')
-rw-r--r-- | server/src/matcher/hover.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/src/matcher/hover.lua b/server/src/matcher/hover.lua index 497bc528..41dccd39 100644 --- a/server/src/matcher/hover.lua +++ b/server/src/matcher/hover.lua @@ -330,10 +330,10 @@ local function getValueHover(name, valueType, result, source, lib) local value local tip if lib then - value = lib.value + value = lib.code or (lib.value and ('%q'):format(lib.value)) tip = lib.description or '' else - value = result.value.value + value = result.value.value and ('%q'):format(result.value.value) tip = '' end @@ -341,7 +341,7 @@ local function getValueHover(name, valueType, result, source, lib) if value == nil then text = ('%s %s'):format(valueType, name) else - text = ('%s %s = %q'):format(valueType, name, value) + text = ('%s %s = %s'):format(valueType, name, value) end return ([[ ```lua |