Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blazor @rendermode directive colouring #9882

Closed
leobaccili opened this issue Jan 24, 2024 · 1 comment · Fixed by dotnet/vscode-csharp#6887 or #9943
Closed

Blazor @rendermode directive colouring #9882

leobaccili opened this issue Jan 24, 2024 · 1 comment · Fixed by dotnet/vscode-csharp#6887 or #9943
Assignees
Milestone

Comments

@leobaccili
Copy link

Is your feature request related to a problem? Please describe.

All directives are coloured except for @rendermode

Describe the solution you would like

I did the changes in my environment. It worked but I don't know if its the right way.

aspnetcorerazor.tmLanguage.yml

rendermode-directive:
  name: 'meta.directive'
  match: '(@)(rendermode)\s+([^$]+)?'
  captures:
    1: { patterns: [ include: '#transition' ] }
    2: { name: 'keyword.control.razor.directive.rendermode'}
    3: { patterns: [ include: 'source.cs#type' ] }
    4: { name: 'entity.name.variable.property.cs' }

aspnetcorerazor.tmLanguage.json

"rendermode-directive": {
  "name": "meta.directive",
  "match": "(@)(rendermode)\\s+([^$]+)?",
  "captures": {
    "1": {
      "patterns": [
        {
          "include": "#transition"
        }
      ]
    },
    "2": {
      "name": "keyword.control.razor.directive.rendermode"
    },
    "3": {
      "patterns": [
        {
          "include": "source.cs#type"
        }
      ]
    },
    "4": {
      "name": "entity.name.variable.property.cs"
    }
  }
}
@dibarbet dibarbet transferred this issue from dotnet/vscode-csharp Jan 30, 2024
@ghost ghost added the untriaged label Jan 30, 2024
@davidwengier
Copy link
Contributor

The request here is to support @rendermode in our TextMate grammar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment