lsp-status.nvim
lsp-status.nvim copied to clipboard
Always add a space after status_symbol
I noticed once I'd set this up that when I only had hints, no space was being added after the status symbol:
I expected to find when I looked in the code that this was unintentional, but this looks pretty intentional. However, I think this should be considered a bug, because it treats hints differently from the other types of diagnostics.
This change makes the diagnostics when there are only hints...
...render the same as when there are other types of diagnostics too, e.g. hints and errors:
Thanks! As mentioned in #35 (which this will close), this was because the statusline proof-of-concept code came from my own setup, which uses a double-wide symbol for hints and looks wrong with a space added.
I'm happy to merge this and make handling of the different diagnostics types more consistent, but perhaps we should also change the default symbol (https://github.com/nvim-lua/lsp-status.nvim/blob/925acdab0886fe5f0752561ea49e95b9f02e09c7/lua/lsp-status.lua#L9) in this PR, to ensure that things still look correct with the defaults?
Ah okay, I understand. So we'd need to change the default indicator_hint
so that it has a space before it?
That's one option, I suppose. I more meant that we'd just change the default indicator_hint
symbol to one that isn't double-wide and therefore will look OK with the space added after it.