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
621 stars 41 forks source link

Default kind_labels to CompletionItemKind #52

Open wbthomason opened 3 years ago

wbthomason commented 3 years ago

Per discussion with @Shatur95 in #49

Shatur commented 3 years ago

Does anyone need to have kind_labels empty? If not, then we can read CompletionItemKind if kind_labels is not set. Or, alternatively, it could be an additional boolean option.

dhruvmanila commented 3 years ago

You can do this: if the kind_labels field is nil then default to CompletionItemKind otherwise use that and if the user does not want any labels then they can enter an empty table like kind_labels = {}.

Thinking more about it, I won't prefer to use the default. For CompletionItemKind, I have set it up like <icon> <kind>:

Screenshot 2021-05-19 at 21 15 33

And for lsp-status plugin which I'm using in the statusline, I have set it up like <icon>

Screenshot 2021-05-19 at 21 15 58

I think most people would prefer the verbose version for the completion menu and icon only version for the statusline.