lapce / lapce-plugin-rust

Apache License 2.0
31 stars 9 forks source link

Send request/notifications to lsp #23

Closed MinusGix closed 1 year ago

MinusGix commented 1 year ago

This makes so starting an lsp returns an LspRef.
This just provides utility functions to make talking to the LSP simpler, but it will just use PLUGIN_RPC under the hood.

I've marked the functions with the suffix lsp_send_request_blocking because I expect that in the future we'll want to make callback (or rust's async? eh) based versions, since a plugin shouldn't stall out if the lsp is being slow to reply.