fix(dap.hover): format non-value nodes without =
This commit is contained in:
@@ -92,6 +92,9 @@ function Node:format_c()
|
|||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if self.item.value == "" then
|
||||||
|
return string.format("%s %s", self.item.type, self.item.name)
|
||||||
|
else
|
||||||
return string.format(
|
return string.format(
|
||||||
"%s %s = %s",
|
"%s %s = %s",
|
||||||
self.item.type,
|
self.item.type,
|
||||||
@@ -99,6 +102,7 @@ function Node:format_c()
|
|||||||
self.item.value
|
self.item.value
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
---@return boolean
|
---@return boolean
|
||||||
function Node:is_expandable()
|
function Node:is_expandable()
|
||||||
@@ -127,10 +131,6 @@ function Node:format_into(content)
|
|||||||
end
|
end
|
||||||
|
|
||||||
content:add_with_treesitter(text, self.lang)
|
content:add_with_treesitter(text, self.lang)
|
||||||
|
|
||||||
if self.item.value == "" then
|
|
||||||
content:add("...", "@comment")
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return Node
|
return Node
|
||||||
|
|||||||
Reference in New Issue
Block a user