|
2 | 2 |
|
3 | 3 | [中文Log](CHANGELOG_CN.md) |
4 | 4 |
|
| 5 | +## [0.9.36] - 2026-4-1 |
| 6 | + |
| 7 | +### ✨ Added |
| 8 | + |
| 9 | +- **Support for `@return_overload` annotation**: Added support for `@return_overload` , which allow you define function return like pcall |
| 10 | +```lua |
| 11 | +---@return_overload true, string |
| 12 | +---@return_overload false, integer |
| 13 | +local function func() |
| 14 | +end |
| 15 | +``` |
| 16 | +then the two variables in `local ok, res = func()` will be correctly inferred as `ok: true, res: string` and `ok: false, res: integer` respectively. |
| 17 | + |
| 18 | +- **Ready for New Formatter**: The language server plans to introduce a new formatter in version 0.23.0. This formatter can currently be experienced in CLI mode. You can download the latest formatter `luafmt` from the release page. For related documentation, please refer to [EmmyLua Formatter Documentation Index](docs/emmylua_formatter/README_EN.md). This formatting tool draws inspiration from Prettier while maintaining more style options from EmmyLua CodeStyle. After replacing the original formatter, emmylua_ls will no longer depend on high-version C++ compilers, and formatting results will be more stable. However, there are still some edge cases with suboptimal formatting, which will be continuously fixed in subsequent versions. |
| 19 | + |
| 20 | + |
| 21 | +- **Support @schema url annotation**: Added support for `@schema` annotation, |
| 22 | +which can be use to add completion and hover for json-schema-defined APIs. For example: |
| 23 | +```lua |
| 24 | +---@schema https://raw.githubusercontent.com/EmmyLuaLs/emmylua-analyzer-rust/refs/heads/main/crates/emmylua_code_analysis/resources/schema.json |
| 25 | +local c = { |
| 26 | + -- will suggest `diagnostics` and more |
| 27 | +} |
| 28 | + |
| 29 | +``` |
| 30 | + |
| 31 | +### 🔧 Changed |
| 32 | + |
| 33 | +- **Update luars to 0.17.0**: Updated the `luars` dependency to version 0.17.0. |
| 34 | +- **Improve performance**: Properly improved performance through a series of measures |
| 35 | + |
| 36 | +### 🐛 Fixed |
| 37 | + |
| 38 | +- fix package.searchpath returns nil+error if none succeeds |
| 39 | +- fix module recursive |
| 40 | +- fix shebang support |
| 41 | +- fix global declaration support |
| 42 | +- fix select(n, func()) correctly narrows type when func returns multiple values |
| 43 | +- fix resolve alias-call returns and simplify flow assignments |
| 44 | +- fix the next returned by pairs should accept 2 arguments |
| 45 | +- fix enforce segment-boundary fuzzy require matching |
| 46 | +- fix stabilize fuzzy require resolution across duplicate suffix matches |
| 47 | +- fix package.searchpath returns nil+error if none succeeds |
| 48 | +- fix lua5.5 named vararg support: donot report syntax-error |
| 49 | + |
5 | 50 | ## [0.9.35] - 2026-2-2 |
6 | 51 |
|
7 | 52 | ### ✨ Added |
|
0 commit comments