Skip to content

Commit be529a1

Browse files
committed
update version
1 parent 4999d4a commit be529a1

File tree

9 files changed

+64
-39
lines changed

9 files changed

+64
-39
lines changed

CHANGELOG.md

Lines changed: 49 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,60 +4,85 @@
44

55
---
66
## [0.17.0] - Unreleased
7-
87
### 🔧 Changed
9-
- **Refactor IndexAliasName**: 删除原先的索引别名实现(`-- [IndexAliasName]`), 现在使用`---@[index_alias("name")]`
10-
- **Refactor ClassDefaultCall**: 删除配置项`runtime.class_default_call`, 转为使用`---@[constructor("<constructor_method_name>")]`
8+
- **Refactor IndexAliasName**: Removed the original index alias implementation (`-- [IndexAliasName]`), now use `---@[index_alias("name")]`.
9+
- **Refactor ClassDefaultCall**: Removed the configuration item `runtime.class_default_call`, now use `---@[constructor("<constructor_method_name>")]`.
10+
- **Rename ParamTypeNotMatch to ParamTypeMismatch**: Renamed the diagnostic `ParamTypeNotMatch` to `ParamTypeMismatch` for better clarity.
11+
- **Optimize comment parsing logic**: Comments now preserve leading spaces at the start of each line, maintaining the original formatting as much as possible when returned to the LSP client.
12+
1113

1214
### ✨ Added
13-
- **Attribute**: 实现了新的特性`---@attribute`,用于定义附加元数据,内置多个特性:
15+
- **Attribute**: Introduced the new feature `---@attribute` for defining additional metadata, with several built-in attributes:
1416
```lua
15-
16-
--- Deprecated. Receives an optional message parameter.
17+
--- Deprecated. Accepts an optional message parameter.
1718
---@attribute deprecated(message: string?)
1819

1920
--- Language Server Optimization Items.
2021
---
2122
--- Parameters:
22-
--- - `check_table_field`: Skip the assign check for table fields. It is recommended to use this option for all large configuration tables.
23-
--- - `delayed_definition`: Indicates that the type of the variable is determined by the first assignment.
24-
--- Only valid for `local` declarations with no initial value.
23+
--- - `check_table_field`: Skips assignment checks for table fields. Recommended for large configuration tables.
24+
--- - `delayed_definition`: Indicates the variable type is determined by the first assignment.
25+
--- Only valid for `local` declarations without an initial value.
2526
---@attribute lsp_optimization(code: "check_table_field"|"delayed_definition")
2627

27-
--- Index field alias, will be displayed in `hint` and `completion`.
28+
--- Index field alias, displayed in `hint` and `completion`.
2829
---
29-
--- Receives a string parameter for the alias name.
30+
--- Accepts a string parameter for the alias name.
3031
---@attribute index_alias(name: string)
3132

32-
--- This attribute must be applied to function parameters, and the function parameter's type must be a string template generic,
33-
--- used to specify the default constructor of a class.
33+
--- This attribute must be applied to function parameters, and the parameter type must be a string template generic.
34+
--- Used to specify the default constructor of a class.
3435
---
3536
--- Parameters:
36-
--- - `name`: The name of the method as a constructor.
37-
--- - `root_class`: Used to mark the root class, will implicitly inherit this class, such as `System.Object` in c#. Defaults to empty.
38-
--- - `strip_self`: Whether the `self` parameter can be omitted when calling the constructor, defaults to `true`
39-
--- - `return_self`: Whether the constructor is forced to return `self`, defaults to `true`
37+
--- - `name`: The method name as a constructor.
38+
--- - `root_class`: Marks the root class, will be implicitly inherited, e.g., `System.Object` in C#. Defaults to empty.
39+
--- - `strip_self`: Whether the `self` parameter can be omitted when calling the constructor, defaults to `true`.
40+
--- - `return_self`: Whether the constructor is forced to return `self`, defaults to `true`.
4041
---@attribute constructor(name: string, root_class: string?, strip_self: boolean?, return_self: boolean?)
4142

42-
--- Associates `getter` and `setter` methods with a field. Currently provides only definition navigation functionality,
43-
--- and the target methods must reside within the same class.
43+
--- Associates `getter` and `setter` methods with a field. Currently only provides definition navigation functionality.
44+
--- The target methods must be within the same class.
4445
---
4546
--- Parameters:
46-
--- - `convention`: Naming convention, defaults to `camelCase`. Implicitly adds `get` and `set` prefixes. eg: `_age` -> `getAge`, `setAge`.
47+
--- - `convention`: Naming convention, defaults to `camelCase`. Implicitly adds `get` and `set` prefixes. e.g., `_age` -> `getAge`, `setAge`.
4748
--- - `getter`: Getter method name. Takes precedence over `convention`.
4849
--- - `setter`: Setter method name. Takes precedence over `convention`.
4950
---@attribute field_accessor(convention: "camelCase"|"PascalCase"|"snake_case"|nil, getter: string?, setter: string?)
5051
```
5152

