2 ms·
>Curiously it doesnt't seem like there's a standard for test running though? The code lens API allows you to register commands with code spans of your choice.
by Arnavion 8y ago
>Curiously it doesnt't seem like there's a standard for test running though?
The code lens API allows you to register commands with code spans of your choice. There's no specific built-in command for running tests, so it's ad-hoc.
https://microsoft.github.io/language-server-protocol/specification#textDocument_codeLens https://microsoft.github.io/language-server-protocol/specifi...
Eg for the Rust LSP server: https://github.com/rust-lang/rls/blob/ea7a0c36aa5f45846b06f81ab1f58a24a148f3e4/src/actions/requests.rs#L890-L903 https://github.com/rust-lang/rls/blob/ea7a0c36aa5f45846b06f8... + https://github.com/rust-lang/rls/blob/ea7a0c36aa5f45846b06f81ab1f58a24a148f3e4/src/actions/run.rs#L39-L52 https://github.com/rust-lang/rls/blob/ea7a0c36aa5f45846b06f8...