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

ItemDefaults client capability is not implemented #741

Closed
angelozerr opened this issue Aug 2, 2023 · 5 comments · Fixed by #782
Closed

ItemDefaults client capability is not implemented #741

angelozerr opened this issue Aug 2, 2023 · 5 comments · Fixed by #782

Comments

@angelozerr
Copy link
Contributor

We have supported ItemDefaults with our XMLLanguage Server to speed the completion for lemmix maven which can return big list (artifact completion) but we cannot benefit with feature since LSP4E client doesntsend thepropre completion ItemDefaults capability.

In vscode it send:

 "completionList": {
                    "itemDefaults": [
                        "commitCharacters",
                        "editRange",
                        "insertTextFormat",
                        "insertTextMode"
                    ]
                }
@mickaelistria
Copy link
Contributor

There is support for itemDefaults, see

CompletionItemDefaults defaults = completionList.map(o -> null, CompletionList::getItemDefaults);
and #599 . Can you please elaborate what is missing?

@angelozerr
Copy link
Contributor Author

The language server needs to know if the LSP client support Item defaults to generate completion with default. In other words it misses the LSP4E completion client capability,

See LSP4IJ https://github.com/redhat-developer/intellij-quarkus/blob/a0e94debf4d88d0866ab081491f8fe81ae547304/src/main/java/com/redhat/devtools/intellij/lsp4ij/internal/SupportedFeatures.java#L58C26-L58C43

@mickaelistria
Copy link
Contributor

ah ok, thanks. I'm patchingit.

@angelozerr
Copy link
Contributor Author

And LSP4E don't support item default with editRange which IMHO is the most used to avoid generating a big JSON with the same edit range. See LSP4IJ https://github.com/redhat-developer/intellij-quarkus/blob/a0e94debf4d88d0866ab081491f8fe81ae547304/src/main/java/com/redhat/devtools/intellij/lsp4ij/operations/completion/LSPCompletionContributor.java#L148

mickaelistria added a commit to mickaelistria/lsp4e that referenced this issue Aug 25, 2023
@angelozerr
Copy link
Contributor Author

To check that it is working, I suggest that you open completion with XML, it should return completion list with default editRange and not an editRange per completion item.

mickaelistria added a commit that referenced this issue Aug 25, 2023
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 a pull request may close this issue.

2 participants