Skip to content

Commit 165ee86

Browse files
committed
update version
1 parent 6b063be commit 165ee86

5 files changed

Lines changed: 100 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,51 @@
22

33
[中文Log](CHANGELOG_CN.md)
44

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+
550
## [0.9.35] - 2026-2-2
651

752
### ✨ Added

CHANGELOG_CN.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,48 @@
11
# 🚀 Change Log
22

3+
## [0.9.36] - 2026-4-1
4+
5+
### ✨ 新增
6+
7+
- **支持 `@return_overload` 注解**:新增对 `@return_overload` 注解的支持,允许像 pcall 一样定义函数返回值
8+
```lua
9+
---@return_overload true, string
10+
---@return_overload false, integer
11+
local function func()
12+
end
13+
```
14+
此时 `local ok, res = func()` 中的两个变量将被正确推断为 `ok: true, res: string``ok: false, res: integer`
15+
16+
- **新格式化器准备**:语言服务器计划在 0.23.0 版本引入新的格式化器。该格式化器目前可在 CLI 模式中体验。您可以从发布页面下载最新的格式化工具 `luafmt`。相关文档请参阅 [EmmyLua 格式化器文档索引](docs/emmylua_formatter/README_EN.md)。该格式化工具受 Prettier 启发,同时保留了 EmmyLua CodeStyle 的更多风格选项。在原有格式化器被替换后,emmylua_ls 将不再依赖高版本 C++ 编译器,格式化结果也将更加稳定。但仍存在一些格式化效果欠佳的边界情况,将在后续版本中持续修复。
17+
18+
- **支持 `@schema` URL 注解**:新增对 `@schema` 注解的支持,可用于为 json-schema 定义的 API 添加代码补全和悬停提示。例如:
19+
```lua
20+
---@schema https://raw.githubusercontent.com/EmmyLuaLs/emmylua-analyzer-rust/refs/heads/main/crates/emmylua_code_analysis/resources/schema.json
21+
local c = {
22+
-- 将建议 `diagnostics` 等字段
23+
}
24+
25+
```
26+
27+
### 🔧 变更
28+
29+
- **更新 luars 至 0.17.0**:将 `luars` 依赖更新至 0.17.0 版本。
30+
- **性能优化**:通过一系列措施进一步优化了性能
31+
32+
### 🐛 修复
33+
34+
- 修复了 package.searchpath 在无匹配时返回 nil+error 的问题
35+
- 修复了模块递归问题
36+
- 修复了 shebang 支持
37+
- 修复了全局声明支持
38+
- 修复了 select(n, func()) 在 func 返回多个值时正确收窄类型
39+
- 修复了 alias-call 返回值解析并简化流赋值
40+
- 修复了 pairs 返回的 next 应接受 2 个参数
41+
- 修复了分段边界模糊 require 匹配的强制执行
42+
- 修复了在重复后缀匹配中稳定模糊 require 解析
43+
- 修复了 package.searchpath 在无匹配时返回 nil+error 的问题
44+
- 修复了 lua5.5 命名 vararg 支持:不再报告语法错误
45+
346
## [0.9.35] - 2026-2-2
447

548
### ✨ 新增

build/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"emmyDebuggerVersion": "1.9.0",
33
"emmyDebuggerUrl": "https://github.com/EmmyLua/EmmyLuaDebugger/releases/download",
4-
"newLanguageServerVersion": "0.20.0",
4+
"newLanguageServerVersion": "0.22.0",
55
"newLanguageServerUrl": "https://github.com/CppCXY/emmylua-analyzer-rust/releases/download",
66
"newLanguageServerSchemaUrl": "https://raw.githubusercontent.com/EmmyLuaLs/emmylua-analyzer-rust/refs/tags/{{tag}}/crates/emmylua_code_analysis/resources/schema.json"
77
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "emmylua",
33
"displayName": "EmmyLua",
44
"description": "EmmyLua for vscode",
5-
"version": "0.9.35",
5+
"version": "0.9.36",
66
"icon": "res/icon.png",
77
"publisher": "tangzx",
88
"engines": {

syntaxes/schema.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,11 @@
388388
"type": "string",
389389
"const": "cast-type-mismatch"
390390
},
391+
{
392+
"description": "unresolved-require",
393+
"type": "string",
394+
"const": "unresolved-require"
395+
},
391396
{
392397
"description": "require-module-not-visible",
393398
"type": "string",
@@ -432,6 +437,11 @@
432437
"description": "invert-if",
433438
"type": "string",
434439
"const": "invert-if"
440+
},
441+
{
442+
"description": "Call to a non-callable value",
443+
"type": "string",
444+
"const": "call-non-callable"
435445
}
436446
]
437447
},

0 commit comments

Comments
 (0)