0

I am working on a proc macro, and would like to be able to write some tests to ensure it's playing nice with rust-analyzer (e.g. correct localized diagnostics).

Ideally, my testing suite would look something like this:

  1. Start rust-analyzer pointed at a test crate
  2. Send some JSON-RPC requests to the server over stdin
  3. Read the response and check to see the result is as expected

So in principal, I should be able to do all of this, but as not to re-invent the wheel I am wondering how much of this might already exist. For instance, is there a crate, or maybe an existing utility which is part of the rust-analyzer project, for setting up an LSP client like this and handling requests?

sak
  • 2,612
  • 24
  • 55

0 Answers0