We welcome your feedback and contributions. Please feel free to submit pull requests (PRs) and report issues to help shape the project's direction.
emmylua_parser: A Lua parser written in Rust, designed to provide efficient and accurate parsing of Lua scripts. This crate serves as the foundation for other tools in the project, enabling robust code analysis and language server functionalities.code_analysis: lua code analysis base on emmylua_parser.emmylua_ls: language server for Lua.meta_text: A library for manipulating text with meta information.
- Support for Lua 5.1, 5.2, 5.3, 5.4, and LuaJIT.
- Support Luacats/emmylua annotations.
- Support almost lsp features.
cargo build --release -p emmylua_lsThe language service supports both stdio and TCP communication, with stdio communication as the default. It has several startup parameters:
-cspecifies the communication method. Acceptable values arestdioandtcp, with the default beingstdio.--portWhen the-cparameter is set totcp, the--portparameter can specify the port number, with the default value of5007.--log-levelspecifies the log level. Acceptable values aredebug,info,warn,error, with the default beinginfo.--log-pathspecifies the directory path for the log files.
For example:
emmylua_ls -c tcp --port 5007 --log-level debug
# Without parameters, it uses stdio communication
emmylua_lsHowever, having only the executable is not enough. It needs to load some resource files, which are located in the project's resources directory. By default, it will first look for the resources directory in the current directory or its parent directories. Alternatively, you can specify the path to the resources directory through the EMMYLUA_LS_RESOURCES environment variable.