I’ve got tsserver running locally with Neovim and everything works great. Now I’d like to put tsserver into a Docker container so I can have LSP goodness without needing to install Node on my host machine. I saw the article about doing something similar with C (Running language servers in containers · neovim/nvim-lspconfig Wiki · GitHub) and did the same, modifying my container and script to my NodeJS requirements. I’m pretty sure nvim-lspconfig was setup correctly, and at times a client did seem to connect, but then it would disconnect and report the client exited with a status of 1.
I enabled logging for LSP, but I never saw any reason why the client was disconnecting—the only messages in the log were either DEBUG or INFO. The container logs were silent, so no leads there either. I was running typescript-language-server --stdio
in my container, and I could (sporadically) see a connected client when viewing the output of :LspInfo
, but it never lasted more than a second. I had the container running continuously with tail -f /dev/null
as the ENTRYPOINT, and it remained up while the client was thrashing.
Does anyone know how I might get more visibility into this problem? I feel like I’m close to figuring this out… If it’s helpful to see the scripts/Dockerfile/nvim config, lemme know what I should post. If anyone else has successfully done this I’d love to hear how! Thanks.