Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install lua-language-server on linux (Ubuntu)?

Tags:

linux

lua

I'm trying to configure LSP in Neovim using lsp-config. I need to install lua-language-server to make the Lua LSP work, but I don't know how to install lua-language-server on Linux. The official documentation only shows how to install it for macOS and Windows.

Could you help me install it?

Ultimately, lua-language-server should be available in the terminal so that lsp-config can use it.

like image 606
Roman Mahotskyi Avatar asked Aug 31 '25 16:08

Roman Mahotskyi


1 Answers

Here's the way for choosing "B. From latest release" from github.

  1. Download the .gz file that meets your architecture.
  2. I'd like to put the files to ~/.local/share/lua-lang-server. You can choose other place for them.
mkdir -p ~/.local/share/lua-lang-server && \
tar --extract --file <YOUR .gz FILE> -av -C ~/.local/share/lua-lang-server
  1. Create a symbolic link in ~/.local/bin to the executable.
ln -s ~/.local/share/lua-lang-server/bin/lua-language-server ~/.local/bin/lua-language-server
  1. Test if it works by executing lua-language-server.
  2. (Optional) If step 4 fails since bash cannot find the executable lua-language-server, then you have to append ~/.local/bin to the environment variable PATH.
export PATH=$PATH:~/.local/bin
like image 123
Rock Avatar answered Sep 03 '25 03:09

Rock