facebook / starlark-rust

A Rust implementation of the Starlark language
Apache License 2.0
661 stars 53 forks source link

Add "Starlark: Restart starlark language server" command #84

Open cjhopman opened 10 months ago

cjhopman commented 10 months ago

The starlark language server isn't super reliable and I need to restart it at times. Needing to restart the entire extension host to get that is kinda inconvenient. rust-analyzer has the nice option of just restarting it's language server as a command, we could do that too.

cjhopman commented 10 months ago

I'm not sure how rust-analyzer does this. vscode kinda partially handles the lsp executable interaction, and i know on startup at least it will restart it if it crashes, i wonder if just killing the process is enough to implement this. If it is, maybe we'd want it done differently for starlark vs buck2. i continue to think we should explicitly fork the extension for buck2 rather than needing to make every behavior configurable (and actually there's a lot of things that we want more configurable than they are in the starlark extension today).