Skip to content

EmmyLuaLs/emmylua-analyzer-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŒŸ EmmyLua Analyzer Rust

GitHub stars GitHub license GitHub release Rust Crates.io


๐Ÿ’ซ Revolutionary Lua Development Experience

Powered by Rust's blazing performance and memory safety

๐ŸŽฏ What Makes Us Different

โšก Performance First

  • 10x faster than traditional Lua servers
  • Zero-cost abstractions with Rust
  • Incremental compilation for instant feedback
  • Memory-efficient analysis engine

๐Ÿง  Intelligent Analysis

  • Advanced type inference system
  • Cross-reference resolution
  • Semantic highlighting with context
  • Real-time error detection

๐Ÿ”ง Universal Compatibility

  • Lua 5.1 through 5.4 support
  • LuaJIT optimization
  • Cross-platform deployment
  • Editor-agnostic LSP implementation

๐Ÿ“š Developer Ecosystem

  • Rich documentation generation
  • Code formatting and style enforcement
  • Static analysis and linting
  • Project scaffolding tools

๐Ÿ—๏ธ Architecture & Crates

Our project is meticulously organized into specialized crates, each serving a critical role in the Lua analysis ecosystem:

Crate Badge Description
๐Ÿ” emmylua_parser emmylua_parser The foundational Rust-based Lua parser engineered for maximum efficiency and accuracy. Powers all downstream analysis tools.
๐Ÿง  emmylua_code_analysis emmylua_code_analysis Advanced semantic analysis engine providing deep code understanding, type inference, and cross-reference resolution.
๐Ÿ–ฅ๏ธ emmylua_ls emmylua_ls The complete Language Server Protocol implementation offering rich IDE features across all major editors.
๐Ÿ“š emmylua_doc_cli emmylua_doc_cli Professional documentation generator creating beautiful, searchable API docs from your Lua code and annotations.
โœ… emmylua_check emmylua_check Comprehensive static analysis tool for code quality assurance, catching bugs before they reach production.

โœจ Features

๐ŸŽฏ Core Capabilities

๐Ÿ” Language Support

  • โœ… Lua 5.1 - Full compatibility
  • โœ… Lua 5.2 - Complete feature set
  • โœ… Lua 5.3 - Integer types & UTF-8
  • โœ… Lua 5.4 - Latest features
  • โœ… LuaJIT - Performance optimizations

๐Ÿ“ Annotation System

  • โœ… EmmyLua annotations
  • โœ… Luacats documentation
  • โœ… Type definitions
  • โœ… Generic types
  • โœ… Union types

๐Ÿ› ๏ธ LSP Features

  • โœ… Auto-completion with context
  • โœ… Go to definition
  • โœ… Find references
  • โœ… Hover information
  • โœ… Signature help
  • โœ… Rename refactoring
  • โœ… Code actions
  • โœ… Diagnostics

๐ŸŽจ Code Quality

  • โœ… Syntax highlighting
  • โœ… Error detection
  • โœ… Code formatting
  • โœ… Style enforcement
  • โœ… Unused variable detection
  • โœ… Type checking

๐Ÿš€ Quick Start

Prerequisites

Before getting started, ensure you have Rust installed on your system:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

๐Ÿ“ฆ Installation

Choose your preferred installation method:

๐Ÿฆ€ Via Cargo
# 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.

๐Ÿ”ง Build from Source
git clone https://github.com/CppCXY/emmylua-analyzer-rust.git
cd emmylua-analyzer-rust
cargo build --release -p emmylua_ls

๐ŸŽฎ Editor Integration

VS Code

Install the EmmyLua Extension for the best development experience.

Neovim

Configure with your LSP client:

vim.lsp.enable({"emmylua_ls"})
Intellij IDE

Install the EmmyLua2 Plugin from the JetBrains Marketplace.

Other Editors

EmmyLua Analyzer Rust implements the standard LSP protocol, making it compatible with any editor that supports LSP.


๐Ÿ“– Documentation


๐Ÿ› ๏ธ Usage & Examples

๐Ÿ–ฅ๏ธ Language Server (emmylua_ls)

Start the language server with default settings:

emmylua_ls

Advanced usage with custom configuration:

# TCP mode for remote debugging
emmylua_ls -c tcp --port 5007 --log-level debug --log-path ./logs

# Stdio mode (default)
emmylua_ls -c stdio --log-level info

# Stdio mode default parameters
emmylua_ls

Server Parameters:

  • -c, --communication: Communication method (stdio | tcp)
  • --port: TCP port when using TCP mode (default: 5007)
  • --log-level: Logging level (debug | info | warn | error)
  • --log-path: Directory for log files

๐Ÿ“š Documentation Generator (emmylua_doc_cli)

Generate beautiful API documentation:

# Basic usage
emmylua_doc_cli --input ./src --output ./docs

โœ… Static Analyzer (emmylua_check)

Perform comprehensive code analysis:

# Analyze current workspace
emmylua_check .

# Analyze specific directory with detailed output
emmylua_check ./src --verbose --format json

๐Ÿ—๏ธ Development

Building from Source

# Clone the repository
git clone https://github.com/CppCXY/emmylua-analyzer-rust.git
cd emmylua-analyzer-rust

# Build all crates
cargo build --release

# Build specific components
cargo build --release -p emmylua_ls
cargo build --release -p emmylua_doc_cli
cargo build --release -p emmylua_check

Testing

# Run all tests
cargo test

# Run tests for specific crate
cargo test -p emmylua_parser

# Run with coverage
cargo test --all-features --no-fail-fast

Contributing

We welcome contributions!.


๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


๐Ÿ™ Acknowledgments

Special thanks to all contributors and the Lua community for their continuous support.

โฌ† Back to Top

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published