52-
使用语法为 `---@[attribute_name_1(arg...), attribute_name_2(arg...), ...]`, 可以同时使用多个特性, 示例:
53+
The syntax is `---@[attribute_name_1(arg...), attribute_name_2(arg...), ...]`, and multiple attributes can be used simultaneously. Example:
5354
```lua
5455
---@class A
55-
---@[deprecated] # 如果特性可以省略参数, 则可以省略`()`
56-
---@field b string # b 此时被标记为弃用
56+
---@[deprecated] # If the attribute can omit parameters, `()` can be omitted
57+
---@field b string # b is now marked as deprecated
5758
---@[index_alias("b")]
58-
---@field [1] string # 此时在提示和补全中会显示为 `b`
59+
---@field [1] string # This will be shown as `b` in hints and completion
60+
```
61+
- **More Generic Type**: support generic like:
62+
```lua
63+
--- Get the parameters of a function as a tuple
64+
---@alias Parameters<T extends function> T extends (fun(...: infer P): any) and P or never
65+
66+
--- Get the parameters of a constructor as a tuple
67+
---@alias ConstructorParameters<T> T extends new (fun(...: infer P): any) and P or never
68+
69+
--- Make all properties in T optional
70+
---@alias Partial<T> { [P in keyof T]?: T[P]; }
5971
```
6072

73+
- **Support gutter request for intellij**: Added support for gutter requests in IntelliJ, allowing for better integration with the IDE's features.
74+
75+
### 🐛 Fixed
76+
- **Fix completion**: Fixed an issue where certain completions were not being suggested, like:
77+
```lua
78+
if not self:<|>
79+
```
80+
- **Fix '~' Replace error in config**: Fixed an issue where using '~' in configuration paths did not correctly expand to the user's home directory.
81+
- **Fix enum completion issue**: Fixed an issue where enum members were not being suggested in completions.
82+
- **Fix workspace load status bar**: Fixed an issue where the workspace load status bar always display in empty lua workspace.
83+
- **Fix some condition narrow**: Fixed some issues with condition-based type narrowing not working as expected.
84+
85+
6186
## [0.16.0] - 2025-10-17
6287
### ✨ Added
6388
- **Support `workspace/diagnostic`**: Added support for the `workspace/diagnostic` request, allowing clients to fetch diagnostics for the entire workspace.

Cargo.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ members = [
77

88
[workspace.dependencies]
99
# local
10-
emmylua_code_analysis = { path = "crates/emmylua_code_analysis", version = "0.16.0" }
11-
emmylua_parser = { path = "crates/emmylua_parser", version = "0.18.0" }
12-
emmylua_parser_desc = { path = "crates/emmylua_parser_desc", version = "0.18.0" }
10+
emmylua_code_analysis = { path = "crates/emmylua_code_analysis", version = "0.17.0" }
11+
emmylua_parser = { path = "crates/emmylua_parser", version = "0.19.0" }
12+
emmylua_parser_desc = { path = "crates/emmylua_parser_desc", version = "0.19.0" }
1313
emmylua_diagnostic_macro = { path = "crates/emmylua_diagnostic_macro", version = "0.5.0" }
1414

1515
# external

crates/emmylua_check/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "emmylua_check"
3-
version = "0.16.0"
3+
version = "0.17.0"
44
edition = "2024"
55
authors = ["CppCXY"]
66
description = "A command-line tool for checking lua code."

crates/emmylua_code_analysis/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "emmylua_code_analysis"
3-
version = "0.16.0"
3+
version = "0.17.0"
44
edition = "2024"
55
authors = ["CppCXY"]
66
description = "A library for analyzing lua code."

crates/emmylua_doc_cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "emmylua_doc_cli"
3-
version = "0.16.0"
3+
version = "0.17.0"
44
edition = "2024"
55
authors = ["CppCXY"]
66
description = "A command-line tool for generating lua documentation."

crates/emmylua_ls/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "emmylua_ls"
3-
version = "0.16.0"
3+
version = "0.17.0"
44
edition = "2024"
55
authors = ["CppCXY"]
66
description = "A language server for emmylua."

crates/emmylua_parser/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "emmylua_parser"
3-
version = "0.18.0"
3+
version = "0.19.0"
44
edition = "2024"
55
authors = ["CppCXY"]
66
description = "A parser for EmmyLua and luals"

crates/emmylua_parser_desc/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "emmylua_parser_desc"
3-
version = "0.18.0"
3+
version = "0.19.0"
44
edition = "2024"
55
authors = ["CppCXY", "taminomara"]
66
description = "A parser for markup within Lua comments"

0 commit comments

Comments
 (0)