linuxlua

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


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.


Solution

  • The easiest way that I found is to use brew package manager.

    1. Install Brew on Linux
    2. Add Brew to $PATH. (It will be suggested at the end of the Brew installation. Just copy-paste)
    3. Reload terminal to be able to use brew after setting the $PATH
    4. Run brew install lua-language-server in terminal
    5. Run lua-language-server (just to check if it is installed correctly)
    6. Close lua-luangage-server (Ctrl + C)
    7. Done