Fix maxTsServerMemory (#17758)
Release Notes: - N/A --------- Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
This commit is contained in:
parent
02d5f320ad
commit
b341079d8a
2 changed files with 16 additions and 5 deletions
|
@ -222,9 +222,6 @@ impl LspAdapter for VtslsLspAdapter {
|
|||
"suggest": {
|
||||
"completeFunctionCalls": true
|
||||
},
|
||||
"tsserver": {
|
||||
"maxTsServerMemory": 8092
|
||||
},
|
||||
"inlayHints": {
|
||||
"parameterNames": {
|
||||
"enabled": "all",
|
||||
|
@ -273,7 +270,21 @@ impl LspAdapter for VtslsLspAdapter {
|
|||
language_server_settings(delegate.as_ref(), SERVER_NAME, cx)
|
||||
.and_then(|s| s.settings.clone())
|
||||
})?;
|
||||
Ok(override_options.unwrap_or_default())
|
||||
|
||||
if let Some(options) = override_options {
|
||||
return Ok(options);
|
||||
}
|
||||
|
||||
let config = serde_json::json!({
|
||||
"tsserver": {
|
||||
"maxTsServerMemory": 8092
|
||||
},
|
||||
});
|
||||
|
||||
Ok(serde_json::json!({
|
||||
"typescript": config,
|
||||
"javascript": config
|
||||
}))
|
||||
}
|
||||
|
||||
fn language_ids(&self) -> HashMap<String, String> {
|
||||
|
|
|
@ -52,7 +52,7 @@ Prettier will also be used for TypeScript files by default. To disable this:
|
|||
{
|
||||
"lsp": {
|
||||
"vtsls": {
|
||||
"initialization_options": {
|
||||
"settings": {
|
||||
// For TypeScript:
|
||||
"typescript": { "tsserver": { "maxTsServerMemory": 16184 } },
|
||||
// For JavaScript:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue