Introduction to EmmyLua Analyzer
EmmyLua Analyzer is a revolutionary Lua development toolset built with Rust, delivering 10x faster performance than traditional Lua language servers while providing comprehensive static analysis, intelligent code completion, and documentation generation capabilities.What is EmmyLua Analyzer?
EmmyLua Analyzer is a complete ecosystem for Lua development consisting of three main components:emmylua_ls
Language Server Protocol (LSP) implementation for editor integration
emmylua_check
Static analyzer for identifying code issues in CI/CD pipelines
emmylua_doc_cli
Documentation generator from EmmyLua annotations
Why Choose EmmyLua Analyzer?
Performance First
Built with Rust’s zero-cost abstractions, EmmyLua Analyzer delivers exceptional performance:- 10x faster than traditional Lua language servers
- Memory-efficient analysis engine
- Incremental compilation for instant feedback
- Handles large codebases with ease
Intelligent Analysis
Advanced Type Inference
Advanced Type Inference
EmmyLua’s type inference system understands complex Lua patterns, tracking types through function calls, table operations, and control flow to provide accurate diagnostics and suggestions.
Cross-Reference Resolution
Cross-Reference Resolution
Navigate your codebase effortlessly with go-to-definition, find-references, and workspace symbol search that understands module dependencies and require patterns.
Real-Time Error Detection
Real-Time Error Detection
Catch bugs as you type with over 50 diagnostic rules covering syntax errors, type mismatches, undefined variables, unused code, and code style issues.
Universal Compatibility
EmmyLua Analyzer supports all major Lua versions and implementations, making it suitable for any Lua project.
- Lua 5.1 through 5.5
- LuaJIT with performance optimizations
- Cross-platform: Windows, macOS, and Linux
- VS Code (via extension)
- Neovim (native LSP)
- IntelliJ IDEA (via plugin)
- Any LSP-compatible editor
Key Features
Language Server Protocol (LSP)
Theemmylua_ls language server provides a complete LSP implementation with:
Code Intelligence
- Auto-completion with context awareness
- Hover information with type details
- Signature help for function calls
- Inlay hints for types and parameters
Code Navigation
- Go to definition
- Find all references
- Go to implementation
- Document and workspace symbols
Refactoring
- Smart rename across files
- Code actions for quick fixes
- Organize imports
- Extract to function
Code Quality
- Real-time diagnostics
- Code formatting
- Semantic highlighting
- Call hierarchy
Annotation System
EmmyLua Analyzer supports both EmmyLua and Luacats annotation styles:Static Analysis
Theemmylua_check tool performs comprehensive static analysis:
- Over 50 diagnostic rules
- Configurable severity levels
- CI/CD integration support
- JSON and text output formats
- Fast analysis for large codebases
Documentation Generation
Theemmylua_doc_cli tool generates beautiful documentation:
- Parses EmmyLua annotations automatically
- Generates Markdown or JSON output
- Customizable templates
- Perfect for API documentation
- GitHub Pages integration
Architecture Overview
The analyzer consists of several layers:- Parser Layer: Fast, error-tolerant Lua parser built with Rowan (Red-Green tree)
- Semantic Layer: Symbol resolution, scope analysis, and module dependency tracking
- Type System: Advanced type inference with generics, union types, and type narrowing
- Service Layer: LSP implementation, diagnostics engine, and documentation generator
Performance Characteristics
Startup Time
Cold start: < 2 seconds for most projectsIncremental updates: < 100ms
Memory Usage
~50MB base + ~100MB per 10k LOCEfficient incremental compilation
Next Steps
Installation
Install EmmyLua Analyzer and its components
Quick Start
Get up and running in 5 minutes
Editor Setup
Configure your favorite editor
Configuration
Learn about configuration options
Community and Support
GitHub Repository
Star us on GitHub and contribute
Report Issues
Found a bug? Let us know!
