SmiteshP/nvim-gps

Space between icon and name missing for single node in HTML

Closed this issue · 2 comments

Usually, the plugin renders a space between the icon and the name for a node:

image
You can see the default space between statusline elements at position 1, the icon at position 2 and a space at position 3
(Note: The icon extends to position 3 a little because I am using a not-strictly-monospace Nerdfont (CaskaydiaCove Nerd Font instead of CaskaydiaCove Nerd Font Mono) and there is space for it to do so.)

However, in HTML files, this space is missing when only a single node is displayed:
image
Here, position 1 is still the seperating space between statusline elements, position 2 is still occupied by the icon (now a little squeezed because it can't extend to more space on the side), and position 3 already starts the tag name.

Strangely, I've also done a quick test for other languages and wasn't able to replicate this behaviour there. Sadly, I can't access another installation right now to confirm this, so maybe someone else could chime in and confirm if this also happens for others.

I've quickly switched the font to the Mono variant of the CaskaydiaCove Nerd Font that forces the icons to use the same space as anything else to get some more images.

Normal behaviour with a space at pos3 (between icon and name):
image

And the single-node behaviour with the 'h' from the tag name at pos3:
image

The plugin is returning the same amount of spacing between the icon and the text in both the cases you mentioned. Rendering of nerdfonts properly is the job of the terminal emulator and it can be hit or miss sometimes.
I would suggest you could try changing terminal emulators and/or Font to see if this issue is fixed.
You could also append one more space to the tag icon or change the tag icon to something else.