zed
zed copied to clipboard
"typescript.tsserver.maxTsServerMemory" VSCode equivalent
Check for existing issues
- [X] Completed
Describe the feature
VSCode recently opened up support for spawning a separate Typescript Language Server for really large projects so that you can set higher memory limits. Without this, my large Typescript monorepo is frequently hitting a 4GiB memory limit and hitting:
[lspserver] [tsclient] [tsserver] Exited. Code: null. Signal: SIGABRT
If applicable, add mockups / screenshots to help present your vision of the feature
No response
This is actually already possible in the LSP settings since it passes the JSON you sent over through to the LSP - https://github.com/zed-industries/zed/blob/main/crates/languages/src/typescript.rs#L156-L173
And based on the ts language server settings, we can set that - https://github.com/typescript-language-server/typescript-language-server/blob/master/docs/configuration.md#initializationoptions
So doing this in the settings worked
"lsp": {
"typescript-language-server": {
"initialization_options": {
"maxTsServerMemory": 8192
}
}
}
Excellent, I’ll leave this open for a moment just in case maintainers might want to make this more of a first class thing, but I think this is enough of a fringe issue having this Issue googleable is pretty sufficient.
Just wrote about my performance issue (#8884).
I tried to increase maxTsServerMemory
to 8192
but that doesn't seem to fix my tsserver speed issue.
Going to close because that fixed our issue, so really just a matter of discoverability. Feel free to reopen!
thank you! same problem, i used nvim-lspconfig tsserver, it's worked.
omg, finally figured it out, thanks!