dotnet / razor

Compiler and tooling experience for Razor ASP.NET Core apps in Visual Studio, Visual Studio for Mac, and VS Code.
https://asp.net
MIT License
489 stars 190 forks source link

Blazor : razor editor does not suggest any intellisense options, until I enter a character and then delete it, then it works fine #10749

Open vsfeedback opened 4 weeks ago

vsfeedback commented 4 weeks ago

This issue has been moved from a ticket on Developer Community.


[severity:It's more difficult to complete my work] As descried above, please see recording. What you'll see is that I'll do the following:

1) add an attribute to a razor compononet, I would expect that intellisense pops up offering me suggestions 2) nothing happens, I'll try CTRL + SPACE, CTRL + . etc 3) if I type any character and delete it, then CTRL + SPACE automatically populates it with the correct starting type

Why is this? it would save me a lot of time if this worked without having to type the character and delete it.


Original Comments

Feedback Bot on 7/31/2024, 06:50 PM:

(private comment, text removed)

Phil Allen [MSFT] on 8/1/2024, 02:53 PM:

(private comment, text removed)

Lee Ramsingh on 8/2/2024, 07:32 AM:

(private comment, text removed)

Lee Ramsingh on 8/5/2024, 10:19 AM:

(private comment, text removed)

Feedback Bot on 8/15/2024, 02:49 PM:

(private comment, text removed)


Original Solutions

(no solutions)

chsienki commented 3 weeks ago

So, I think this is actually very similar to the case I'm fixing with @inject in fuse. The issue occurs because there isn't any C# yet to actually provide IntelliSense on. When you start typing, we emit enough info to get the IntelliSense, and going back a character keeps you in the same IntelliSense session(? Don't know what it's called) so the completion dialog stays up.

We're fixing this for @inject by essentially emitting an 'error' style token, which is valid C#. In that case its ok because there is also an RZ diagnostic that prevents compilation. I think that might be the case here too, so we might be able to fix it in the same way.