Skip to content

Pass --canUseWatchEvents to tsserver #956

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

Open
montlebalm opened this issue Jun 6, 2025 · 0 comments
Open

Pass --canUseWatchEvents to tsserver #956

montlebalm opened this issue Jun 6, 2025 · 0 comments

Comments

@montlebalm
Copy link

Is there a way to set the --canUseWatchEvents flag when starting tsserver? I've tried passing it as a command line arg to typescript-language-server in my Neovim LSP config:

vim.lsp.config('ts_ls', {
  cmd = { "typescript-language-server", "--stdio", "--canUseWatchEvents" },
})

... but it errors with "error: unknown option '--canUseWatchEvents'".

For background, typescript-language-server appears to be actively watching 40k files in my large project. I noticed that VS Code in the same project only watches around 200 files. I've read that VS Code uses a different version of node (electron-based?) with pointer compression so that could account for some improvements. That being said, I noticed that VS Code starts tsserver with the --canUseWatchEvents flag and typescript-language-server does not so that seemed like a good starting point.

Is there an option or workaround that I can use to test this theory?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant