Skip to content

New Razor Tooling Thinks It's In Razor Context In @code Block #4483

@scottsauber

Description

@scottsauber

Describe the bug

👋 Hi - I help run a Blazor Snippets extension for VS Code. It seems like recently something changed recently (possibly from this?) where the snippets I've assigned to the razor and aspnetcorerazor languages I have assigned seem to also be showing up inside an @code block.

This does NOT happen when inside a .cs file.

To Reproduce

  1. I've assigned the snippet to the razor and aspnetcorerazor languages per the last guidance
  2. I go to use it inside a .razor file and it works as expected outside of an @code block.
  3. Inside an @code block the snippet also shows up when it shouldn't.

Demo:
2021-02-11_23-06-48

Logs & Exceptions

Please collect the data below before reporting your issue to aid us in diagnosing the root cause.

Language Server logs

This doesn't appear relevant for VS Code?

Further technical details

VS Code 1.53.2
C# Extension 1.23.9

Pre-requisite checklist

  • Steps to reproduce the issue
  • [NA] Razor Language Server client logs included.
  • [NA] HTML Language Server client logs included

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions