Respect user preference for JS/TS on_type formatting (#14536)
Release Notes: - Fix user preferences for JS/TS on_type formatting not being respected by VTSLS. ([#13733](https://github.com/zed-industries/zed/issues/13733), [#14499](https://github.com/zed-industries/zed/issues/14499))
This commit is contained in:
parent
85bc233920
commit
bd02f4fe28
3 changed files with 35 additions and 77 deletions
|
@ -180,8 +180,8 @@ impl LspAdapter for VtslsLspAdapter {
|
|||
Ok(Some(json!({
|
||||
"typescript": {
|
||||
"tsdk": tsdk_path,
|
||||
"format": {
|
||||
"enable": true
|
||||
"suggest": {
|
||||
"completeFunctionCalls": true
|
||||
},
|
||||
"inlayHints": {
|
||||
"parameterNames": {
|
||||
|
@ -206,6 +206,11 @@ impl LspAdapter for VtslsLspAdapter {
|
|||
}
|
||||
}
|
||||
},
|
||||
"javascript": {
|
||||
"suggest": {
|
||||
"completeFunctionCalls": true
|
||||
}
|
||||
},
|
||||
"vtsls": {
|
||||
"experimental": {
|
||||
"completion": {
|
||||
|
@ -232,49 +237,9 @@ impl LspAdapter for VtslsLspAdapter {
|
|||
if let Some(options) = override_options {
|
||||
return Ok(options);
|
||||
}
|
||||
let tsdk_path = Self::tsdk_path(&adapter).await;
|
||||
Ok(json!({
|
||||
"typescript": {
|
||||
"suggest": {
|
||||
"completeFunctionCalls": true
|
||||
},
|
||||
"tsdk": tsdk_path,
|
||||
"format": {
|
||||
"enable": true
|
||||
},
|
||||
"inlayHints": {
|
||||
"parameterNames": {
|
||||
"enabled": "all",
|
||||
"suppressWhenArgumentMatchesName": false,
|
||||
},
|
||||
"parameterTypes": {
|
||||
"enabled": true
|
||||
},
|
||||
"variableTypes": {
|
||||
"enabled": true,
|
||||
"suppressWhenTypeMatchesName": false,
|
||||
},
|
||||
"propertyDeclarationTypes": {
|
||||
"enabled": true,
|
||||
},
|
||||
"functionLikeReturnTypes": {
|
||||
"enabled": true,
|
||||
},
|
||||
"enumMemberValues": {
|
||||
"enabled": true,
|
||||
}
|
||||
}
|
||||
},
|
||||
"vtsls": {
|
||||
"experimental": {
|
||||
"completion": {
|
||||
"enableServerSideFuzzyMatch": true,
|
||||
"entriesLimit": 5000,
|
||||
}
|
||||
},
|
||||
"autoUseWorkspaceTsdk": true
|
||||
}
|
||||
}))
|
||||
self.initialization_options(adapter)
|
||||
.await
|
||||
.map(|o| o.unwrap())
|
||||
}
|
||||
|
||||
fn language_ids(&self) -> HashMap<String, String> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue