fix(dap.hover): format non-value nodes without =

This commit is contained in:
2025-09-28 15:55:16 +02:00
parent 5f90120f44
commit 39c1aac2a7
+4 -4
View File
@@ -92,6 +92,9 @@ function Node:format_c()
)
end
if self.item.value == "" then
return string.format("%s %s", self.item.type, self.item.name)
else
return string.format(
"%s %s = %s",
self.item.type,
@@ -99,6 +102,7 @@ function Node:format_c()
self.item.value
)
end
end
---@return boolean
function Node:is_expandable()
@@ -127,10 +131,6 @@ function Node:format_into(content)
end
content:add_with_treesitter(text, self.lang)
if self.item.value == "" then
content:add("...", "@comment")
end
end
return Node