Skip to content

Commit 5b6dea4

Browse files
committed
update version
1 parent bbb70d6 commit 5b6dea4

File tree

9 files changed

+59
-15
lines changed

9 files changed

+59
-15
lines changed

CHANGELOG.md

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

33
*All notable changes to the EmmyLua Analyzer Rust project will be documented in this file.*
44

5+
## [0.18.0] - 2025-12-5
6+
7+
### Announcement
8+
一个实验性的由Rust实现的Lua 5.4解释器实现: https://github.com/CppCXY/lua-rs
9+
10+
### ✨ Added
11+
12+
- **Type narrowing with union types using field checks**: Changed the behavior when using a field of a union type in an `if` statement for type narrowing. Now, if the field exists in some types of the union but not in others, the types without that field will be excluded from the narrowed type. For example:
13+
```lua
14+
local a --- @type string|{foo:boolean, bar:string}
15+
16+
if a.foo then
17+
local _ = a.bar -- a will be narrowed to {foo:boolean, bar:string}
18+
end
19+
```
20+
- **Support generic in @field**: You can now use declaration generic type in `@field` annotations. For example:
21+
```lua
22+
---@class GetType
23+
---@field get_type fun<T>(name:`T`): T
24+
local MyClass = {}
25+
26+
local d = MyClass.get_type("Car") -- d: "Car"
27+
```
28+
29+
### 🔧 Changed
30+
31+
- **Refactor Document Symbols**: Refactored the `textDocument/documentSymbol` request to improve performance and accuracy. The new implementation provides better handling of nested symbols and improves the overall structure of the returned symbol tree.
32+
33+
34+
### 🐛 Fixed
35+
- **Fix Lazyvim.dev integration issue**: Fixed an issue where Lazyvim.dev integration did not work correctly due to ignore `workspace/didConfiguration` changes.
36+
- **Fix Completion**: Fixed an issue where certain completions were not being suggested, like:
37+
`Partial<Type>`
38+
- **Fix nil propagation in consecutive field access**: Fixed an issue where, during consecutive field access, if a previous field could be nil, subsequent fields would incorrectly propagate the nil type. For example:
39+
```lua
40+
local a --- @type { foo? : { bar: { baz: number } } }
41+
42+
local b = a.foo.bar -- a.foo may be nil (correct)
43+
44+
local _ = b.baz -- b is number
45+
```
46+
47+
48+
549
---
650
## [0.17.0] - 2025-11-7
751
### 🔧 Changed

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.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" }
10+
emmylua_code_analysis = { path = "crates/emmylua_code_analysis", version = "0.18.0" }
11+
emmylua_parser = { path = "crates/emmylua_parser", version = "0.20.0" }
12+
emmylua_parser_desc = { path = "crates/emmylua_parser_desc", version = "0.20.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.17.0"
3+
version = "0.18.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.17.0"
3+
version = "0.18.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.17.0"
3+
version = "0.18.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.17.0"
3+
version = "0.18.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.19.0"
3+
version = "0.20.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.19.0"
3+
version = "0.20.0"
44
edition = "2024"
55
authors = ["CppCXY", "taminomara"]
66
description = "A parser for markup within Lua comments"

0 commit comments

Comments
 (0)