nvim-lua / lsp-status.nvim

Utility functions for getting diagnostic status and progress messages from LSP servers, for use in the Neovim statusline
MIT License
625 stars 41 forks source link

Question: reasoning behind `only_hint` #35

Open gegoune opened 3 years ago

gegoune commented 3 years ago

Hi, https://github.com/nvim-lua/lsp-status.nvim/commit/8fb7cc4b73c992d999e3709a8c788ffc9ab7f59c introduced example statusline. I am struggling to understand why only_hint is in there. What is special about hints that they are not having space prefix? I want to have a space in front of displayed diagnostics and all but hint have one (that is if only hint is displayed). Had to add an ugly workaround in my statusline configuration to get what I want.

I am not displaying symbol (lsp_status.config({status_symbol = ""})) if that makes any difference.

wbthomason commented 3 years ago

Ah - if I recall correctly, this was because my setup uses a double-wide character for the hint symbol and status symbol, which meant that having a space character between those two made the spacing look off. The default statusline module came right from my statusline setup, so this artifact probably got carried over. I'd be OK merging a change to remove this special casing, as long as we can ensure that the spacing still looks right for the default set of symbols.