|
2 | 2 |
|
3 | 3 | [中文Log](CHANGELOG_CN.md) |
4 | 4 |
|
| 5 | +## [0.9.23] - 2025-6-27 |
| 6 | + |
| 7 | +### ✨ Added |
| 8 | +- **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. |
| 9 | + ```lua |
| 10 | + ---@class A |
| 11 | + --- Description below (applies to the @field a) |
| 12 | + ---@field a integer inline-description |
| 13 | + ---@field b integer # description after hash |
| 14 | + --- Description above (applies to the @field b) |
| 15 | + ---@field c integer inline-description |
| 16 | + local a = {} |
| 17 | + ``` |
| 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 | + |
| 64 | + |
| 65 | +### 🔧 Changed |
| 66 | +- **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. |
| 67 | + |
| 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 | + |
| 83 | +### 🐛 Fixed |
| 84 | +- **Enum Variable Parameter Issue**: Fixed a crash issue when checking enum variable as parameter |
| 85 | +- **Circle Doc Class Issue**: Fixed a bug that caused the language server to hang when |
| 86 | +- **Fix debugger crash**: Fixed a crash issue in the debugger |
| 87 | + |
5 | 88 | # 0.9.22 |
6 | 89 |
|
7 | 90 | `CHG` Generic constraint (StrTplRef) removes the protection for string: |
|
0 commit comments