A Zed extension that provides EmmyLua Analyzer Rust support for Lua development.
- Code Completion: Intelligent autocomplete for Lua code
- Diagnostics: Real-time error detection and warnings
- Go to Definition: Navigate to symbol definitions
- Hover Information: View documentation and type information
- Signature Help: Function parameter hints
- Code Actions: Quick fixes and refactoring suggestions
- Inlay Hints: Type and parameter hints
Full features guide check here
- Open Zed
- Open the command palette (
Cmd+Shift+Pon macOS,Ctrl+Shift+Pon Linux/Windows) - Run
zed: extensions - Search for "EmmyLua for Zed" and install
The extension will automatically download and configure the EmmyLua Analyzer Rust binary.
Maybe conflict with Lua language sever.
You can customize the extension settings in your Zed configuration file (settings.json).
You can specify a custom EmmyLua Analyzer Rust binary:
{
"lsp": {
"emmylua": {
"binary": {
"path": "/path/to/emmylua_ls",
"arguments": []
}
}
}
}The extension looks for EmmyLua configuration files in the following.emmyrc.json (EmmyLua Analyzer Rust specific)
Example .emmyrc.json:
{
"$schema": "https://raw.githubusercontent.com/EmmyLuaLs/emmylua-analyzer-rust/refs/heads/main/crates/emmylua_code_analysis/resources/schema.json",
"runtime": {
"version": "Lua5.4"
},
"workspace": {
"library": [
"/usr/local/share/lua/5.4"
]
},
"diagnostics": {
"globals": [
"vim",
"love"
]
}
}- Clone the repository
- Run
cargo buildto build the extension - Install in Zed using the local development path
Contributions are welcome! Please feel free to submit issues and pull requests.
If you encounter a "Permission denied" error:
# Find the binary location
find ~/.local/share/zed/extensions/emmylua -name "emmylua_ls" -type f
# Make it executable
chmod +x ~/.local/share/zed/extensions/emmylua/emmylua_ls/emmylua_lsIf the extension can't find the EmmyLua binary:
- Check the Zed logs for detailed error messages
- Ensure your platform/architecture is supported
- Try removing the extension and reinstalling
- Check your internet connection for downloads
If the language server doesn't start:
- Verify your
.emmyrc.jsonsyntax is valid - Check that workspace library paths exist
- Ensure diagnostic settings are correct
- Try with minimal configuration first
- Check Zed logs for detailed error messages
- Create an issue on GitHub with your configuration and error logs
- Include your OS, Zed version, and extension version
This project is licensed under the MIT License - see the LICENSE file for details.
- EmmyLua Analyzer Rust - The underlying language server
- Zed - The editor this extension is built for
{ // Other settings... "languages": { "Lua": { "language_servers": [ "!lua-language-server", "emmylua", "..." ], // ...other Lua settings } }, // Other settings... }