|
1 | | -# Intellij-EmmyLua2 |
| 1 | +# 🚀 EmmyLua2 for IntelliJ IDEA |
2 | 2 |
|
3 | | -## MarketPlace |
| 3 | +<div align="center"> |
4 | 4 |
|
5 | | -https://plugins.jetbrains.com/plugin/25076-emmylua2 |
| 5 | +[](https://plugins.jetbrains.com/plugin/25076-emmylua2) |
| 6 | +[](https://plugins.jetbrains.com/plugin/25076-emmylua2) |
| 7 | +[](https://plugins.jetbrains.com/plugin/25076-emmylua2) |
| 8 | +[](https://opensource.org/licenses/MIT) |
6 | 9 |
|
7 | | -## Features |
| 10 | +**Modern Lua development plugin providing powerful Lua language support for IntelliJ IDEA** |
8 | 11 |
|
9 | | -All Features come from [emmylua-analyzer-rust](https://github.com/CppCXY/emmylua-analyzer-rust) |
| 12 | +[📦 Install Plugin](https://plugins.jetbrains.com/plugin/25076-emmylua2) · [🐛 Report Issues](https://github.com/CppCXY/Intellij-EmmyLua2/issues) · [💡 Feature Requests](https://github.com/CppCXY/Intellij-EmmyLua2/discussions) |
10 | 13 |
|
11 | | -## How to develop |
| 14 | +</div> |
12 | 15 |
|
13 | | -1. Open this project with Intellij idea and wait sync |
14 | | -2. Select and Run `buildPlugin` from gradle window |
15 | | -3. Run `runide` from gradle |
| 16 | +## ✨ Features |
| 17 | + |
| 18 | +> Powered by the robust [emmylua-analyzer-rust](https://github.com/CppCXY/emmylua-analyzer-rust) engine |
| 19 | +
|
| 20 | +### 🎯 Core Features |
| 21 | +- **Smart Code Completion** - Context-aware precise code suggestions |
| 22 | +- **Syntax Highlighting** - Support for Lua 5.1/5.2/5.3/5.4 syntax |
| 23 | +- **Error Detection** - Real-time syntax and semantic error reporting |
| 24 | +- **Code Navigation** - Quick jump to definitions, find references |
| 25 | +- **Refactoring Support** - Rename, extract variables and other refactoring operations |
| 26 | + |
| 27 | +### 🔧 Advanced Features |
| 28 | +- **EmmyLua Annotations Support** - Complete type annotation system |
| 29 | +- **Debugger Integration** - Built-in EmmyLua debugger |
| 30 | +- **Multi-platform Support** - Full support for Windows, macOS, Linux |
| 31 | +- **Performance Optimization** - High-performance language server based on Rust |
| 32 | + |
| 33 | +## 🛠️ Installation |
| 34 | + |
| 35 | +### Install from JetBrains Marketplace (Recommended) |
| 36 | + |
| 37 | +1. Open IntelliJ IDEA |
| 38 | +2. Go to `File` → `Settings` → `Plugins` |
| 39 | +3. Search for "EmmyLua2" |
| 40 | +4. Click `Install` to install the plugin |
| 41 | +5. Restart IDE |
| 42 | + |
| 43 | +### Manual Installation |
| 44 | + |
| 45 | +1. Download the latest version from [Releases](https://github.com/CppCXY/Intellij-EmmyLua2/releases) |
| 46 | +2. In IntelliJ IDEA, go to `File` → `Settings` → `Plugins` |
| 47 | +3. Click the gear icon → `Install Plugin from Disk...` |
| 48 | +4. Select the downloaded plugin file |
| 49 | +5. Restart IDE |
| 50 | + |
| 51 | +## 🚀 Quick Start |
| 52 | + |
| 53 | +### Create Lua Project |
| 54 | + |
| 55 | +1. `File` → `New` → `Project` |
| 56 | +2. Select `Lua` project type |
| 57 | +3. Configure project settings |
| 58 | +4. Start writing Lua code! |
| 59 | + |
| 60 | +### Configure EmmyLua Annotations |
| 61 | + |
| 62 | +```lua |
| 63 | +---@class Player |
| 64 | +---@field name string |
| 65 | +---@field level number |
| 66 | +local Player = {} |
| 67 | + |
| 68 | +---Create new player |
| 69 | +---@param name string Player name |
| 70 | +---@param level number Player level |
| 71 | +---@return Player |
| 72 | +function Player:new(name, level) |
| 73 | + return setmetatable({ |
| 74 | + name = name, |
| 75 | + level = level |
| 76 | + }, { __index = self }) |
| 77 | +end |
| 78 | +``` |
| 79 | + |
| 80 | +## 🔧 Supported IDE Versions |
| 81 | + |
| 82 | +| IDE Version | Plugin Version | Status | |
| 83 | +|-------------|----------------|--------| |
| 84 | +| 2024.3+ | 0.8.x | ✅ Actively Supported | |
| 85 | + |
| 86 | +## 🤝 Contributing |
| 87 | + |
| 88 | +We welcome contributions of all kinds! Please check the [Contributing Guide](CONTRIBUTING.md) to learn how to participate in the project. |
| 89 | + |
| 90 | +### Development Environment Setup |
| 91 | + |
| 92 | +#### 📋 Prerequisites |
| 93 | + |
| 94 | +- **JDK 17+** - Recommended to use OpenJDK or Oracle JDK |
| 95 | +- **IntelliJ IDEA 2024.3+** - Ultimate or Community Edition |
| 96 | +- **Git** - Version control tool |
| 97 | + |
| 98 | +#### 🔨 Build Steps |
| 99 | + |
| 100 | +1. **Clone Repository** |
| 101 | + ```bash |
| 102 | + git clone https://github.com/CppCXY/Intellij-EmmyLua2.git |
| 103 | + cd Intellij-EmmyLua2 |
| 104 | + ``` |
| 105 | + |
| 106 | +2. **Import Project** |
| 107 | + - Open the project with IntelliJ IDEA |
| 108 | + - Wait for Gradle sync to complete |
| 109 | + |
| 110 | +3. **Build Plugin** |
| 111 | + ```bash |
| 112 | + ./gradlew buildPlugin |
| 113 | + ``` |
| 114 | + |
| 115 | +4. **Run Development Environment** |
| 116 | + ```bash |
| 117 | + ./gradlew runIde |
| 118 | + ``` |
| 119 | + |
| 120 | +#### 🎯 Available Gradle Tasks |
| 121 | + |
| 122 | +| Task | Description | |
| 123 | +|------|-------------| |
| 124 | +| `buildPlugin` | Build plugin distribution package | |
| 125 | +| `runIde` | Run plugin in IDE sandbox | |
| 126 | +| `test` | Run test suite | |
| 127 | +| `downloadEmmyLuaAnalyzer` | Download Emmy Lua Analyzer | |
| 128 | +| `installDependencies` | Install all dependencies | |
| 129 | +| `cleanDependencies` | Clean downloaded dependencies | |
| 130 | + |
| 131 | +## 📊 Project Statistics |
| 132 | + |
| 133 | +<div align="center"> |
| 134 | + |
| 135 | + |
| 136 | + |
| 137 | + |
| 138 | + |
| 139 | + |
| 140 | +</div> |
| 141 | + |
| 142 | +## 🙏 Acknowledgments |
| 143 | + |
| 144 | +- [emmylua-analyzer-rust](https://github.com/CppCXY/emmylua-analyzer-rust) - Core language analysis engine |
| 145 | +- [EmmyLuaDebugger](https://github.com/EmmyLua/EmmyLuaDebugger) - Debugger support |
| 146 | +- [LSP4IJ](https://github.com/redhat-developer/lsp4ij) - LSP client implementation |
| 147 | + |
| 148 | +## 📄 License |
| 149 | + |
| 150 | +This project is open source under the [MIT License](LICENSE). |
| 151 | + |
| 152 | +--- |
| 153 | + |
| 154 | +<div align="center"> |
| 155 | + |
| 156 | +**⭐ If this project helps you, please give us a Star!** |
| 157 | + |
| 158 | +Made with ❤️ by [CppCXY](https://github.com/CppCXY) |
| 159 | + |
| 160 | +</div> |
16 | 161 |
|
17 | 162 |
|
0 commit comments