Skip to content

Commit 88db9dd

Browse files
committed
update version
1 parent cc38cf7 commit 88db9dd

7 files changed

Lines changed: 127 additions & 10 deletions

File tree

CHANGELOG.md

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

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

5+
## [0.9.40] - 2026-7-10
6+
7+
### ✨ Added
8+
9+
- **Support LuaJIT-Ext**: Added support for LuaJIT‑Ext syntax, including compound assignment operators, null‑safe navigation, the null‑coalescing operator, constant variables statement, the continue statement, the underscore number, and the short function syntax.
10+
11+
- **Support LuaJIT3**: Besides LuaJIT‑Ext syntax, named variadic arguments and integer division are also supported.
12+
13+
- **Support const generic parameters**: Added the `const T` syntax for generics, for example `---@generic const T`.
14+
15+
- **Emmylua_check severity filter**: Added the `--severity` option to filter diagnostic output by minimum severity.
16+
17+
- **Support debug mcp**: Added support for the `emmy.startMcpServer` command, start debug mcp server, and support `emmy.stopMcpServer` command to stop debug mcp server.
18+
19+
Usage:
20+
21+
Run `EmmyLua: Start MCP Server` in VSCode (via command palette)
22+
Configure OpenCode to connect:
23+
```json
24+
{
25+
"mcp": {
26+
"emmylua-mcp": {
27+
"type": "remote",
28+
"url": "http://127.0.0.1:8827/sse"
29+
}
30+
}
31+
}
32+
```
33+
MCP tools that inspect debug state (stack_trace, evaluate, variables, etc.) require an active emmylua_new debug session — they will return an error if none is running. Idempotent tools (list_breakpoints, list_supported_languages) work without a debug session.
34+
35+
36+
### ⚠️ Deprecated
37+
38+
- **std.ConstTpl**: Marked `std.ConstTpl` as deprecated. Use the new `const T` generic syntax instead.
39+
40+
### 🔧 Changed
41+
42+
- **Rename table field optimization**: `lsp_optimization("skip_table_fields_check")` is now the documented name for skipping table field diagnostics. The old `check_table_field` name remains supported as a compatibility alias.
43+
- **Refactor hover signature**: Refactored signature rendering in hover.
44+
45+
### 🗑️ Removed
46+
47+
- **`---@attribute` tag**: Removed the `---@attribute` tag. Attribute definitions now use C#-like class definitions:
48+
```lua
49+
---@class NewAttribute: Attribute
50+
---@overload fun(args)
51+
```
52+
53+
554
## [0.9.39] - 2026-6-3
655

756
- **Fixed formatting issues**: Fixed some issues that caused incorrect formatting results.

CHANGELOG_CN.md

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

3+
## [0.9.40] - 2026-7-10
4+
5+
### ✨ 新增
6+
7+
- **支持 LuaJIT‑Ext**:增加了对 LuaJIT‑Ext 语法特性的支持,包括复合赋值运算符、空安全导航、空值合并运算符、常量变量声明、`continue` 语句、下划线数字分隔符以及短函数语法。
8+
9+
- **支持 LuaJIT3**:除 LuaJIT‑Ext 语法外,还支持具名可变参数和整数除法。
10+
11+
- **支持 const 泛型参数**:增加了 `const T` 泛型语法,例如 `---@generic const T`
12+
13+
- **Emmylua_check 严重性过滤器**:增加了 `--severity` 选项,可按最低严重性过滤诊断输出。
14+
15+
- **支持调试 MCP**:增加了 `emmy.startMcpServer` 命令,用于启动调试 MCP 服务器;同时支持 `emmy.stopMcpServer` 命令停止调试 MCP 服务器。
16+
17+
用法:
18+
19+
在 VSCode 中(通过命令面板)运行 `EmmyLua: Start MCP Server`
20+
配置 OpenCode 进行连接:
21+
```json
22+
{
23+
"mcp": {
24+
"emmylua-mcp": {
25+
"type": "remote",
26+
"url": "http://127.0.0.1:8827/sse"
27+
}
28+
}
29+
}
30+
```
31+
用于检查调试状态的 MCP 工具(如 `stack_trace``evaluate``variables` 等)需要有一个活跃的 `emmylua_new` 调试会话 —— 如果没有正在运行的会话,这些工具将返回错误。幂等工具(如 `list_breakpoints``list_supported_languages`)无需调试会话即可工作。
32+
33+
### ⚠️ 弃用
34+
35+
- **std.ConstTpl**:标记 `std.ConstTpl` 为已弃用。请改用新的 `const T` 泛型语法。
36+
37+
### 🔧 变更
38+
39+
- **重命名字段检查优化**`lsp_optimization("skip_table_fields_check")` 现在是用于跳过表字段诊断的正式名称。旧名称 `check_table_field` 仍作为兼容别名保留。
40+
- **重构悬停签名**:重构了悬停提示中的签名渲染。
41+
42+
### 🗑️ 移除
43+
44+
- **`---@attribute` 标签**:移除了 `---@attribute` 标签。属性定义现在改用类似 C# 的类定义方式:
45+
```lua
46+
---@class NewAttribute: Attribute
47+
---@overload fun(args)
48+
```
49+
50+
351
## [0.9.39] - 2026-6-3
452

553
- **修复格式化问题**:修复了一些导致格式化结果不正确的问题

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.2",
33
"emmyDebuggerUrl": "https://github.com/EmmyLua/EmmyLuaDebugger/releases/download",
4-
"newLanguageServerVersion": "0.23.2",
4+
"newLanguageServerVersion": "0.24.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.39",
5+
"version": "0.9.40",
66
"icon": "res/icon.png",
77
"publisher": "tangzx",
88
"engines": {

syntaxes/schema.i18n.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@
231231
"zh-CN": "诊断严重性: 警告。"
232232
},
233233
"EmmyrcCodeAction.insertSpace": {
234-
"en": "Add space after `---` comments when inserting `@diagnostic disable-next-line`.",
234+
"en": "Add space after `---` comments when inserting `@diagnostic disable-next-line`.\n\nWhen omitted, this follows the formatter's resolved\n`emmy_doc.space_between_tag_columns` setting.",
235235
"zh-CN": "是否在 '---' 后插入空格。"
236236
},
237237
"EmmyrcCodeLens.enable": {

syntaxes/schema.json

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"codeAction": {
1313
"$ref": "#/$defs/EmmyrcCodeAction",
1414
"default": {
15-
"insertSpace": false
15+
"insertSpace": null
1616
}
1717
},
1818
"codeLens": {
@@ -491,9 +491,12 @@
491491
"type": "object",
492492
"properties": {
493493
"insertSpace": {
494-
"description": "Add space after `---` comments when inserting `@diagnostic disable-next-line`.",
495-
"type": "boolean",
496-
"default": false,
494+
"description": "Add space after `---` comments when inserting `@diagnostic disable-next-line`.\n\nWhen omitted, this follows the formatter's resolved\n`emmy_doc.space_between_tag_columns` setting.",
495+
"type": [
496+
"boolean",
497+
"null"
498+
],
499+
"default": null,
497500
"x-vscode-setting": true
498501
}
499502
}
@@ -825,6 +828,13 @@
825828
},
826829
"EmmyrcLuaVersion": {
827830
"oneOf": [
831+
{
832+
"type": "string",
833+
"enum": [
834+
"LuaJIT-Ext",
835+
"LuaJIT3"
836+
]
837+
},
828838
{
829839
"description": "Lua 5.1",
830840
"type": "string",

syntaxes/schema.zh-cn.json

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"codeAction": {
1313
"$ref": "#/$defs/EmmyrcCodeAction",
1414
"default": {
15-
"insertSpace": false
15+
"insertSpace": null
1616
}
1717
},
1818
"codeLens": {
@@ -492,8 +492,11 @@
492492
"properties": {
493493
"insertSpace": {
494494
"description": "是否在 '---' 后插入空格。",
495-
"type": "boolean",
496-
"default": false,
495+
"type": [
496+
"boolean",
497+
"null"
498+
],
499+
"default": null,
497500
"x-vscode-setting": true
498501
}
499502
}
@@ -825,6 +828,13 @@
825828
},
826829
"EmmyrcLuaVersion": {
827830
"oneOf": [
831+
{
832+
"type": "string",
833+
"enum": [
834+
"LuaJIT-Ext",
835+
"LuaJIT3"
836+
]
837+
},
828838
{
829839
"description": "Lua 5.1",
830840
"type": "string",

0 commit comments

Comments
 (0)