-
Notifications
You must be signed in to change notification settings - Fork 93
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
Add support for textDocument/linkedEditingRange
#991
Conversation
This PR requires LSP4J 0.11.0 which is not released (I'm using SNAPSHOT for the moment). This PR requires the vscode-xml PR redhat-developer/vscode-xml#426 |
textDocument/linkedEditingRange
070ef1a
to
c7a41d6
Compare
Thanks @angelozerr for commenting on eclipse-lsp4j/lsp4j#466. I have a question for you. How does this language server work with the Eclipse SimRel? Can it have a different version of LSP4J than the version that LSP4E uses and is part of SimRel? Is Lemminx part of SimRel (presumably via WWD if it is)? The answers to these questions will help determined when best to release 0.11.0 of LSP4J. |
PS Has lemminx had a release yet? None are listed on https://projects.eclipse.org/projects/technology.lemminx/governance but I thought that WWD was using it and it is making releases. |
Looking in WWD snapshot builds, they appear to be using lemminx releases from repo.eclipse.org and embedding it. @angelozerr mentioned LemMinX will generally adopt the latest version of lsp4j so I'm guessing that's usually what lsp4e would use. I think as long as new changes can be broadcast to clients (like this one), we likely won't have issues updating.
I believe it's in incubation. The releases can be found at https://download.eclipse.org/lemminx/ . |
Thanks. It looks like wwd is using a lemminx uber jar, IIUC that means the version of lsp4j in lemminx can be different than that of lsp4e. We have pretty much decided not to release lsp4j 0.11.0 to 2021-03 simrel as we can't do it in time and let all adopters in simrel upgrade to that version. But if we do release 0.11.0 soon, then lemminx can start using it independently.
OK. I think it still needs release records for the releases and a release review once per year. Being in incubation does not matter for that requirement of EDP. |
c7a41d6
to
1c2f80b
Compare
Exactly and my draft PR which consumes 0.11.0 works with the current LSP4E which doesn't consume 0.11.0.
If I understand correctly you mean that you could do a release next week for instance? If it that it should be really fantastic because we have the intention to do a release of vscode-xml soon and we could provide this linked editing support inside vscode-xml. |
I am still waiting (gently pushing) to get LSP 3.16.0 support finished in LSP4J 0.11.0. I only meant that we can release 0.11.0 independently of the release train and that you could start using it, also independent of the release train. Sorry for not giving you more/better visibility on what it will take for 0.11.0 to release. https://github.com/eclipse/lsp4j/milestone/18 has the progress on getting all the issues resolved. |
FWIW, we'll likely end up sticking with lsp4j 0.9.0 for our upcoming release, and update to latest afterwards, so this isn't blocking us. |
Thanks for letting me know - the LSP4J release is imminent now - eclipse-lsp4j/lsp4j#466 (comment) |
The LSP4J release is now done: eclipse-lsp4j/lsp4j#466 (comment) |
1c2f80b
to
cc5c352
Compare
Thanks @jonahgraham for your feedback. I have updated my PR to consume now the 0.11.0 release of LSP4J. |
cc5c352
to
1e5e23d
Compare
When using lsp4j 0.12.0, this PR breaks the server. The server will issue diagnostics when it first starts, but when the other capabilities are dynamically registered, the server becomes unresponsive. If I change the lsp4j version to 0.11.0, the server and the linked editing works great. |
a66ae60
to
5048754
Compare
Binary builds fail with
|
5048754
to
26f904b
Compare
Binary still doesn't work from my testing |
org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/dom/DOMElement.java
Outdated
Show resolved
Hide resolved
org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/extensions/xsi/XSISchemaModel.java
Outdated
Show resolved
Hide resolved
org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/extensions/xsi/XSISchemaModel.java
Outdated
Show resolved
Hide resolved
org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/services/XMLLinkedEditing.java
Show resolved
Hide resolved
42a7aac
to
bc24f20
Compare
org.eclipse.lemminx/src/main/java/org/eclipse/lemminx/dom/DOMElement.java
Outdated
Show resolved
Hide resolved
83b44b5
to
e75374e
Compare
fixed. |
e75374e
to
0a504f7
Compare
0a504f7
to
5131b38
Compare
org.eclipse.lemminx/src/test/java/org/eclipse/lemminx/services/XMLLinkedEditingTest.java
Outdated
Show resolved
Hide resolved
org.eclipse.lemminx/src/main/resources/META-INF/native-image/reflect-config.json
Show resolved
Hide resolved
5131b38
to
fca463b
Compare
org.eclipse.lemminx/src/main/resources/META-INF/native-image/reflect-config.json
Outdated
Show resolved
Hide resolved
org.eclipse.lemminx/src/main/resources/META-INF/native-image/reflect-config.json
Outdated
Show resolved
Hide resolved
fca463b
to
72b1e50
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few more reflection configuration changes that need to be made:
Modify:
{
"name": "org.eclipse.lsp4j.InsertTextMode",
- "fields": [{
- "name": "value"
- }]
+ "allDeclaredFields": true
},
Then, add:
{
"name": "org.eclipse.lsp4j.SetTraceParams",
"allDeclaredFields": true,
"methods": [{
"name": "<init>",
"parameterTypes": []
}]
},
72b1e50
to
fae92c6
Compare
All should be fixed, thanks for your feedback. |
One more reflection entry to add (sorry, I think this is the last): {
"name": "org.eclipse.lsp4j.adapters.CompletionItemTextEditTypeAdapter",
"methods": [{
"name": "<init>",
"parameterTypes": []
}]
}, |
fae92c6
to
d6f779e
Compare
Fixes eclipse-lemminx#987 Signed-off-by: azerr <[email protected]>
Add support for
textDocument/linkedEditingRange
Fixes #987
Signed-off-by: azerr [email protected]