Installation

VSCode

Install the EmmyLua Extension for the best development experience.

Intellij Idea

Install the EmmyLua2 Plugin from the JetBrains Marketplace.

NeoVim

  1. Install EmmyLua to your system using cargo (or another method, see below):

    cargo install emmylua_ls
    
  2. Install nvim-lspconfig.

  3. Enable LSP client in your init.lua:

    vim.lsp.enable({"emmylua_ls"})
    
  4. You can configure EmmyLua via vim.lsp.config:

    vim.lsp.config('emmylua_ls', {
      settings = {
        emmylua = {
          -- Anything from `.emmyrc.json`, for example:
          hint = {
            paramHint = false
          }
        }
      }
    })
    

    See :help lspconfig-all | /emmylua_ls for more info.

    备注

    These options will override project-specific .emmyrc.json.

    For options that control LSP features, this is a desired behavior; for options that control language analysis, it is not.

    If you need to alter defaults without overriding project-specific settings, you can do so by creating .emmyrc.json in your home or config directory. See User settings for details.

Standalone

EmmyLua is available as a standalone executable.

Via Cargo:

  1. Install Rust and Cargo.

  2. # Install the language server
    cargo install emmylua_ls
    
    # Install documentation generator
    cargo install emmylua_doc_cli
    
    # Install static analyzer
    cargo install emmylua_check
    

Pre-built binaries:

Download the latest binaries from our releases page.