Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It is unclear how to configure vtsls's maxTsServerMemory. #13706

Closed
1 task done
adamfaulkner-at opened this issue Jul 1, 2024 · 1 comment
Closed
1 task done

It is unclear how to configure vtsls's maxTsServerMemory. #13706

adamfaulkner-at opened this issue Jul 1, 2024 · 1 comment
Labels
bug [core label] javascript JavaScript programming language support language server An umbrella label for all language servers language An umbrella label for all programming languages syntax behaviors setting Feedback for preferences, configuration, etc typescript TypeScript programming language support

Comments

@adamfaulkner-at
Copy link

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

I have tried all of the following to configure vtsls's maxTsServerMemory:

  "lsp": {
    "vtsls": {
      "config": {
        "typescript": {
          "tsserver": {
            "maxTsServerMemory": 32768,
            "nodePath": "/Users/adam.faulkner/h/node/env-18.16.0/bin/node"
          }
        }
      }
    }
  }
  "lsp": {
    "vtsls": {
      "initialization_options": {
        "typescript": {
          "tsserver": {
            "maxTsServerMemory": 32768,
            "nodePath": "/Users/adam.faulkner/h/node/env-18.16.0/bin/node"
          }
        }
      }
    }
  }
  "lsp": {
    "vtsls": {
          "typescript": {
          "tsserver": {
            "maxTsServerMemory": 32768,
            "nodePath": "/Users/adam.faulkner/h/node/env-18.16.0/bin/node"
          }
        }
    }
  }

None of these appear to have any effect on the tsserver.js process that the language server spawns.

~/D/aws-in-a-box> ps aux | grep vtsls | grep max-old-space
adam.faulkner    93799  21.5  2.5 411705456 1689312   ??  S     9:40AM   0:15.73 /Users/adam.faulkner/Library/Application Support/Zed/node/node-v18.15.0-darwin-arm64/bin/node --max-old-space-size=3072 /Users/adam.faulkner/Library/Application Support/Zed/languages/vtsls/node_modules/typescript/lib/tsserver.js --useInferredProjectPerProjectRoot --enableTelemetry --cancellationPipeName /var/folders/ty/tmvkrv6x3_d0rh5n_k7mzx_m0000gq/T/vscode-typescript503/9c71ddecd2eb049eefa3/tscancellation-24509ce1df98fb3470b5.tmp* --locale en --noGetErrOnBackgroundUpdate --validateDefaultNpmLocation --useNodeIpc

Note that neither the nodePath nor the maxTsServerMemory appear to have taken effect.

In Helix, this configuration does have the desired effect:

[language-server.vtsls]
command = "vtsls"
args = ["--stdio"]
config.typescript.tsserver.maxTsServerMemory = 32768

I'm not familiar enough with the language server protocol to understand if I'm doing something obviously wrong, but many of your users will need to set this setting in order to avoid the language server crashing due to out of memory errors.

Environment

Zed: v0.141.3 (Zed)
OS: macOS 14.3.0
Memory: 64 GiB
Architecture: aarch64

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

(Too long, let me know if you really need something from this and I'll try to pull out the non-sensitive parts)

@adamfaulkner-at adamfaulkner-at added admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue labels Jul 1, 2024
@JosephTLyons JosephTLyons added typescript TypeScript programming language support javascript JavaScript programming language support language An umbrella label for all programming languages syntax behaviors setting Feedback for preferences, configuration, etc language server An umbrella label for all language servers and removed triage Maintainer needs to classify the issue admin read Pending admin review labels Jul 8, 2024
@osiewicz
Copy link
Contributor

Hey, It looks like our VTSLS integration does not respect initialization_options. I'll fix that. I'm sorry that it caused problems for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug [core label] javascript JavaScript programming language support language server An umbrella label for all language servers language An umbrella label for all programming languages syntax behaviors setting Feedback for preferences, configuration, etc typescript TypeScript programming language support
Projects
None yet
Development

No branches or pull requests

3 participants