Aspnetcore: Forced completion of lambda parameter name as a similar type name

Created on 10 Jun 2020  路  10Comments  路  Source: dotnet/aspnetcore

IW2215cvtp

Microsoft Visual Studio Enterprise 2019 Int Preview
Version 16.7.0 Preview 3.0 [30208.133.master]
VisualStudio.16.IntPreview/16.7.0-pre.3.0+30208.133.master
Microsoft .NET Framework
Version 4.8.03752
Experimental Razor tooling enabled

Done External area-razor.tooling blocked bug

All 10 comments

For comparison, here's what VS 16.6 does:
y197maWBUb

This looks to be due to pre-select limitations in completion. @dibarbet do you guys have a Roslyn issue representing pre-select support?

Not a roslyn issue, but here is the LSP client issue - https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1139727

Not a roslyn issue, but here is the LSP client issue - https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1139727

So given pre-select is working I thought this would be solved but there's actually more going on. So when Dan is typing the completion event has already happened and pre-select has already been indicated in the initial response. So unless Roslyn is saying "isIncomplete: true" for every character in order to indicate that the LSP platform should re-ask for more completions then this wont work as expected. @dibarbet is that what you all plan to do?

@NTaylorMullen do you mean when the ( is typed and the "Todo" type shows up selected? So after you type lower-case "t" we want the 'pre-selected' item to be "todos" instead of "Todo"?

@NTaylorMullen do you mean when the ( is typed and the "Todo" type shows up selected? So after you type lower-case "t" we want the 'pre-selected' item to be "todos" instead of "Todo"?

No, it's actually here: @todos.Count(to|. The expectation is that "nothing" is selected so a user can provide their own lambda argument name; however, Todo (the Type) stays selected because the LSP platform filters down to the most relevant item while typing.

@NTaylorMullen ahh I think we need to be in suggestion mode when inside the lambda. It looks like we're not right now. That may just be a bug.

@NTaylorMullen does this look like how you would expect it?
suggestion_completion

Seems like there is some better sorting that can be done on the client side but otherwise seems to match 16.6 better

@NTaylorMullen does this look like how you would expect it?

Yup! I assume at the beginning of the line if you type programs (outside of a lambda) it gets auto-selected and is not in "sugestion mode" correct?

Yup! I assume at the beginning of the line if you type programs (outside of a lambda) it gets auto-selected and is not in "sugestion mode" correct?

Yeah only special occurrences (like lambdas) go into suggestion mode.

Was this page helpful?
0 / 5 - 0 ratings