summaryrefslogtreecommitdiff
path: root/server/src/matcher
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/matcher')
-rw-r--r--server/src/matcher/hover.lua6
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