Skip to content

Commit 08d0b84

Browse files
committed
update changelog
1 parent c7b0301 commit 08d0b84

File tree

1 file changed

+63
-2
lines changed

1 file changed

+63
-2
lines changed

CHANGELOG.md

Lines changed: 63 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
*All notable changes to the EmmyLua Analyzer Rust project will be documented in this file.*
44

55
---
6-
## [0.8.2] - Unreleased
7-
6+
## [0.8.2] - 2025-6-27
87
### ✨ Added
98
- **Support for Descriptions Above and After Tags**: You can now add descriptions both above a tag (as a preceding comment) and after a tag (inline). The description will be associated with the corresponding tag.
109
```lua
@@ -16,14 +15,76 @@
1615
---@field c integer inline-description
1716
local a = {}
1817
```
18+
- **Add call `__call` hint**: Add call `__call` hint, enable by `hint.metaCallHint`
19+
```lua
20+
---@class A
21+
---@overload fun(a: integer): integer
22+
local A
23+
A(1) -- There will be a lightning prompt between `A` and `(` or a `new` prompt before `A`
24+
```
25+
26+
- **Support syntax`--[[@cast -?]]`**: When `@cast` is followed by an operator instead of a name, it will convert the type of the previous expression, but currently only works for function calls!
27+
28+
- **Quick Fix for Nil Removal**: Added quick fix action for `NeedCheckNil` diagnostic that suggests using `@cast` to remove nil type
29+
```lua
30+
---@Class Cast1
31+
---@field get fun(self: self, a: number): Cast1?
32+
local A
33+
34+
local _a = A:get(1) --[[@cast -?]]:get(2):get(3) -- Quick fix will prompt whether to automatically add `--[[@cast -?]]`
35+
```
36+
- **Base Function Name Completion**: Added `completion.baseFunctionIncludesName` configuration to control whether function names are included in base function completions
37+
```json
38+
{
39+
"completion": {
40+
"baseFunctionIncludesName": true
41+
}
42+
}
43+
```
44+
When enabled, function completions will include the function name: `function name() end` instead of `function () end`
45+
46+
- **Cast Type Mismatch Diagnostic**: Added new diagnostic `CastTypeMismatch` to detect type mismatches in cast operations
47+
```lua
48+
---@type string
49+
local a = "hello"
50+
--[[@cast a int]] -- Warning
51+
```
52+
53+
- **Auto Require Naming Convention Configuration**: Added `completion.autoRequireNamingConvention.keep-class` configuration option. When importing modules, if the return value is a class definition, the class name will be used; otherwise, the file name will be used
54+
```json
55+
{
56+
"completion": {
57+
"autoRequireNamingConvention": "keep-class"
58+
}
59+
}
60+
```
61+
62+
- **File rename prompts whether to update `require` paths**: Added prompt when renaming files to ask whether to update corresponding import statements
63+
1964

2065
### 🔧 Changed
2166
- **Class Method Completion**: When a function call jumps, if there are multiple declarations, It will then attempt to return the most matching definition along with all actual code declarations, rather than returning all definitions.
2267

68+
- **Definition Jump Enhancement**: When jumping to definition from function calls, if the target is located in a return statement, the language server will now attempt to find the original definition. For example:
69+
```lua
70+
-- test.lua
71+
local function test()
72+
end
73+
return {
74+
test = test,
75+
}
76+
```
77+
```lua
78+
local t = require("test")
79+
local test = t.test -- Previously jumped to: test = test,
80+
test() -- Now jumps to: local function test()
81+
```
82+
2383
### 🐛 Fixed
2484
- **Enum Variable Parameter Issue**: Fixed a crash issue when checking enum variable as parameter
2585
- **Circle Doc Class Issue**: Fixed a bug that caused the language server to hang when
2686

87+
2788
## [0.8.1] - 2025-6-14
2889

2990
### 🔧 Changed

0 commit comments

Comments
 (0)