Skip to content

Commit a7bb90d

Browse files
committed
update
1 parent 773e221 commit a7bb90d

File tree

5 files changed

+283
-4
lines changed

5 files changed

+283
-4
lines changed

CHANGELOG.md

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

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

5+
## [0.9.27] - 2025-8-8
6+
7+
### 🐛 Fixed
8+
- **Fixed a stack overflow crash**: Resolved an issue that caused the language server to crash due to excessive recursion.
9+
- **Fixed a deadlock issue**: Resolved an issue that caused the language server to hang indefinitely in Neovim.
10+
- **Fixed workspace libraries**: Resolved an issue where libraries in subdirectories were incorrectly added to the main workspace.
11+
- **Fixed error reporting**: Resolved an issue where error reports were not being generated correctly for table fields.
12+
13+
### ✨ Added
14+
- **Support for Markdown/MarkdownRst**: Added support for Markdown and reStructuredText (RST) formats highlighted in documentation comments.
15+
This feature is disabled by default and can be enabled with the following configuration:
16+
```json
17+
{
18+
"semanticTokens": {
19+
"renderDocumentationMarkup": true
20+
},
21+
"doc": {
22+
"syntax": "md"
23+
}
24+
}
25+
```
26+
27+
- **Support for external formatting tools**: Added support for external formatting tools. You can now configure an external formatter to format your Lua code. This feature can be enabled with the following configuration:
28+
```json
29+
{
30+
"format": {
31+
"externalTool": {
32+
"program": "stylua",
33+
"args": [
34+
"-",
35+
"--stdin-filepath",
36+
"${file}",
37+
"--indent-width=${indent_size}",
38+
"--indent-type",
39+
"${use_tabs:Tabs:Spaces}"
40+
]
41+
}
42+
}
43+
}
44+
```
45+
Note: The built-in formatter is not stylua, but emmyluacodestyle. This feature simply provides an extension point, allowing users to use their preferred formatting tool. In terms of performance, using this extension may be faster than using other plugins.
46+
47+
- **Support for non-standard symbols**: Added support for non-standard symbols in Lua.
48+
49+
```json
50+
{
51+
"runtime": {
52+
"nonstandardSymbol": [
53+
"//",
54+
"/**/",
55+
"`",
56+
"+=",
57+
"-=",
58+
"*=",
59+
"/=",
60+
"%=",
61+
"^=",
62+
"//=",
63+
"|=",
64+
"&=",
65+
"<<=",
66+
">>=",
67+
"||",
68+
"&&",
69+
"!",
70+
"!=",
71+
"continue"
72+
]
73+
}
74+
}
75+
```
76+
77+
- **LuaRocks Integration Support**: Now supports integrating LuaRocks. When the plugin starts, it will check for the presence of LuaRocks-related configuration files. If it is a LuaRocks project, a tree view of LuaRocks packages will be generated in the lower left corner of the explorer. Features such as search, install, and uninstall are supported.
78+
This feature is entirely AI-generated; I have no particular preference for it. Contributions to improve it via PR are welcome.
79+
80+
- **Configuration File Localization Support**: Now supports providing localized translations (Chinese/English) in the configuration file.
81+
82+
- **Configuration Delegation to Plugin**: Some `.emmyrc` configurations can now also be managed through the VSCode plugin's configuration system.
83+
584
## [0.9.26] - 2025-7-27
685
### 🐛 Fixed
786
- **Fix create an empty directory**: Fixed an issue where the language server would create an empty directory.

CHANGELOG_CN.md

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

3+
## [0.9.27] - 2025-8-8
4+
5+
### 🐛 问题修复
6+
- **修复递归导致的崩溃**:解决了因递归过深导致语言服务器崩溃的问题。
7+
- **修复死锁问题**:解决了在 Neovim 下语言服务器可能无限挂起的问题。
8+
- **修复工作区库加载**:修复了子目录下的库被错误地加入主工作区的问题。
9+
- **修复错误报告**:修复了表字段错误报告未正确生成的问题。
10+
11+
### ✨ 新增功能
12+
- **支持 Markdown/MarkdownRst**:新增对文档注释中 Markdown 和 reStructuredText (RST) 格式高亮的支持。该功能默认关闭,可通过如下配置开启:
13+
```json
14+
{
15+
"semanticTokens": {
16+
"renderDocumentationMarkup": true
17+
},
18+
"doc": {
19+
"syntax": "md"
20+
}
21+
}
22+
```
23+
24+
- **支持外部格式化工具**:新增对外部格式化工具的支持。现在可以配置外部格式化器来格式化 Lua 代码。可通过如下配置启用:
25+
```json
26+
{
27+
"format": {
28+
"externalTool": {
29+
"program": "stylua",
30+
"args": [
31+
"-",
32+
"--stdin-filepath",
33+
"${file}",
34+
"--indent-width=${indent_size}",
35+
"--indent-type",
36+
"${use_tabs:Tabs:Spaces}"
37+
]
38+
}
39+
}
40+
}
41+
```
42+
注意:内置格式化器并非 stylua,而是 emmyluacodestyle。此功能仅作为扩展点,允许用户使用自己喜欢的格式化工具。性能上,使用此扩展点可能比其他插件更快。
43+
44+
- **支持非标准符号**:新增对 Lua 中非标准符号的支持。
45+
46+
```json
47+
{
48+
"runtime": {
49+
"nonstandardSymbol": [
50+
"//",
51+
"/**/",
52+
"`",
53+
"+=",
54+
"-=",
55+
"*=",
56+
"/=",
57+
"%=",
58+
"^=",
59+
"//=",
60+
"|=",
61+
"&=",
62+
"<<=",
63+
">>=",
64+
"||",
65+
"&&",
66+
"!",
67+
"!=",
68+
"continue"
69+
]
70+
}
71+
}
72+
```
73+
74+
- **支持集成LuaRocks**: 现在支持集成LuaRocks,插件启动时会检查当前是否包含luarocks相关配置文件, 如果是luarocks工程会在资源管理器左下角生成luarocks包的树状视图。支持提供搜索, 安装, 卸载等功能。
75+
该功能完全由AI生成, 我对此没有任何喜好, 欢迎提交PR改进.
76+
77+
- **配置文件支持本地语言翻译**: 现在支持在配置文件中为不同语言(中文/英文)提供本地化翻译。
78+
79+
- **配置下放到插件端**: 部分.emmyrc的配置现在也可以通过vscode插件的配置机制进行配置和管理.
80+
381
## [0.9.26] - 2025-7-27
482
### 🐛 问题修复
583
- **修复创建空目录问题**:修复了语言服务器会创建空目录的问题。

build/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
exports.default = {
22
emmyDebuggerVersion: '1.8.6',
33
emmyDebuggerUrl: 'https://github.com/EmmyLua/EmmyLuaDebugger/releases/download',
4-
newLanguageServerVersion: "0.10.0",
4+
newLanguageServerVersion: "0.11.0",
55
newLanguageServerUrl: "https://github.com/CppCXY/emmylua-analyzer-rust/releases/download"
66
}

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.26",
5+
"version": "0.9.27",
66
"icon": "res/icon.png",
77
"publisher": "tangzx",
88
"engines": {

syntaxes/schema.json

Lines changed: 124 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@
5050
"$ref": "#/$defs/EmmyrcDoc",
5151
"default": {
5252
"knownTags": [],
53-
"privateName": []
53+
"privateName": [],
54+
"syntax": "none"
5455
}
5556
},
5657
"documentColor": {
@@ -59,6 +60,13 @@
5960
"enable": true
6061
}
6162
},
63+
"format": {
64+
"$ref": "#/$defs/EmmyrcReformat",
65+
"default": {
66+
"externalTool": null,
67+
"useDiff": false
68+
}
69+
},
6270
"hint": {
6371
"$ref": "#/$defs/EmmyrcInlayHint",
6472
"default": {
@@ -107,6 +115,7 @@
107115
},
108116
"extensions": [],
109117
"frameworkVersions": [],
118+
"nonstandardSymbol": [],
110119
"requireLikeFunction": [],
111120
"requirePattern": [],
112121
"version": "LuaLatest"
@@ -115,7 +124,8 @@
115124
"semanticTokens": {
116125
"$ref": "#/$defs/EmmyrcSemanticToken",
117126
"default": {
118-
"enable": true
127+
"enable": true,
128+
"renderDocumentationMarkup": false
119129
}
120130
},
121131
"signature": {
@@ -434,6 +444,15 @@
434444
}
435445
]
436446
},
447+
"DocSyntax": {
448+
"type": "string",
449+
"enum": [
450+
"none",
451+
"md",
452+
"myst",
453+
"rst"
454+
]
455+
},
437456
"EmmyrcCodeAction": {
438457
"type": "object",
439458
"properties": {
@@ -603,6 +622,25 @@
603622
"items": {
604623
"type": "string"
605624
}
625+
},
626+
"rstDefaultRole": {
627+
"description": "When `syntax` is `Myst` or `Rst`, specifies default role used\nwith RST processor.",
628+
"type": [
629+
"string",
630+
"null"
631+
]
632+
},
633+
"rstPrimaryDomain": {
634+
"description": "When `syntax` is `Myst` or `Rst`, specifies primary domain used\nwith RST processor.",
635+
"type": [
636+
"string",
637+
"null"
638+
]
639+
},
640+
"syntax": {
641+
"description": "Syntax for highlighting documentation.",
642+
"$ref": "#/$defs/DocSyntax",
643+
"default": "none"
606644
}
607645
}
608646
},
@@ -617,6 +655,30 @@
617655
}
618656
}
619657
},
658+
"EmmyrcExternalTool": {
659+
"type": "object",
660+
"properties": {
661+
"args": {
662+
"description": "The arguments to pass to the external tool.",
663+
"type": "array",
664+
"default": [],
665+
"items": {
666+
"type": "string"
667+
}
668+
},
669+
"program": {
670+
"description": "The command to run the external tool.",
671+
"type": "string",
672+
"default": ""
673+
},
674+
"timeout": {
675+
"type": "integer",
676+
"format": "uint64",
677+
"default": 5000,
678+
"minimum": 0
679+
}
680+
}
681+
},
620682
"EmmyrcFilenameConvention": {
621683
"oneOf": [
622684
{
@@ -754,6 +816,30 @@
754816
}
755817
]
756818
},
819+
"EmmyrcNonStdSymbol": {
820+
"type": "string",
821+
"enum": [
822+
"//",
823+
"/**/",
824+
"`",
825+
"+=",
826+
"-=",
827+
"*=",
828+
"/=",
829+
"%=",
830+
"^=",
831+
"//=",
832+
"|=",
833+
"&=",
834+
"<<=",
835+
">>=",
836+
"||",
837+
"&&",
838+
"!",
839+
"!=",
840+
"continue"
841+
]
842+
},
757843
"EmmyrcReference": {
758844
"type": "object",
759845
"properties": {
@@ -777,6 +863,28 @@
777863
}
778864
}
779865
},
866+
"EmmyrcReformat": {
867+
"type": "object",
868+
"properties": {
869+
"externalTool": {
870+
"description": "Whether to enable internal code reformatting.",
871+
"anyOf": [
872+
{
873+
"$ref": "#/$defs/EmmyrcExternalTool"
874+
},
875+
{
876+
"type": "null"
877+
}
878+
],
879+
"default": null
880+
},
881+
"useDiff": {
882+
"description": "Whether to use the diff algorithm for formatting.",
883+
"type": "boolean",
884+
"default": false
885+
}
886+
}
887+
},
780888
"EmmyrcResource": {
781889
"type": "object",
782890
"properties": {
@@ -817,6 +925,14 @@
817925
"type": "string"
818926
}
819927
},
928+
"nonstandardSymbol": {
929+
"description": "Non-standard symbols.",
930+
"type": "array",
931+
"default": [],
932+
"items": {
933+
"$ref": "#/$defs/EmmyrcNonStdSymbol"
934+
}
935+
},
820936
"requireLikeFunction": {
821937
"description": "Functions that like require.",
822938
"type": "array",
@@ -848,6 +964,12 @@
848964
"type": "boolean",
849965
"default": true,
850966
"x-vscode-setting": true
967+
},
968+
"renderDocumentationMarkup": {
969+
"description": "Render Markdown/RST in documentation. Set `doc.syntax` for this option to have effect.",
970+
"type": "boolean",
971+
"default": false,
972+
"x-vscode-setting": true
851973
}
852974
}
853975
},

0 commit comments

Comments
 (0)