-
Notifications
You must be signed in to change notification settings - Fork 27
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
vscode-quarkus should not be a Java formatter #166
Comments
I think this problem comes from since we have supported CodeLens and Hover in Java file with Quarkus LS. I fear that there is no solution. |
@jrieken @aeschli any idea on how to get the language server register the formatter for the quarkus-properties type/language and not for java? (See https://github.com/redhat-developer/vscode-quarkus/blob/master/src/extension.ts#L128) |
This UI shows all installed extensions, it doesn't check if or what formatter an extension provides because we don't know that statically.... Tho, we could show formatters that we have seen contribute a formatter for that language in the past first. |
@fbricon perhaps it should be better to have 2 language server :
Today Java CodeLens, Hover uses application.properties file and don't require projectInfo, so I think we could move Java features in a new language server. Having a new language server for Java, will give the format capability as none and will fix this issue. What do you think about that? |
I don't know if it could work, but by reading microsoft/language-server-protocol#996 we could try to follow the suggestion microsoft/language-server-protocol#996 (comment) In other words when regitser capability for format (textDocument/formatting and textDocument/rangeFormatting) is sent from the server at https://github.com/redhat-developer/quarkus-ls/blob/27d554f92d8d545145410fc34cf3815f86a117bd/microprofile.ls/com.redhat.microprofile.ls/src/main/java/com/redhat/microprofile/settings/capabilities/MicroProfileCapabilityManager.java#L106 we could add {
"method": "client/registerCapability",
"params": {
"registrations": [
{
"id": "79eee87c-c409-4664-8102-e03263673f6f",
"method": "textDocument/formatting",
"registerOptions": {
"documentSelector": [
{ "language": "microprofile-properties" },
{ "language": "quarkus-properties" }
]
}
}
]
}
} |
Fixed redhat-developer/vscode-quarkus#166 Signed-off-by: azerr <azerr@redhat.com>
Fixes redhat-developer/vscode-quarkus#166 Signed-off-by: azerr <azerr@redhat.com>
Fixes redhat-developer/vscode-quarkus#166 Signed-off-by: azerr <azerr@redhat.com>
Fixes redhat-developer/vscode-quarkus#166 Signed-off-by: azerr <azerr@redhat.com>
Fixes redhat-developer/vscode-quarkus#166 Signed-off-by: azerr <azerr@redhat.com>
Fixes redhat-developer/vscode-quarkus#166 Signed-off-by: azerr <azerr@redhat.com>
Fixes redhat-developer/vscode-quarkus#166 Signed-off-by: azerr <azerr@redhat.com>
Fixes redhat-developer/vscode-quarkus#166 Signed-off-by: azerr <azerr@redhat.com>
Fixes redhat-developer/vscode-quarkus#166 Signed-off-by: azerr <azerr@redhat.com>
Fixes redhat-developer/vscode-quarkus#166 Signed-off-by: azerr <azerr@redhat.com>
vscode-quarkus should not be a Java formatter.
To reproduce this issue:
The "Quarkus" entry should not be present in this list, since VS Code Quarkus does not format Java files.
The text was updated successfully, but these errors were encountered: