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

Microsoft.CodeAnalysis.LanguageServer does not respect dynamic registration for diagnostics #76624

Open
SofusA opened this issue Jan 5, 2025 · 2 comments
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead

Comments

@SofusA
Copy link

SofusA commented Jan 5, 2025

Version Used:
4.13.0-3.24629.5

Steps to Reproduce:

  1. Start the language server
  2. Send initialize message with pull diagnostics with dynamicRegistration: false:
{"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{"general":{"positionEncodings":["utf-8","utf-32","utf-16"]},"textDocument":{"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"dataSupport":true,"disabledSupport":true,"isPreferredSupport":true,"resolveSupport":{"properties":["edit","command"]}},"completion":{"completionItem":{"deprecatedSupport":true,"insertReplaceSupport":true,"resolveSupport":{"properties":["documentation","detail","additionalTextEdits"]},"snippetSupport":true,"tagSupport":{"valueSet":[1]}},"completionItemKind":{}},"diagnostic":{"dynamicRegistration":false,"relatedDocumentSupport":true},"formatting":{"dynamicRegistration":false},"hover":{"contentFormat":["markdown"]},"inlayHint":{"dynamicRegistration":false},"publishDiagnostics":{"tagSupport":{"valueSet":[1,2]},"versionSupport":true},"rename":{"dynamicRegistration":false,"honorsChangeAnnotations":false,"prepareSupport":true},"signatureHelp":{"signatureInformation":{"activeParameterSupport":true,"documentationFormat":["markdown"],"parameterInformation":{"labelOffsetSupport":true}}}},"window":{"workDoneProgress":true},"workspace":{"applyEdit":true,"configuration":true,"diagnostic":{"refreshSupport":true},"didChangeConfiguration":{"dynamicRegistration":false},"didChangeWatchedFiles":{"dynamicRegistration":true,"relativePatternSupport":false},"executeCommand":{"dynamicRegistration":false},"fileOperations":{"didRename":true,"willRename":true},"inlayHint":{"refreshSupport":false},"symbol":{"dynamicRegistration":false},"workspaceEdit":{"documentChanges":true,"failureHandling":"abort","normalizesLineEndings":false,"resourceOperations":["create","rename","delete"]},"workspaceFolders":true}},"clientInfo":{"name":"helix","version":"24.7 (74a9e9e4)"},"processId":125487,"rootPath":"/var/home/sofusa/TestProj","rootUri":"file:///var/home/sofusa/TestProj","workspaceFolders":[{"name":"TestProj","uri":"file:///var/home/sofusa/TestProj"}]},"id":0}

Expected Behavior:
Server responding with diagnostics being a server capability.

Actual Behavior:
It is not, but the server will still respond to pull diagnostics.

Motivation

I am using this language server with Helix editor.

Unfortunately this issue requires me to patch the server capabilities to trick my editor to send pull diagnostics requests.

I think that this is a requirement if Microsoft.CodeAnalysis.LanguageServer should be able to support other editors than Visual Studio Code.

Ps. Thanks for your work. I can actually use this with Helix (with some hack) and it is rock solid!

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Issues and PRs which have not yet been triaged by a lead label Jan 5, 2025
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

1 similar comment
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

No branches or pull requests

2 participants