OmniSharp / omnisharp-vim

Vim omnicompletion (intellisense) and more for C#
http://www.omnisharp.net
MIT License
1.72k stars 168 forks source link

OmniSharp#Complete don't deliver "kind" item #865

Closed ulfbert-san closed 1 month ago

ulfbert-san commented 1 month ago

Hello,

I want to filter the auto-completion suggestions. That's why I need the "kind" item (described here ":help complete-functions"). It's a flag, which kind of suggestions this actually is - method, class etc.

I don't have a custom method assign to &omnifunc. I use the default one from omnisharp-vim. Is it possible to add this item to the dictionary, that would be really nice! Or works this already and it's a bug on my system?

Or is there a workaround, to add this item? I'm really glad for any help.

Here is a log, when i type: "Console."

Suggestions.txt

Greetings ulfbert

ulfbert-san commented 1 month ago

I found the solution. In this file:

https://github.com/OmniSharp/omnisharp-vim/blob/f9c5d3e3375e8b5688a4506e813cb21bdc7329b1/autoload/OmniSharp/actions/complete.vim#L81

You need to add this parameter:

https://github.com/OmniSharp/omnisharp-roslyn/blob/c16eb2a120ed7cee05ebc1bd7e50a63c9d398e08/src/OmniSharp.Abstractions/Models/v1/AutoComplete/AutoCompleteRequest.cs#L54

Can someone please do that? Or was there a reason, not to add this parameter?

nickspoons commented 1 month ago

Hi @ulfbert-san,

Have a look at PR #866 and tell me what you think.

ulfbert-san commented 1 month ago

Hi @nickspoons,

I tested it, works smooth 👍 No errors or unexpecting values in kind param. Thank you very much! <3