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

Add additional symbol kinds for `current_function` #49

Closed rileyshahar closed 3 years ago

rileyshahar commented 3 years ago

Resolves #48.

This is a larger list of symbol kinds than the original issue, but I think it's justified. These kinds all tend to be top-level, which means you wouldn't lose other information by including these.

Shatur commented 3 years ago

Is it possible to use built-in require('vim.lsp.protocol').CompletionItemKind? It is not very convenient to set this setting twice.

wbthomason commented 3 years ago

@Shatur95 Won't that cause issues if users customize CompletionItemKind (e.g. via https://github.com/onsails/lspkind-nvim)?

Also, right now, this is nothing extra to configure. Are you referring to customizing how the current symbol is displayed, or filtering the set of symbol kinds to display?

Shatur commented 3 years ago

@Shatur95 Won't that cause issues if users customize CompletionItemKind (e.g. via https://github.com/onsails/lspkind-nvim)?

No, this plugins just sets CompletionItemKind in an ordinary way, so should work :)

Also, right now, this is nothing extra to configure. Are you referring to customizing how the current symbol is displayed, or filtering the set of symbol kinds to display?

I was referring to the display settings. I need to set CompletionItemKind and kind_labels separately. But, probably, this is okay, because by default, CompletionItemKind contains just text without icons.

wbthomason commented 3 years ago

Ah - I think this is actually a different issue, that of unifying kind_labels and CompletionItemKind. I would definitely be OK with using CompletionItemKind as a default for kind_labels, but I think that should happen in a separate PR - this PR is just about expanding the set of kinds which may be displayed, not changing how they're displayed.

rileyshahar commented 3 years ago

(+1 to using CompletionItemKind as a default - I think kind_labels should still be configurable, because you might want different labels on your statusline vs for completion items - but I agree that this is completely orthogonal to this PR.)

Shatur commented 3 years ago

Yes, I just asked, sorry for confusing :)

wbthomason commented 3 years ago

I think this is good to go. Thanks, @nihilistkitten!