We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Example:
spec:
{ "method": "textDocument/implementation", "result": { "kind": "or", "items": [ { "kind": "reference", "name": "Definition" }, { "kind": "array", "element": { "kind": "reference", "name": "DefinitionLink" } }, { "kind": "base", "name": "null" } ] }, "messageDirection": "clientToServer", "params": { "kind": "reference", "name": "ImplementationParams" }, "partialResult": { "kind": "or", "items": [ { "kind": "array", "element": { "kind": "reference", "name": "Location" } }, { "kind": "array", "element": { "kind": "reference", "name": "DefinitionLink" } } ] }, "registrationOptions": { "kind": "reference", "name": "ImplementationRegistrationOptions" }, "documentation": "A request to resolve the implementation locations of a symbol at a given text\ndocument position. The request's parameter is of type [TextDocumentPositionParams]\n(#TextDocumentPositionParams) the response is of type {@link Definition} or a\nThenable that resolves to such." }
lsp implementation
#[derive(Debug)] pub enum GotoImplementation {} pub type GotoImplementationParams = GotoTypeDefinitionParams; pub type GotoImplementationResponse = GotoDefinitionResponse; impl Request for GotoImplementation { type Params = GotoImplementationParams; type Result = Option<GotoImplementationResponse>; const METHOD: &'static str = "textDocument/implementation"; }
what's i would like
#[derive(Debug)] pub enum ImplementationRequest {} pub type ImplementationRequestParams = Something; pub type ImplementationRequestResult = Option<Something2>; impl Request for ImplementationRequest { type Params = ImplementationRequestParams; type Result = ImplementationRequestResult; const METHOD: &'static str = "textDocument/implementation"; }
This will allow to generate code without depending on rust macro, but on the meta json meta model.
This will have some benefits, expecially for async-lsp.
When rust-analyzer generate an overloading of one method, this is what i get:
fn implementation(&mut self, params: <lsp_request!("textDocument/implementation")as lsp_types::request::Request>::Params) -> BoxFuture<'static, Result<<lsp_request!("textDocument/implementation")as lsp_types::request::Request>::Result, Self::Error>>;
which is very much unhelpful.
With predictable names, i could change this to generate:
fn implementation(&mut self, params: ImplementationRequestParams) -> BoxFuture<'static, Result<ImplementationRequestResult, Self::Error>>;
Benefits for async-lsp:
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Example:
spec:
lsp implementation
what's i would like
This will allow to generate code without depending on rust macro, but on the meta json meta model.
This will have some benefits, expecially for async-lsp.
When rust-analyzer generate an overloading of one method, this is what i get:
which is very much unhelpful.
With predictable names, i could change this to generate:
Benefits for async-lsp:
The text was updated successfully, but these errors were encountered: