1

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.

2
  • Please provide enough code so others can better understand or reproduce the problem. Commented Feb 22, 2024 at 11:56
  • I already added the github link for the config in this post Commented Feb 22, 2024 at 14:29

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.