getting error while setting up typescript lsp in neovim using lazy package manager

232 views Asked by At

I got the below error in nvim while opening a .ts file. I have used mason, mason-lspconfig and nvim-lspconfig for setting up lsp. For lua loanguage the lsp is working properly. But for ts files, i am getting error as in the below screenshot.

enter image description here

Here is the screenshot of the lsp.log.

enter image description here

I have uploaded my config in my github, here is the link for that repo: https://github.com/MuraliPrasanth2/nvim-lazy-config

could anyone let me know, what am i need to do to resolve this issue?

When i searched for the solution, i came to know that i need to have a package.json and tsconfig file as well in the root folder, so i have used "npm init -y" to create the package.json and "tsc --init" to create a tsconfig file. But The issue is still not resolved. I am getting the same error message.

1

There are 1 answers

0
user3109582 On

I installed typescript-language-server from npm in the below location

/home/muralishal/.local/share/nvim/mason

using the command

npm install typescript-language-server

now the error is resolved.