Skip to content

fix(lsp/roslyn): skip semantictokens/full for razor/cshtml#343

Open
tris203 wants to merge 2 commits into
seblyng:mainfrom
tris203:semantic_disable
Open

fix(lsp/roslyn): skip semantictokens/full for razor/cshtml#343
tris203 wants to merge 2 commits into
seblyng:mainfrom
tris203:semantic_disable

Conversation

@tris203

@tris203 tris203 commented Apr 16, 2026

Copy link
Copy Markdown
Collaborator

Roslyn's full semantic tokens request is now bypassed for .razor and .cshtml files, preventing issues with cohosted Razor where semantictokens/full are not supported. This avoids unnecessary or problematic LSP requests for these file types.

tris203 added 2 commits May 18, 2026 20:36
Roslyn's full semantic tokens request is now bypassed for .razor and .cshtml
files, preventing issues with cohosted Razor where semantictokens/full are
not supported. This avoids unnecessary or problematic LSP requests for
these file types.
@tris203 tris203 force-pushed the semantic_disable branch from 74e6c6a to 12dc0fc Compare May 18, 2026 19:36
@davidwengier

Copy link
Copy Markdown

Hopefully this is unnecessary after dotnet/roslyn#83800 goes in

Comment thread lsp/roslyn.lua
Comment on lines 87 to 88
-- Although roslyn supports prepareRename, cohosted razor doesnt. So we need to disable it
client.server_capabilities.renameProvider = true

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@davidwengier, Thank you! Seeing as you commented. Can I also check about this workaround? I don't think we need this anymore either?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prepareRename support went in a couple of weeks ago: dotnet/roslyn#83599

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants