Move all configuration of individual LSP servers to LspAdapter

This commit is contained in:
Max Brunsfeld 2022-03-29 18:11:14 -07:00
parent ebc711f9f5
commit 3b4cab9094
6 changed files with 65 additions and 52 deletions

View file

@ -112,6 +112,14 @@ impl LspAdapter for RustLspAdapter {
.boxed()
}
fn disk_based_diagnostic_sources(&self) -> &'static [&'static str] {
&["rustc"]
}
fn disk_based_diagnostics_progress_token(&self) -> Option<&'static str> {
Some("rustAnalyzer/cargo check")
}
fn process_diagnostics(&self, params: &mut lsp::PublishDiagnosticsParams) {
lazy_static! {
static ref REGEX: Regex = Regex::new("(?m)`([^`]+)\n`$").unwrap();