rust-lang / rust-analyzer

A Rust compiler front-end for IDEs
https://rust-analyzer.github.io/
Apache License 2.0
13.62k stars 1.49k forks source link

Using a different language server for code inside a proc macro #17186

Open rajesh-rahul opened 2 weeks ago

rajesh-rahul commented 2 weeks ago

I would like to write a language server for SQLite sql that will also work for SQL written in a particular proc macro:

// ...rust code
let users = my_proc_macro_for_sql! {
    SELECT * FROM User
};
// ...rust code

Before I venture further, I wanted to ask if something like is even possible in a non-invasive manner.

Some approaches I thought of: