kickstart.nvim icon indicating copy to clipboard operation
kickstart.nvim copied to clipboard

tsserver LSP init failing without installing as root

Open vojtech-mikes opened this issue 1 year ago • 4 comments

Hi,

maybe dumb question or skill issue (probably) but i cannot find answer online.

I have enabled tsserver in main init.lua file and after that i got this error message on every startup of neovim.

"Cannot access configuration for tsserver. Ensure this server is listed in server_configurations.md or added as a custom server."

After i ran neovim as root with sudo -E -s and reinstalled LSP error message disappeared. Why does it behave like this?

I have installed Node version 21.6.2 with nvm and I am running on Sonoma 14.2.1.

vojtech-mikes avatar Mar 05 '24 23:03 vojtech-mikes

Neovim is just using tools outside of neovim for LSP. You might have installed something, like tsserver, when in elevated/sudo mode?

Try-reinstalling tsserver, and make you don't install it with sudo?

fredrikaverpil avatar Mar 06 '24 05:03 fredrikaverpil

That's the thing. Let me try to rephrase.

I have had a clean installation. I proceeded like this:

  1. Had a clean install of neovim and launched it to be sure it is working
  2. Install nvm and Node
  3. Cloned kickstart repo
  4. Launched neovim for the first time
  5. Enabled tsserver and relaunched neovim. (At this moment said error message appears on every launch)
  6. Exit neovim, enter root mode, and launch neovim again (errors gone)
  7. Exit root mode and launch vim (error is still gone)

This behavior is reproducible on my machine every time.

My question is if it had problems with privileges, why it was able to install tsserver in the first place? I don't understand why it behaves like this. It is a kinda of interesting behavior, maybe some faulty configuration on my side but still interesting.

PS: If this thread polluting the issues feed feel free to close this. I was just curious.

vojtech-mikes avatar Mar 06 '24 07:03 vojtech-mikes

Sorry, but in which step and how did you install typescript-language-server?

SebasF1349 avatar Mar 06 '24 11:03 SebasF1349

Step 5 with Mason

vojtech-mikes avatar Mar 06 '24 16:03 vojtech-mikes