dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
19.08k stars 4.04k forks source link

Intellisense + Capital Letters #17275

Closed josefpihrt closed 2 weeks ago

josefpihrt commented 7 years ago

Version Used: Visual Studio 2017 RC 15.0.0-RC4+26206.0

intellisense

Pilchie commented 7 years ago

Tag @kuhlenh @CyrusNajmabadi @rchande @DustinCampbell

How do people feel about changing match preferences in cases like this?

CyrusNajmabadi commented 7 years ago

Basically, an exact case-sensitive, CamelCase match would beat out case-insensitive other matches. I think that's ok. If the filter text contains capital letters, that's a strong signal this is what the usre wants. I think we could safely take this.

kuhlenh commented 7 years ago

:+1: ran into this today...wanted to do DateTime.Now.AD to filter to AddDays() but it kept just preselecting Add(). As long as we make it case-sensitive, this should be fine.

DustinCampbell commented 7 years ago

I"m also in favor of this. Sounds like a good tweak to me.

josefpihrt commented 7 years ago

I realized that name can also start with two upper-case letters (interface name). So I would say that priority should go like this:

  1. AB...
  2. A...B...
  3. Ab...
miloush commented 7 years ago

Also see #16053 for discussion and the current behavior.

This would address the same issue as tn case mentioned there. Not the MF case though. EDIT: the tn case there is exact match

josefpihrt commented 7 years ago

I would propose to take camel-cased identifiers into consideration. This could improve developer productivity when typing local variable name (or parameter name).

A simple rule could be applied:

  1. aB...
  2. a...B...

Current behavior:

camelcase

0xd4d commented 7 years ago

How about this one, happens if you have added using System.ComponentModel; :

completion

ArgumentNullException is a better match, and also happens to be exactly what I wanted.

bboyle1234 commented 4 years ago

PLEASE make intellisense case-aware. When I type myV it should select myValue instead of MyValue. When I type Myv it should select MyValue instead of myValue.

Here's the kicker: When a user bothers to use the shift key to capitalize a letter, they want the variable or member that HAS that letter capitalized. I'd die of joy if you guys can make this happen. PLEASE.

bboyle1234 commented 4 years ago

@rchande , I have no idea how I managed "unassign" you above ... hopefully you can fix that, sorry.