Compare commits

...

2 Commits

Author SHA1 Message Date
Conrad Irwin
b5b0c7613c Update docs for vtsls 2024-09-12 10:20:06 -04:00
Conrad Irwin
1a82bb2f6d Fix maxTsServerMemory 2024-09-12 10:18:07 -04:00
2 changed files with 13 additions and 33 deletions

View File

@@ -222,9 +222,6 @@ impl LspAdapter for VtslsLspAdapter {
"suggest": {
"completeFunctionCalls": true
},
"tsserver": {
"maxTsServerMemory": 8092
},
"inlayHints": {
"parameterNames": {
"enabled": "all",
@@ -273,7 +270,18 @@ 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())
let config = serde_json::json!({
"tsserver": {
"maxTsServerMemory": 8092
},
});
let mut options = serde_json::json!({
"typescript": config,
"javascript": config
});
Ok(options)
}
fn language_ids(&self) -> HashMap<String, String> {

View File

@@ -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:
@@ -63,34 +63,6 @@ Prettier will also be used for TypeScript files by default. To disable this:
}
```
## Inlay Hints
Zed sets the following initialization options to make the language server send back inlay hints
(that is, when Zed has inlay hints enabled in the settings).
You can override these settings in your configuration file:
```json
"lsp": {
"$LANGUAGE_SERVER_NAME": {
"initialization_options": {
"preferences": {
"includeInlayParameterNameHints": "all",
"includeInlayParameterNameHintsWhenArgumentMatchesName": true,
"includeInlayFunctionParameterTypeHints": true,
"includeInlayVariableTypeHints": true,
"includeInlayVariableTypeHintsWhenTypeMatchesName": true,
"includeInlayPropertyDeclarationTypeHints": true,
"includeInlayFunctionLikeReturnTypeHints": true,
"includeInlayEnumMemberValueHints": true,
}
}
}
}
```
See [typescript-language-server inlayhints documentation](https://github.com/typescript-language-server/typescript-language-server?tab=readme-ov-file#inlay-hints-textdocumentinlayhint) for more information.
## See also
- [Zed Yarn documentation](./yarn.md) for a walkthrough of configuring your project to use Yarn.