Simplify language server startup (#6449)
These are just some small refactorings of our language-server-starting code, motivated by another change that I decided to bail on: https://github.com/zed-industries/zed/pull/6448.
This commit is contained in:
parent
90c1d8f734
commit
6ed7cc7833
20 changed files with 91 additions and 117 deletions
|
@ -18,7 +18,7 @@ pub struct RustLspAdapter;
|
|||
|
||||
#[async_trait]
|
||||
impl LspAdapter for RustLspAdapter {
|
||||
async fn name(&self) -> LanguageServerName {
|
||||
fn name(&self) -> LanguageServerName {
|
||||
LanguageServerName("rust-analyzer".into())
|
||||
}
|
||||
|
||||
|
@ -98,11 +98,11 @@ impl LspAdapter for RustLspAdapter {
|
|||
})
|
||||
}
|
||||
|
||||
async fn disk_based_diagnostic_sources(&self) -> Vec<String> {
|
||||
fn disk_based_diagnostic_sources(&self) -> Vec<String> {
|
||||
vec!["rustc".into()]
|
||||
}
|
||||
|
||||
async fn disk_based_diagnostics_progress_token(&self) -> Option<String> {
|
||||
fn disk_based_diagnostics_progress_token(&self) -> Option<String> {
|
||||
Some("rust-analyzer/flycheck".into())
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue