Closed dmambapoor closed 9 months ago
You are missing the comma at the end of the list in ensure_installed
.
Hi, the comma was in my lua.lsp
, I just accidentally deleted it when making the issue. I've edited the original issue comment to reflect the comma.
Ok. Maybe there is an error during installation. Try installing manually using the command :LspInstall lua_ls
and see if you get an error message.
It worked without errors.
"lua-language-server" was successfully installed.
I did the following:
:LspUninstall lua_ls
:LspInstall lua_ls
"lua-language-server" was successfully installed.
It does not seem to automatically install lua_ls without specifying it in ensure_installed
.
Language servers rarely work as expected right after installation. You need to restart neovim for them to work correctly. And if your "go to definition" doesn't work, you should check the root directory is correct, using the command :LspInfo
.
I was following ThePrimeagen's 0 to LSP : Neovim RC From Scratch. I created a
lsp.lua
file as instructed, and I noticed my jump to definition was not working on lua files. After making the following changes tolsp.lua
, my jump to definition was working.System: Ubuntu 22.04.3 (minimal installation) Plugin Manager: Packer LSP-Zero packer.lua: