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

Experimental capabilities should be defined on the capabilities.experimental object #714

Open
rchl opened this issue Nov 2, 2024 · 2 comments

Comments

@rchl
Copy link

rchl commented Nov 2, 2024

Currently the extension extends textDocument.completion capability object to add the editsNearCursor capability:

const extendedCompletionCapabilities: any =
capabilities.textDocument?.completion;
extendedCompletionCapabilities.editsNearCursor = true;

This is what the spec says about extending capabilities with experimental features.

ClientCapabilities define capabilities for dynamic registration, workspace and text document features the client supports. The experimental can be used to pass experimental capabilities under development.

Note the last sense which says that experimental features should be registered within the capabilities.experimental object.

This is problematic for Sublime Text LSP client which currently only allows client handlers to extend the experimental capabilities.

@HighCommander4
Copy link
Contributor

HighCommander4 commented Nov 2, 2024

We should be able to make a server change to also check for editsNearCursor under capabilities.experimental. Could you file a server issue about that?

@rchl
Copy link
Author

rchl commented Nov 2, 2024

clangd/clangd#2201

@rchl rchl changed the title Experimental capabilities should be define on the capabilities.experimental object Experimental capabilities should be defined on the capabilities.experimental object Nov 5, 2024
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

No branches or pull requests

2 participants