-
Notifications
You must be signed in to change notification settings - Fork 804
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
Include capability property path information in the metamodel #2059
Include capability property path information in the metamodel #2059
Comments
@dbaeumer if you think this is a reasonable ask I'm happy to contribute the feature in https://github.com/microsoft/vscode-languageserver-node. |
Having this type information makes sense to me. |
@dbaeumer great, I can work on it. Before I do that though, I just want to make sure we align on the implementation. Taking export namespace DeclarationRequest {
export const method: 'textDocument/declaration' = 'textDocument/declaration';
export const messageDirection: MessageDirection = MessageDirection.clientToServer;
// These would be the 2 new items in the type that would be read by the metamodel generator:
export const clientCapabilityPath: 'textDocument.declaration' = 'textDocument.declaration';
export const serverCapabilityPath: 'declarationProvider' = 'declarationProvider';
export const type = new ProtocolRequestType<DeclarationParams, Declaration | DeclarationLink[] | null, Location[] | DeclarationLink[], void, DeclarationRegistrationOptions>(method);
export type HandlerSignature = RequestHandler<DeclarationParams, Declaration | DeclarationLink[] | null, void>;
} Are you okay with this design? Are strings enough or would you prefer a more complex type to represent the capability paths? |
I would make that a object literal. Something like export const capabilities: { client: 'textDocument.declaration', server: 'declarationProvider' } = { ... } |
Sounds good, thanks! |
It would be helpful for the metamodel to include the property path of the respective client/server capabilitiy for each request. E.g.: The client capability for
textDocument/declaration
request is found intextDocument.declaration
(in the client's capabilities object) and similarly support in the server side is found atdeclarationProvider
.This information is already available in the spec's website, but for consumers of the metamodel having the capability information would be quite helpful.
The text was updated successfully, but these errors were encountered: