Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kentlouisetonino/aded039a5e2daf3297a58f3b0eb1158b to your computer and use it in GitHub Desktop.
Save kentlouisetonino/aded039a5e2daf3297a58f3b0eb1158b to your computer and use it in GitHub Desktop.
Description

Install the tar file in Github releases.


Extract the file.

# Go to the Downloads directory.
cd Downloads

# Extract the file to a specific folder.
mkdir lua-language-server && tar -xzf <file-name>.tar.gz -C ./lua-language-server

Move the file to the /opt directory.

# Move the folder.
sudo mv lua-language-server /opt/

Executing the binary file.

# Calling the language server.
/opt/lua-language-server/bin/lua-language-server
  • Example in neovim init.lua.
-- LUA CONFIGURATION
lspconfig.lua_ls.setup {
  cmd = { "/opt/lua-language-server/bin/lua-language-server" },
  settings = {
    Lua = {
      diagnostics = {
        -- Get the language server to recognize the `vim` global
        globals = {'vim'},
      },
    },
  },
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment