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

The option "razor.disabled" is gone. #9224

Closed
virtualdreams opened this issue Aug 31, 2023 · 1 comment · Fixed by #9240
Closed

The option "razor.disabled" is gone. #9224

virtualdreams opened this issue Aug 31, 2023 · 1 comment · Fixed by #9240
Assignees
Labels
bug Something isn't working vscode
Milestone

Comments

@virtualdreams
Copy link

Environment data

dotnet --info output:
VS Code version: 1.81.1
C# Extension version: v2.0.436

OmniSharp log

rying to create DocumentContext for razor/languageQuery for file:///home/thomas/dev/netcore/notes-core/src/Notes/Views/Note/Notebook.cshtml
[Warn  - 10:40:04] Could not create a document context for razor/languageQuery for file:///home/thomas/dev/netcore/notes-core/src/Notes/Views/Note/Notebook.cshtml. Endpoint may crash later if it calls GetRequiredDocumentContext.
[Error - 10:40:04] System.ArgumentNullException: Value cannot be null. (Parameter 'DocumentContext')
   at Microsoft.AspNetCore.Razor.LanguageServer.EndpointContracts.RazorRequestContext.GetRequiredDocumentContext() in /_/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/EndpointContracts/RazorRequestContext.cs:line 47
   at Microsoft.AspNetCore.Razor.LanguageServer.RazorLanguageQueryEndpoint.HandleRequestAsync(RazorLanguageQueryParams request, RazorRequestContext requestContext, CancellationToken cancellationToken) in /_/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/RazorLanguageQueryEndpoint.cs:line 35
   at Microsoft.CommonLanguageServerProtocol.Framework.QueueItem`3.StartRequestAsync(TRequestContext context, CancellationToken cancellationToken)

Steps to reproduce

I want to disable the razor (formatting) completely, because with every save a cshtml page is completely broken formatted or errors come or everything is marked red.
The option razor.format.enable: false still has no effect and the option razor.disabled: true seems to have been removed completely.
This bug exists since the beginning of the year. Why is more and more broken on this plugin?

Expected behavior

A working plugin.

Actual behavior

Additional context

Add any other context about the problem here.

@dibarbet dibarbet transferred this issue from dotnet/vscode-csharp Sep 2, 2023
@ghost ghost added the untriaged label Sep 2, 2023
@davidwengier davidwengier self-assigned this Sep 5, 2023
@davidwengier davidwengier added this to the 17.8 P3 milestone Sep 5, 2023
@ghost ghost removed the untriaged label Sep 5, 2023
@davidwengier davidwengier added bug Something isn't working vscode labels Sep 5, 2023
@davidwengier
Copy link
Contributor

Thanks for the report, opened #9240 to fix support for the razor.format.enable setting. No plans at this point for razor.disable, but if you still feel that is needed, feel free to log a different issue.

davidwengier added a commit that referenced this issue Sep 6, 2023
Fixes #9224 by honouring the
`razor.format.enable` setting
@ghost ghost locked as resolved and limited conversation to collaborators Oct 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working vscode
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants