omnisharp-brackets icon indicating copy to clipboard operation
omnisharp-brackets copied to clipboard

Odd behaviour with Dictionary

Open jchannon opened this issue 10 years ago • 8 comments

This is what I get when typing screen shot 2014-11-04 at 22 26 21

When I then type D i get a different completion and when accepted I get the snippet stuff for TKey,TValue, @nosami said it might be a server bug

screen shot 2014-11-04 at 22 26 55

jchannon avatar Nov 04 '14 22:11 jchannon

This looks like it could be a problem with omnisharp as the request looks ok. @nosami any thoughts?

mat-mcloughlin avatar Nov 05 '14 08:11 mat-mcloughlin

Which property are you using on the left hand side?

nosami avatar Nov 05 '14 10:11 nosami

If you are using snippeted completions, I think that you should use MethodHeader on the left, and ReturnType on the right.

nosami avatar Nov 05 '14 10:11 nosami

I'm using DisplayText on the left and ReturnType on the right atm. I'll change it

mat-mcloughlin avatar Nov 05 '14 10:11 mat-mcloughlin

As a possible extension to this bug there seems to be some inconsistent behaviour with intellisense when using property initialiser. If you attempt to invoke the auto complete when the curly brackets are on the same line like

var foo = new Foo { };

It will bring back the properties. However if you have the brackets on different lines it doesn't bring anything back:

var foo = new Foo
{
};

mat-mcloughlin avatar Nov 16 '14 20:11 mat-mcloughlin

In Sublime I don't get the original bug now but maybe cause I changed to snippet based completions

jchannon avatar Nov 16 '14 21:11 jchannon

The first issue is fixed now on the server. Don't know about the 2nd one yet.

nosami avatar Nov 20 '14 22:11 nosami

Since this issue is still open I interpret it as you also track the unresolved new Foo { }; problem that Mat described 16 Nov. I've looked into that a bit. I would say that this problem too is on the omnisharp-server side. Attaching an animated gif that displays both Brackets and the omnisharp-server responses beneath. omnisharp_brackets_completion

DonKarlssonSan avatar Jan 20 '15 21:01 DonKarlssonSan