Closed zakissimo closed 2 years ago
As stated in our documentation, you need one of these files/folders (in the case of git) in order for the project to be detected:
npm install tsserver
works because it creates a package.json, not because it installs the language server.
Please re-read the documentation:
https://github.com/neovim/nvim-lspconfig/blob/master/doc/lspconfig.txt#L359-L460
https://github.com/neovim/nvim-lspconfig#debugging
https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#tsserver
Hey again, so this is by design. When working on typescript projects it is expected for you to have at least one of these files or folders in your workspace:
tsconfig.json
package.json
jsconfig.json
.git/
I see, thank you for informing me and sorry for the inconvenience I caused.
No worries! After rereading my first response I see how it could've been interpreted differently :D
Description
Unless I manually
npm install ts-server
in the root of my project or create a git rep, lspconfig is unable to find if.Neovim version
NVIM v0.7.0-dev+1395-ge135adcb8 Build type: RelWithDebInfo LuaJIT 2.1.0-beta3
Nvim-lspconfig version
No response
Operating system and version
Linux desk 5.17.1-arch1-1 #1 SMP PREEMPT Mon, 28 Mar 2022 20:55:33 +0000 x86_64 GNU/Linux
Affected language servers
tsserver
Steps to reproduce
:LspInfo
Actual behavior
Expected behavior
I expect lspconfig to find the root dir
Minimal config
I'm using lsp-installer, see https://github.com/williamboman/nvim-lsp-installer/issues/585