Skip to content

Code action per-language filtering is a little aggressive #12846

@davidwengier

Description

@davidwengier

Noticed this today, trialing the new Remove unnecessary directives code action.

Today we have 3 distinct types of code actions - Html, C# and Razor. Remove unnecessary is a Razor code action, because @addTagHelper is a Razor construct, which makes sense. Unfortunately, the line of code @addTagHelper *, Foo also contains a C# string, the *, Foo bit, which means if the cursor is in that part of the directive, the code action doesn't even get asked whether it should run.

Possibly the fix here is to just always run Razor code actions, or maybe always run all of the code actions in our repo (as opposed to delegated ones from Roslyn and Html), or maybe we need something more tailored.

Metadata

Metadata

Assignees

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