Skip to content

Instantly share code, notes, and snippets.

@dlants
Created April 14, 2023 19:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dlants/da122f0300e034d19fe0f3da0b3e214d to your computer and use it in GitHub Desktop.
Save dlants/da122f0300e034d19fe0f3da0b3e214d to your computer and use it in GitHub Desktop.
How to debug neovim lsp-config's interaction w/ tsserver / typescript-language-server
require("lspconfig").tsserver.setup {
cmd = {"typescript-language-server", "--stdio", "--log-level", "4"},
init_options = {
hostInfo = "neovim",
maxTsServerMemory = 4096,
tsserver = {
logDirectory = <path>,
logVerbosity = "verbose"
}
},
}
-- the files will appear in the <path> directory, for example, for me it was
-- less /Users/username/.local/state/nvim/tsserver-log-ozW7t8/tsserver.log
@dlants
Copy link
Author

dlants commented Apr 14, 2023

I needed to do this to figure out a weird OOM / SIGABRT message coming from tsserver.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment