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
|
@ -40,7 +40,7 @@ impl VueLspAdapter {
|
|||
}
|
||||
#[async_trait]
|
||||
impl super::LspAdapter for VueLspAdapter {
|
||||
async fn name(&self) -> LanguageServerName {
|
||||
fn name(&self) -> LanguageServerName {
|
||||
LanguageServerName("vue-language-server".into())
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,7 @@ impl super::LspAdapter for VueLspAdapter {
|
|||
ts_version: self.node.npm_package_latest_version("typescript").await?,
|
||||
}) as Box<_>)
|
||||
}
|
||||
async fn initialization_options(&self) -> Option<Value> {
|
||||
fn initialization_options(&self) -> Option<Value> {
|
||||
let typescript_sdk_path = self.typescript_install_path.lock();
|
||||
let typescript_sdk_path = typescript_sdk_path
|
||||
.as_ref()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue