lapce / lapce/lapce-plugin-rust
Function to respond to a request from the client editor
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 31
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Description
Currently, one can respond to a request (received in handle_request) by using object_to_stdout, but that is a poor API. Here's my idea of the function definition for responding:
/// `T` is the type of the request you're responding to
fn send_response<T: Request>(id: u64, params: T::Result);
So, knowing the request type (which they can presumably do), it enforces that the resulting type you send back is correct.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating handle_request and object_to_stdout in the plugin API. Assess how a typed send_response<T: Request> could replace the current response path, then verify that the response parameter type is enforced according to T::Result and that client requests can receive the response by id.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100