roniker
This is a library that builds custom LSPs for applications configured with RON. Good LSP support can make configuring your application significantly easier.
Step 0: Create your configuration structs
Chances are, your application already has these:
// config.rs
Step 1: build script
The build script reads your config structs and turns them into LSP state that can be serialized and embedded into your application:
let mut analyzer = new;
analyzer.add_file;
let json = to_string?;
let dest = from.join;
write?;
println!;
Step 2: serve LSP
Now you just need to dedicate a subcommand of your application to running the LSP:
pub async
Now you should be able to run <app> lsp and it will start reading stdin and
writing LSP messages to stdout.
Step 3: configure editor
Lastly you need to configure your editor to use the lsp subcommand above.
There should be a clear pattern that selects the files you want the custom LSP
to run on.
Helix
[]
= { = "custom", = ["lsp"] }
[[]]
= "ron"
= true
= "source.ron"
= "ron"
= ["ron", { = "custom.ron" }]
= "//"
= { = "/*", = "*/" }
= { = 4, = " " }
= ["Cargo.toml"]
= ["custom-lsp"]