Closed aaronkollasch closed 1 year ago
Hey wow! Very cool man! I was actually trying to implement something like this but by adding spaces till the end, was facing issues in that approach while calculating string length. Because unicode character count as four characters. But using virtual text is brilliant idea!!
Thanks!
The one drawback is that the virtual text can cut off the last two characters of a label, such as display:focus_rang
in the example. I tried setting wraplines
for to the window width minus some number but it didn't seem to work. Since it's only two columns, I don't think it's a huge issue. What do you think?
Tried them out, noticed that when the text is exactly as long as the window width, a few characters get hidden under the virtual text. Its not a big issue in my opinion anyways.
This PR adds markers that distinguish leaf/terminal nodes from branch/internal nodes. The markers can be enabled/disabled and their icons changed in a new
node_markers
config section.It also removes an extra column of whitespace on the right borders of the left and middle popup panes.
Screenshots
Selecting a branch node:
Showing a preview of a leaf node:
Alternate: with space after branch node marker. This takes more space, but the markers are better aligned:
Disabling node markers works as expected (also the selected cursorline on the left and middle panels now extends to the panel border):