fix: Incorporate nesting depth in hover highlight

This commit is contained in:
charburgx
2022-08-17 17:13:03 -05:00
parent 0d4d242ca5
commit 5629b6dafe
2 changed files with 9 additions and 5 deletions

View File

@@ -74,11 +74,13 @@ M.add_hover_highlights = function(bufnr, nodes)
end
local marker_fac = (config.options.fold_markers and 1) or 0
ui.add_hover_highlight(
bufnr,
node.line_in_outline - 1,
(node.depth + marker_fac) * 2
)
if node.prefix_length then
ui.add_hover_highlight(
bufnr,
node.line_in_outline - 1,
node.prefix_length
)
end
::continue::
end
end