typescript: Make VTSLS the default language server for Typescript (#13140)
Additionally, limit # of returned completion items + use fuzzy filtering on VTSLS side. Prime LSP handler for response handling. Release Notes: - VTSLS is now a default language server for TypeScript, TSX, and JavaScript.
This commit is contained in:
parent
39edbe1c50
commit
8af8493da6
2 changed files with 71 additions and 17 deletions
|
@ -174,8 +174,60 @@ impl LspAdapter for VtslsLspAdapter {
|
|||
"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,
|
||||
}
|
||||
}
|
||||
}
|
||||
})))
|
||||
}
|
||||
|
||||
async fn workspace_configuration(
|
||||
self: Arc<Self>,
|
||||
_: &Arc<dyn LspAdapterDelegate>,
|
||||
_cx: &mut AsyncAppContext,
|
||||
) -> Result<Value> {
|
||||
Ok(json!({
|
||||
"typescript": {
|
||||
"suggest": {
|
||||
"completeFunctionCalls": true
|
||||
},
|
||||
"tsdk": "node_modules/typescript/lib",
|
||||
"format": {
|
||||
"enable": true
|
||||
},
|
||||
"inlayHints":{
|
||||
"parameterNames":
|
||||
{
|
||||
"enabled": "all",
|
||||
"suppressWhenArgumentMatchesName": false,
|
||||
|
||||
},
|
||||
|
||||
"parameterTypes":
|
||||
{
|
||||
"enabled": true
|
||||
|
@ -194,20 +246,15 @@ impl LspAdapter for VtslsLspAdapter {
|
|||
"enabled": true,
|
||||
}
|
||||
}
|
||||
})))
|
||||
}
|
||||
|
||||
async fn workspace_configuration(
|
||||
self: Arc<Self>,
|
||||
_: &Arc<dyn LspAdapterDelegate>,
|
||||
_cx: &mut AsyncAppContext,
|
||||
) -> Result<Value> {
|
||||
Ok(json!({
|
||||
"typescript": {
|
||||
"suggest": {
|
||||
"completeFunctionCalls": true
|
||||
},
|
||||
"vtsls":
|
||||
{"experimental": {
|
||||
"completion": {
|
||||
"enableServerSideFuzzyMatch": true,
|
||||
"entriesLimit": 5000,
|
||||
}
|
||||
}
|
||||
}
|
||||
}))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue