Roslyn semantic snippets don't know to show `if` for `@i` etc.
Looks like by turning on semantic snippets, Roslyn has inadvertently broken our completion and @if no longer appears. The speculation is that this is caused because typing @i generates C# similar to __o = i and Roslyn is now smart enough to know that if is not valid there.
We might just need to resurrect our own snippets for these, eg from https://github.com/dotnet/razor-tooling/pull/3956/files#diff-052d5834149367e2bcf4d95d0740ddb4b346116cfcd64e568d0b5eca38f7b8aeR299-R315 as we presumably do want semantic snippets to work fully in other C# contexts in Razor files.
/cc @ToddGrun
Let's see if C# can roll the feature back for Razor only and we can make a different fix for 17.5.
Note: When fixing this, we'd want to (and probably need to) revert https://github.com/dotnet/roslyn/pull/64378 in Roslyn at the same time
and Roslyn is now smart enough to know that if is not valid there.
This feels incredibly brittle. Shoudln't roslyn know that anyways, ignoring semantic-snippets. e.g. that's an expression location, not a keyword one.
It is absolutely brittle! 😄 Reverting the change for Razor files is purely tactical for 17.4. We're planning to do the right thing from the Razor side in 17.5.
Putting this back in triage to discuss, as semantic snippets are on by default in 17.5