@codingame/monaco-editor-wrapper 15.0.0 → 16.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2302 +1,2302 @@
1
- # changelog
2
-
3
- ## Unreleased
4
- <!-- Add all new changes here. They will be moved under a version at release -->
5
-
6
- ## 3.14.0
7
- `2025-4-7`
8
- * `NEW` locale `es-419`, thanks [Felipe Lema](https://codeberg.org/FelipeLema)
9
- * `FIX` prevent unnecessary edits by LSP formatting when content did not change
10
- * `FIX` return no completions if completion is disabled
11
- * `FIX` optimized the performance of large literal tables (e.g., configuration tables)
12
-
13
- ## 3.13.9
14
- `2025-3-13`
15
- * `CHG` remove the limit for analyzing the literal table
16
-
17
- ## 3.13.8
18
- `2025-3-12`
19
- * `CHG` when analyzing the literal table, only the first 100 items are analyzed at most
20
- * `CHG` when checking type matching for union types, only the first 100 items are checked at most
21
- * `FIX` Update `--help` message.
22
- * `FIX` --check now respects ignoreDir setting
23
- * `FIX` incorrect argument skip pattern for `--check_out_path=`, which incorrectly skips the next argument
24
-
25
- ## 3.13.7
26
- `2025-3-10`
27
- * `NEW` CLI: added `--help`.
28
- * `CHG` default path for `--doc_out_path` is the current directory
29
- * `FIX` incorrect argument skip pattern for `--check_out_path=`, which incorrectly skips the next argument
30
- * `FIX` incorrect error message for `--doc_update`.
31
- * `FIX` reimplement section `luals.config` in file doc.json
32
- * `FIX` incorrect file names in file doc.json
33
- * `FIX` remove extra `./` path prefix in the check report when using `--check=.`
34
- * `FIX` Narrowing of types with literal fields: [#3056](https://github.com/LuaLS/lua-language-server/issues/3056), [#3089](https://github.com/LuaLS/lua-language-server/issues/3089)
35
- * `FIX` correct lua version of `math.ult` and `math.type`
36
- * `FIX` incorrect links for `pattern` in `string` methods
37
- * `FIX` fix type annotations for bit module
38
- * `FIX` Another regression related to type narrow and generic param introduced since `v3.10.1` [#3087](https://github.com/LuaLS/lua-language-server/issues/3087)
39
-
40
- ## 3.13.6
41
- `2025-2-6`
42
- * `NEW` `---@class` supports attribute `partial`, which will not check missing inherited fields [#3023](https://github.com/LuaLS/lua-language-server/issues/3023)
43
- ```lua
44
- ---@class Config
45
- ---@field a number
46
-
47
- ---@class (partial) Config.P: Config
48
- ---@field b number
49
-
50
- ---@type Config.P[]
51
- local cfgs = {}
52
- cfgs[1] = { b = 1 } -- no warning
53
- cfgs[2] = {} -- only warns missing `b`
54
- ```
55
- This enables the previous missing field check behavior before [#2970](https://github.com/LuaLS/lua-language-server/issues/2970)
56
- * `NEW` Added variable substitution support for vscode's `${workspaceFolder:x}` when resolving path placeholders [#2987](https://github.com/LuaLS/lua-language-server/issues/2987)
57
- * `NEW` Added `--check_format=json|pretty` for use with `--check` to output diagnostics in a human readable format.
58
- * `NEW` Test CLI: `--name=<testname>` `-n=<testname>`: run specify unit test
59
- * `CHG` Generic pattern now supports definition after capture and optional, union, array [#3014](https://github.com/LuaLS/lua-language-server/issues/3014) [#3031](https://github.com/LuaLS/lua-language-server/pull/3031)
60
- ```lua
61
- ---@generic T
62
- ---@param t `T`.Cat?
63
- ---@return T?
64
- local function f(t) end
65
-
66
- local t = f('Smile') --> t is `(Smile.Cat)?`
67
- ```
68
- * `FIX` Fixed the error that the configuration file pointed to by the `--configpath` option was not read and loaded.
69
- * `FIX` Don't truncate any output when running in `--doc` mode [#3049](https://github.com/LuaLS/lua-language-server/issues/3049)
70
- * `FIX` Generic return can be optional.
71
- * `FIX` Fixed the comment calculating in docs `---@param a string?Comment` - now its `Comment` instead of `omment` [#3028](https://github.com/LuaLS/lua-language-server/pull/3028)
72
- * `FIX` Fixed cannot bind variables using tail comment `@class` [#2673](https://github.com/LuaLS/lua-language-server/issues/2673)
73
- * `FIX` Fixed missing field completion for generic class object [#2196](https://github.com/LuaLS/lua-language-server/issues/2196) [#2945](https://github.com/LuaLS/lua-language-server/issues/2945) [#3041](https://github.com/LuaLS/lua-language-server/issues/3041)
74
-
75
- ## 3.13.5
76
- `2024-12-20`
77
- * `NEW` Setting: `Lua.hint.awaitPropagate`: When enabled, `--@async` propagates to the caller.
78
- * `CHG` Add server version information to `initialize` response [#2996](https://github.com/LuaLS/lua-language-server/pull/2996)
79
- * `CHG` If the `---@field` of the same name has a type of `fun`, the `duplicate-doc-field` check will not be performed.
80
- * `FIX` Incorrect infer for function array annotation on tables [#2367](https://github.com/LuaLS/lua-language-server/issues/2367)
81
-
82
- ## 3.13.4
83
- `2024-12-13`
84
- * `CHG` Can adjust the level of detail of Hover (VSCode)
85
-
86
- ## 3.13.3
87
- `2024-12-6`
88
- * `CHG` Update Love2d version
89
- * `CHG` Improve type infer of `table.unpack` and `unpack`
90
- * `FIX` `missing-fields` diagnostic now warns about missing inherited fields
91
- * `FIX` Incorrect `param-type-mismatch` diagnostic for optional fields
92
-
93
- ## 3.13.2
94
- `2024-11-21`
95
- * `CHG` fulfill zh-cn translations
96
- * `FIX` Add missing `errs ~= nil` checks to script/vm/type checkTableShape
97
-
98
- ## 3.13.1
99
- `2024-11-13`
100
- * `FIX` Incorrect type check in some case
101
-
102
- ## 3.13.0
103
- `2024-11-13`
104
- * `NEW` Setting: `Lua.type.inferTableSize`: A Small Table array can be infered
105
- * `NEW` Add custom repository support for addonManager. New configuration setting: `Lua.addonManager.repositoryBranch` and `Lua.addonManager.repositoryPath`
106
- * `NEW` Infer function parameter types when the function is used as an callback argument and that argument has a `fun()` annotation. Enable with `Lua.type.inferParamType` setting. [#2695](https://github.com/LuaLS/lua-language-server/pull/2695)
107
- ```lua
108
- ---@param callback fun(a: integer)
109
- function register(callback) end
110
-
111
- local function callback(a) end --> a: integer
112
- register(callback)
113
- ```
114
- * `CHG` Basic types allow contravariance
115
- ```lua
116
- ---@class int32: integer
117
-
118
- ---@type integer
119
- local n
120
-
121
- ---@type int32
122
- local a = n
123
- ```
124
- * `FIX` Improve type narrow with **literal alias type** during completion and signature help
125
-
126
- ## 3.12.0
127
- `2024-10-30`
128
- * `NEW` Support importing `enum` through class name suffix matching in quick fixes, allowing the import of `enum` from `table.table.enum; return table`.
129
- * `NEW` Support limited multiline annotations
130
- ```lua
131
- ---@type {
132
- --- x: number,
133
- --- y: number,
134
- --- z: number,
135
- ---}
136
- local point --> local point: { x: number, y: number, z: number }
137
- ```
138
- * `FIX` A regression related to type narrow and generic param introduced since `v3.10.1`
139
- * `FIX` Parse storagePath to improve reliability of resolving ${addons} placeholder
140
- * `FIX` Reference should also look in tablefield
141
- * `FIX` Determine that the index of `{...}` is an integer when iterating
142
-
143
- ## 3.11.1
144
- `2024-10-9`
145
- * `FIX` Fixed an issue preventing to set the locale to Japanese
146
- * `FIX` Preserve newlines between function comment and @see
147
- * `FIX` Accept storagePath option from client to resolve addon directory not found
148
-
149
- ## 3.11.0
150
- `2024-9-30`
151
- * `NEW` Added support for Japanese locale
152
- * `NEW` Infer function parameter types when overriding the same-named class function in an instance of that class [#2158](https://github.com/LuaLS/lua-language-server/issues/2158)
153
- * `NEW` Types with literal fields can be narrowed.
154
- * `NEW` Reference addons installed via the addon manager with `${addons}` [#2866](https://github.com/LuaLS/lua-language-server/pull/2866).
155
- * `NEW` Support using `---@class` on `rawset(_G, ...)` to annotate the created global variable [#2862](https://github.com/LuaLS/lua-language-server/issues/2862)
156
- * `NEW` Settings:
157
- + `Lua.language.fixIndent`
158
- + `Lua.language.completeAnnotation`
159
- * `FIX` Eliminate floating point error in test benchmark output
160
- * `FIX` Remove luamake install from make scripts
161
- * `FIX` Incorrect `table` type injected to the global variable created by `rawset(_G, ...)` [#2863](https://github.com/LuaLS/lua-language-server/issues/2863)
162
-
163
- ## 3.10.6
164
- `2024-9-10`
165
- * `NEW` Custom documentation exporter
166
- * `NEW` Setting: `Lua.docScriptPath`: Path to a script that overrides `cli.doc.export`, allowing user-specified documentation exporting.
167
- * `NEW` Infer the parameter types of a same-named function in the subclass based on the parameter types in the superclass function.
168
- * `FIX` Fix `VM.OnCompileFunctionParam` function in plugins
169
- * `FIX` Lua 5.1: fix incorrect warning when using setfenv with an int as first parameter
170
- * `FIX` Improve type narrow by checking exact match on literal type params
171
- * `FIX` Correctly list enums for function overload arguments [#2840](https://github.com/LuaLS/lua-language-server/pull/2840)
172
- * `FIX` Incorrect function params' type infer when there is only `@overload` [#2509](https://github.com/LuaLS/lua-language-server/issues/2509) [#2708](https://github.com/LuaLS/lua-language-server/issues/2708) [#2709](https://github.com/LuaLS/lua-language-server/issues/2709)
173
- * `FIX` Only call workspace/configuration when available [#981](https://github.com/LuaLS/lua-language-server/issues/981), [#2318](https://github.com/LuaLS/lua-language-server/issues/2318), [2336](https://github.com/LuaLS/lua-language-server/issues/2336) [#2843](https://github.com/LuaLS/lua-language-server/pull/2843)
174
-
175
- ## 3.10.5
176
- `2024-8-19`
177
- * `NEW` using `enum (partial)`, it suggests all fields with the same `enum` type rather than just the fields from the current table.
178
- * `NEW` When using `enum["<key>" or <index>]`, undefined fields will raise an 'undefined' error.
179
- * `FIX` Renaming files in the directory leads to the auto-correction in "require" adding extra characters.
180
- * `FIX` Performance issue
181
- * `FIX` Fix incorrect indent fixing for `for`
182
-
183
- ## 3.10.4
184
- `2024-8-16`
185
- * `NEW` Setting: `Lua.type.checkTableShape`: Add matching checks between the shape of tables and classes, during type checking. [#2768](https://github.com/LuaLS/lua-language-server/pull/2768)
186
- * `NEW` `undefined-field` supports `enum`
187
- * `CHG` Show enumed table as `enum X` instead of `table`
188
- * `FIX` Error `attempt to index a nil value` when `Lua.hint.semicolon == 'All'` [#2788](https://github.com/LuaLS/lua-language-server/issues/2788)
189
- * `FIX` Incorrect LuaCats parsing for `"'"`
190
- * `FIX` Incorrect indent fixings
191
-
192
- ## 3.10.3
193
- `2024-8-8`
194
- * `FIX` Memory leak with `---@enum(partical)`
195
-
196
- ## 3.10.2
197
- `2024-8-7`
198
- * `NEW` Add support for binary metamethod on right operand [#2777](https://github.com/LuaLS/lua-language-server/pull/2777)
199
- * `FIX` Incorrect indentation fixing in some case
200
-
201
- ## 3.10.1
202
- `2024-8-2`
203
- * `FIX` Runtime error
204
- * `FIX` Disable indentation fixing for Non-VSCode
205
-
206
- ## 3.10.0
207
- `2024-8-1`
208
- * `NEW` Add postfix snippet for `unpack`
209
- * `NEW` Add support for lambda style functions, `|paramList| expr` is syntactic sugar for `function(paramList) return expr end`
210
- * `NEW` Added lua regular expression support for `Lua.doc.<scope>Name` [#2753](https://github.com/LuaLS/lua-language-server/pull/2753)
211
- * `NEW` You can now click on "References" in CodeLen to display the reference list(VSCode)
212
- * `NEW` Improved behavior for inserting new lines:
213
- + When inside an annotation, an annotation tag will be added at the beginning of the line (VSCode).
214
- + When between `function () end` or similar constructs, the format will be adjusted to a more reasonable one (VSCode) and leading/trailing spaces will be removed (generic).
215
- + Attempts to semantically fix improper indentation (generic).
216
- * `CHG` Improve performance of multithreaded `--check` and `undefined-field` diagnostic
217
- * `CHG` Change spacing of parameter inlay hints to match other LSPs, like `rust-analyzer`
218
- * `FIX` `diagnostics.severity` defaulting to "Warning" when run using `--check` [#2730](https://github.com/LuaLS/lua-language-server/issues/2730)
219
- * `FIX` Respect `completion.showParams` config for local function completion
220
- * `FIX` Addons can now self-recommend as expected. Fixed by correcting the `wholeMatch` function
221
- * `FIX` Now correctly evaluates the visibility of fields in a class when they are defined directly in the object. use for completion and invisible dianostic. [#2752](https://github.com/LuaLS/lua-language-server/issues/2752)
222
- * `FIX` Bad triggering of the `inject-field` diagnostic, when the fields are declared at the creation of the object [#2746](https://github.com/LuaLS/lua-language-server/issues/2746)
223
- * `FIX` Inconsistent type narrow behavior of function call args [#2758](https://github.com/LuaLS/lua-language-server/issues/2758)
224
- * `FIX` Improve the `missing-fields` logic to be able to correctly handle classes defined several times [#22770](https://github.com/LuaLS/lua-language-server/pull/2770)
225
- * `FIX` Typos in annotation descriptions
226
- * `FIX` incorrect `CompletionItemKind` for postfix snippets [#2773](https://github.com/LuaLS/lua-language-server/pull/2773)
227
-
228
- ## 3.9.3
229
- `2024-6-11`
230
- * `FIX` Sometimes providing incorrect autocompletion when chaining calls
231
-
232
- ## 3.9.2
233
- `2024-6-6`
234
- * `NEW` Reference workspace symbols in comments using `[some text](lua://symbolName)` syntax
235
- * `FIX` Don't do diagnostics when the workspace is not ready
236
- * `FIX` Autocompletion for enum values ​​is not available in some cases
237
-
238
- ## 3.9.1
239
- `2024-5-14`
240
- * revert extension runtime
241
-
242
- ## 3.9.0
243
- `2024-5-11`
244
- * `NEW` goto implementation
245
- * `NEW` narrow the function prototype based on the parameter type
246
- ```lua
247
- ---@overload fun(a: boolean): A
248
- ---@overload fun(a: number): B
249
- local function f(...) end
250
-
251
- local r1 = f(true) --> r1 is `A`
252
- local r2 = f(10) --> r2 is `B`
253
- ```
254
-
255
- ## 3.8.3
256
- `2024-4-23`
257
- * `FIX` server may crash when the workspace is using a non-English path.
258
-
259
- ## 3.8.2
260
- `2024-4-23`
261
- * This is a fake version only for the new version of VSCode, with a core of 3.8.0.
262
-
263
- ## 3.8.1
264
- `2024-4-23`
265
- * This is a fake version only for the old version of VSCode, with a core of `3.7.4`. Starting from the next minor version, the version requirement for VSCode will be raised to prevent users still using the old version of VSCode from updating to the new version and experiencing compatibility issues.
266
-
267
- ## 3.8.0
268
- `2024-4-22`
269
- * `NEW` supports tuple type (@[lizho])
270
- ```lua
271
- ---@type [string, number, boolean]
272
- local t
273
-
274
- local x = t[1] --> x is `string`
275
- local y = t[2] --> y is `number`
276
- local z = t[3] --> z is `boolean`
277
- ```
278
- * `NEW` generic pattern (@[fesily])
279
- ```lua
280
- ---@generic T
281
- ---@param t Cat.`T`
282
- ---@return T
283
- local function f(t) end
284
-
285
- local t = f('Smile') --> t is `Cat.Smile`
286
- ```
287
- * `NEW` alias and enums supports attribute `partial`
288
- ```lua
289
- ---@alias Animal Cat
290
-
291
- ---@alias(partial) Animal Dog
292
-
293
- ---@type Animal
294
- local animal --> animal is `Cat|Dog` here
295
- ```
296
-
297
- ```lua
298
- ---@enum(key) ErrorCodes
299
- local codes1 = {
300
- OK = 0,
301
- ERROR = 1,
302
- FATAL = 2,
303
- }
304
-
305
- ---@enum(key, partial) ErrorCodes
306
- local codes2 = {
307
- WARN = 3,
308
- INFO = 4,
309
- }
310
-
311
- ---@type ErrorCodes
312
- local code
313
-
314
- code = 'ERROR' --> OK
315
- code = 'WARN' --> OK
316
-
317
- ```
318
- * `NEW` plugin: add `OnTransFormAst` interface (@[fesily])
319
- * `NEW` plugin: add `OnNodeCompileFunctionParam` interface (@[fesily])
320
- * `NEW` plugin: add `ResolveRequire` interface (@[Artem Dzhemesiuk])
321
- * `NEW` plugin: support multi plugins (@[fesily])
322
- + setting: `Lua.runtime.plugin` can be `string|string[]`
323
- + setting: `Lua.runtime.pluginArgs` can be `string[]|table<string, string>`
324
- * `NEW` CLI: `--doc` add option `--doc_out_path <PATH>` (@[Andreas Matthias])
325
- * `NEW` CLI: `--doc_update`, update an existing `doc.json` without using `--doc` again (@[Andreas Matthias])
326
- * `NEW` CLI: `--trust_all_plugins`, this is potentially unsafe for normal use and meant for usage in CI environments only (@[Paul Emmerich])
327
- * `CHG` CLI: `--check` will run plugins (@[Daniel Farrell])
328
- * `FIX` diagnostic: `discard-returns` not works in some blocks (@clay-golem)
329
- * `FIX` rename in library files
330
-
331
- ## 3.7.4
332
- `2024-1-5`
333
- * `FIX` rename to unicode with `Lua.runtime.unicodeName = true`
334
-
335
- ## 3.7.3
336
- `2023-11-14`
337
- * `FIX` can not infer arg type in some cases.
338
-
339
- ## 3.7.2
340
- `2023-11-9`
341
- * `FIX` [#2407]
342
-
343
- [#2407]: https://github.com/LuaLS/lua-language-server/issues/2407
344
-
345
- ## 3.7.1
346
- `2023-11-7`
347
- * `FIX` [#2299]
348
- * `FIX` [#2335]
349
-
350
- [#2299]: https://github.com/LuaLS/lua-language-server/issues/2299
351
- [#2335]: https://github.com/LuaLS/lua-language-server/issues/2335
352
-
353
- ## 3.7.0
354
- `2023-8-24`
355
- * `NEW` support `---@type` and `--[[@as]]` for return statement
356
- * `NEW` commandline parameter `--force-accept-workspace`: allowing the use of the root directory or home directory as the workspace
357
- * `NEW` diagnostic: `inject-field`
358
- * `NEW` `---@enum` supports attribute `key`
359
- ```lua
360
- ---@enum (key) AnimalType
361
- local enum = {
362
- Cat = 1,
363
- Dog = 2,
364
- }
365
-
366
- ---@param animal userdata
367
- ---@param atp AnimalType
368
- ---@return boolean
369
- local function isAnimalType(animal, atp)
370
- return API.isAnimalType(animal, enum[atp])
371
- end
372
-
373
- assert(isAnimalType(animal, 'Cat'))
374
- ```
375
- * `NEW` `---@class` supports attribute `exact`
376
- ```lua
377
- ---@class (exact) Point
378
- ---@field x number
379
- ---@field y number
380
- local m = {}
381
- m.x = 1 -- OK
382
- m.y = 2 -- OK
383
- m.z = 3 -- Warning
384
- ```
385
-
386
- * `FIX` wrong hover and signature for method with varargs and overloads
387
- * `FIX` [#2155]
388
- * `FIX` [#2224]
389
- * `FIX` [#2252]
390
- * `FIX` [#2267]
391
-
392
- [#2155]: https://github.com/LuaLS/lua-language-server/issues/2155
393
- [#2224]: https://github.com/LuaLS/lua-language-server/issues/2224
394
- [#2252]: https://github.com/LuaLS/lua-language-server/issues/2252
395
- [#2267]: https://github.com/LuaLS/lua-language-server/issues/2267
396
-
397
- ## 3.6.25
398
- `2023-7-26`
399
- * `FIX` [#2214]
400
-
401
- [#2214]: https://github.com/LuaLS/lua-language-server/issues/2214
402
-
403
- ## 3.6.24
404
- `2023-7-21`
405
- * `NEW` diagnostic: `missing-fields`
406
- * `FIX` shake of `codeLens`
407
- * `FIX` [#2145]
408
-
409
- [#2145]: https://github.com/LuaLS/lua-language-server/issues/2145
410
-
411
- ## 3.6.23
412
- `2023-7-7`
413
- * `CHG` signature: narrow by inputed literal
414
-
415
- ## 3.6.22
416
- `2023-6-14`
417
- * `FIX` [#2038]
418
- * `FIX` [#2042]
419
- * `FIX` [#2062]
420
- * `FIX` [#2083]
421
- * `FIX` [#2088]
422
- * `FIX` [#2110]
423
- * `FIX` [#2129]
424
-
425
- [#2038]: https://github.com/LuaLS/lua-language-server/issues/2038
426
- [#2042]: https://github.com/LuaLS/lua-language-server/issues/2042
427
- [#2062]: https://github.com/LuaLS/lua-language-server/issues/2062
428
- [#2083]: https://github.com/LuaLS/lua-language-server/issues/2083
429
- [#2088]: https://github.com/LuaLS/lua-language-server/issues/2088
430
- [#2110]: https://github.com/LuaLS/lua-language-server/issues/2110
431
- [#2129]: https://github.com/LuaLS/lua-language-server/issues/2129
432
-
433
- ## 3.6.21
434
- `2023-5-24`
435
- * `FIX` disable ffi plugin
436
-
437
- ## 3.6.20
438
- `2023-5-23`
439
- * `NEW` support connecting by socket with `--socket=PORT`
440
- * `FIX` [#2113]
441
-
442
- [#2113]: https://github.com/LuaLS/lua-language-server/issues/2113
443
-
444
- ## 3.6.19
445
- `2023-4-26`
446
- * `FIX` commandline parameter `checklevel` may not work
447
- * `FIX` [#2036]
448
- * `FIX` [#2037]
449
- * `FIX` [#2056]
450
- * `FIX` [#2077]
451
- * `FIX` [#2081]
452
-
453
- [#2036]: https://github.com/LuaLS/lua-language-server/issues/2036
454
- [#2037]: https://github.com/LuaLS/lua-language-server/issues/2037
455
- [#2056]: https://github.com/LuaLS/lua-language-server/issues/2056
456
- [#2077]: https://github.com/LuaLS/lua-language-server/issues/2077
457
- [#2081]: https://github.com/LuaLS/lua-language-server/issues/2081
458
-
459
- ## 3.6.18
460
- `2023-3-23`
461
- * `FIX` [#1943]
462
- * `FIX` [#1996]
463
- * `FIX` [#2004]
464
- * `FIX` [#2013]
465
-
466
- [#1943]: https://github.com/LuaLS/lua-language-server/issues/1943
467
- [#1996]: https://github.com/LuaLS/lua-language-server/issues/1996
468
- [#2004]: https://github.com/LuaLS/lua-language-server/issues/2004
469
- [#2013]: https://github.com/LuaLS/lua-language-server/issues/2013
470
-
471
- ## 3.6.17
472
- `2023-3-9`
473
- * `CHG` export documents: export global variables
474
- * `FIX` [#1715]
475
- * `FIX` [#1753]
476
- * `FIX` [#1914]
477
- * `FIX` [#1922]
478
- * `FIX` [#1924]
479
- * `FIX` [#1928]
480
- * `FIX` [#1945]
481
- * `FIX` [#1955]
482
- * `FIX` [#1978]
483
-
484
- [#1715]: https://github.com/LuaLS/lua-language-server/issues/1715
485
- [#1753]: https://github.com/LuaLS/lua-language-server/issues/1753
486
- [#1914]: https://github.com/LuaLS/lua-language-server/issues/1914
487
- [#1922]: https://github.com/LuaLS/lua-language-server/issues/1922
488
- [#1924]: https://github.com/LuaLS/lua-language-server/issues/1924
489
- [#1928]: https://github.com/LuaLS/lua-language-server/issues/1928
490
- [#1945]: https://github.com/LuaLS/lua-language-server/issues/1945
491
- [#1955]: https://github.com/LuaLS/lua-language-server/issues/1955
492
- [#1978]: https://github.com/LuaLS/lua-language-server/issues/1978
493
-
494
- ## 3.6.13
495
- `2023-3-2`
496
- * `FIX` setting: `Lua.addonManager.enable` should be `true` by default
497
- * `FIX` failed to publish to Windows
498
-
499
- ## 3.6.12
500
- `2023-3-2`
501
- * `NEW` [Addon Manager](https://github.com/LuaLS/lua-language-server/discussions/1607), try it with command `lua.addon_manager.open`. Thanks to [carsakiller](https://github.com/carsakiller)!
502
-
503
- ## 3.6.11
504
- `2023-2-13`
505
- * `CHG` completion: don't show loading process
506
- * `FIX` [#1886]
507
- * `FIX` [#1887]
508
- * `FIX` [#1889]
509
- * `FIX` [#1895]
510
- * `FIX` [#1902]
511
-
512
- [#1886]: https://github.com/LuaLS/lua-language-server/issues/1886
513
- [#1887]: https://github.com/LuaLS/lua-language-server/issues/1887
514
- [#1889]: https://github.com/LuaLS/lua-language-server/issues/1889
515
- [#1895]: https://github.com/LuaLS/lua-language-server/issues/1895
516
- [#1902]: https://github.com/LuaLS/lua-language-server/issues/1902
517
-
518
- ## 3.6.10
519
- `2023-2-7`
520
- * `FIX` [#1869]
521
- * `FIX` [#1872]
522
-
523
- [#1869]: https://github.com/LuaLS/lua-language-server/issues/1869
524
- [#1872]: https://github.com/LuaLS/lua-language-server/issues/1872
525
-
526
- ## 3.6.9
527
- `2023-2-2`
528
- * `FIX` [#1864]
529
- * `FIX` [#1868]
530
- * `FIX` [#1869]
531
- * `FIX` [#1871]
532
-
533
- [#1864]: https://github.com/LuaLS/lua-language-server/issues/1864
534
- [#1868]: https://github.com/LuaLS/lua-language-server/issues/1868
535
- [#1869]: https://github.com/LuaLS/lua-language-server/issues/1869
536
- [#1871]: https://github.com/LuaLS/lua-language-server/issues/1871
537
-
538
- ## 3.6.8
539
- `2023-1-31`
540
- * `NEW` command `lua.exportDocument` . VSCode will display this command in the right-click menu
541
- * `CHG` setting `Lua.workspace.supportScheme` has been removed. All schemes are supported if the language id is `lua`
542
- * `FIX` [#1831]
543
- * `FIX` [#1838]
544
- * `FIX` [#1841]
545
- * `FIX` [#1851]
546
- * `FIX` [#1855]
547
- * `FIX` [#1857]
548
-
549
- [#1831]: https://github.com/LuaLS/lua-language-server/issues/1831
550
- [#1838]: https://github.com/LuaLS/lua-language-server/issues/1838
551
- [#1841]: https://github.com/LuaLS/lua-language-server/issues/1841
552
- [#1851]: https://github.com/LuaLS/lua-language-server/issues/1851
553
- [#1855]: https://github.com/LuaLS/lua-language-server/issues/1855
554
- [#1857]: https://github.com/LuaLS/lua-language-server/issues/1857
555
-
556
- ## 3.6.7
557
- `2023-1-20`
558
- * `FIX` [#1810]
559
- * `FIX` [#1829]
560
-
561
- [#1810]: https://github.com/LuaLS/lua-language-server/issues/1810
562
- [#1829]: https://github.com/LuaLS/lua-language-server/issues/1829
563
-
564
- ## 3.6.6
565
- `2023-1-17`
566
- * `FIX` [#1825]
567
- * `FIX` [#1826]
568
-
569
- [#1825]: https://github.com/LuaLS/lua-language-server/issues/1825
570
- [#1826]: https://github.com/LuaLS/lua-language-server/issues/1826
571
-
572
- ## 3.6.5
573
- `2023-1-16`
574
- * `NEW` support casting global variables
575
- * `NEW` code lens: this feature is disabled by default.
576
- * `NEW` settings:
577
- * `Lua.codeLens.enable`: Enable code lens.
578
- * `CHG` improve memory usage for large libraries
579
- * `CHG` definition: supports finding definitions for `@class` and `@alias`, since they may be defined multi times
580
- * `CHG` rename: supports `@field`
581
- * `CHG` improve patch for `.luarc.json`
582
- * `CHG` `---@meta [name]`: once declared `name`, user can only require this file by declared name. meta file can not be required with name `_`
583
- * `CHG` remove telemetry
584
- * `FIX` [#831]
585
- * `FIX` [#1729]
586
- * `FIX` [#1737]
587
- * `FIX` [#1751]
588
- * `FIX` [#1767]
589
- * `FIX` [#1796]
590
- * `FIX` [#1805]
591
- * `FIX` [#1808]
592
- * `FIX` [#1811]
593
- * `FIX` [#1824]
594
-
595
- [#831]: https://github.com/LuaLS/lua-language-server/issues/831
596
- [#1729]: https://github.com/LuaLS/lua-language-server/issues/1729
597
- [#1737]: https://github.com/LuaLS/lua-language-server/issues/1737
598
- [#1751]: https://github.com/LuaLS/lua-language-server/issues/1751
599
- [#1767]: https://github.com/LuaLS/lua-language-server/issues/1767
600
- [#1796]: https://github.com/LuaLS/lua-language-server/issues/1796
601
- [#1805]: https://github.com/LuaLS/lua-language-server/issues/1805
602
- [#1808]: https://github.com/LuaLS/lua-language-server/issues/1808
603
- [#1811]: https://github.com/LuaLS/lua-language-server/issues/1811
604
- [#1824]: https://github.com/LuaLS/lua-language-server/issues/1824
605
-
606
- ## 3.6.4
607
- `2022-11-29`
608
- * `NEW` modify `require` after renaming files
609
- * `FIX` circulation reference in process analysis
610
- ```lua
611
- ---@type number
612
- local x
613
-
614
- ---@type number
615
- local y
616
-
617
- x = y
618
-
619
- y = x --> Can not infer `y` before
620
- ```
621
- * `FIX` [#1698]
622
- * `FIX` [#1704]
623
- * `FIX` [#1717]
624
-
625
- [#1698]: https://github.com/LuaLS/lua-language-server/issues/1698
626
- [#1704]: https://github.com/LuaLS/lua-language-server/issues/1704
627
- [#1717]: https://github.com/LuaLS/lua-language-server/issues/1717
628
-
629
- ## 3.6.3
630
- `2022-11-14`
631
- * `FIX` [#1684]
632
- * `FIX` [#1692]
633
-
634
- [#1684]: https://github.com/LuaLS/lua-language-server/issues/1684
635
- [#1692]: https://github.com/LuaLS/lua-language-server/issues/1692
636
-
637
- ## 3.6.2
638
- `2022-11-10`
639
- * `FIX` incorrect type check for generic with nil
640
- * `FIX` [#1676]
641
- * `FIX` [#1677]
642
- * `FIX` [#1679]
643
- * `FIX` [#1680]
644
-
645
- [#1676]: https://github.com/LuaLS/lua-language-server/issues/1676
646
- [#1677]: https://github.com/LuaLS/lua-language-server/issues/1677
647
- [#1679]: https://github.com/LuaLS/lua-language-server/issues/1679
648
- [#1680]: https://github.com/LuaLS/lua-language-server/issues/1680
649
-
650
- ## 3.6.1
651
- `2022-11-8`
652
- * `FIX` wrong diagnostics for `pcall` and `xpcall`
653
- * `FIX` duplicate fields in table hover
654
- * `FIX` description disapeared for overloaded function
655
- * `FIX` [#1675]
656
-
657
- [#1675]: https://github.com/LuaLS/lua-language-server/issues/1675
658
-
659
- ## 3.6.0
660
- `2022-11-8`
661
- * `NEW` supports `private`/`protected`/`public`/`package`
662
- * mark in `doc.field`
663
- ```lua
664
- ---@class unit
665
- ---@field private uuid integer
666
- ```
667
- * mark with `---@private`, `---@protected`, `---@public` and `---@package`
668
- ```lua
669
- ---@class unit
670
- local mt = {}
671
-
672
- ---@private
673
- function mt:init()
674
- end
675
-
676
- ---@protected
677
- function mt:update()
678
- end
679
- ```
680
- * mark by settings `Lua.doc.privateName`, `Lua.doc.protectedName` and `Lua.doc.packageName`
681
- ```lua
682
- ---@class unit
683
- ---@field _uuid integer --> treat as private when `Lua.doc.privateName` has `"_*"`
684
- ```
685
- * `NEW` settings:
686
- * `Lua.misc.executablePath`: [#1557] specify the executable path in VSCode
687
- * `Lua.diagnostics.workspaceEvent`: [#1626] set the time to trigger workspace diagnostics.
688
- * `Lua.doc.privateName`: treat matched fields as private
689
- * `Lua.doc.protectedName`: treat matched fields as protected
690
- * `Lua.doc.packageName`: treat matched fields as package
691
- * `NEW` CLI `--doc [path]` to make docs.
692
- server will generate `doc.json` and `doc.md` in `LOGPATH`.
693
- `doc.md` is generated by `doc.json` by example code `script/cli/doc2md.lua`.
694
- * `CHG` [#1558] detect multi libraries
695
- * `CHG` [#1458] `semantic-tokens`: global variable is setted to `variable.global`
696
- ```jsonc
697
- // color global variables to red
698
- "editor.semanticTokenColorCustomizations": {
699
- "rules": {
700
- "variable.global": "#ff0000"
701
- }
702
- }
703
- ```
704
- * `CHG` [#1177] re-support for symlinks, users need to maintain the correctness of symlinks themselves
705
- * `CHG` [#1561] infer definitions and types across chain expression
706
- ```lua
707
- ---@class myClass
708
- local myClass = {}
709
-
710
- myClass.a.b.c.e.f.g = 1
711
-
712
- ---@type myClass
713
- local class
714
-
715
- print(class.a.b.c.e.f.g) --> inferred as integer
716
- ```
717
- * `CHG` [#1582] the following diagnostics consider `overload`
718
- * `missing-return`
719
- * `missing-return-value`
720
- * `redundant-return-value`
721
- * `return-type-mismatch`
722
- * `CHG` workspace-symbol: supports chain fields based on global variables and types. try `io.open` or `iolib.open`
723
- * `CHG` [#1641] if a function only has varargs and has `---@overload`, the varargs will be ignored
724
- * `CHG` [#1575] search definitions by first argument of `setmetatable`
725
- ```lua
726
- ---@class Object
727
- local obj = setmetatable({
728
- initValue = 1,
729
- }, mt)
730
-
731
- print(obj.initValue) --> `obj.initValue` is integer
732
- ```
733
- * `CHG` [#1153] infer type by generic parameters or returns of function
734
- ```lua
735
- ---@generic T
736
- ---@param f fun(x: T)
737
- ---@return T[]
738
- local function x(f) end
739
-
740
- ---@type fun(x: integer)
741
- local cb
742
-
743
- local arr = x(cb) --> `arr` is inferred as `integer[]`
744
- ```
745
- * `CHG` [#1201] infer parameter type by expected returned function of parent function
746
- ```lua
747
- ---@return fun(x: integer)
748
- local function f()
749
- return function (x) --> `x` is inferred as `integer`
750
- end
751
- end
752
- ```
753
- * `CHG` [#1332] infer parameter type when function in table
754
- ```lua
755
- ---@class A
756
- ---@field f fun(x: string)
757
-
758
- ---@type A
759
- local t = {
760
- f = function (x) end --> `x` is inferred as `string`
761
- }
762
- ```
763
- * `CHG` find reference: respect `includeDeclaration` (although I don't know how to turn off this option in VSCode)
764
- * `CHG` [#1344] improve `---@see`
765
- * `CHG` [#1484] setting `runtime.special` supports fields
766
- ```jsonc
767
- {
768
- "runtime.special": {
769
- "sandbox.require": "require"
770
- }
771
- }
772
- ```
773
- * `CHG` [#1533] supports completion with table field of function
774
- * `CHG` [#1457] infer parameter type by function type
775
- ```lua
776
- ---@type fun(x: number)
777
- local function f(x) --> `x` is inferred as `number`
778
- end
779
- ```
780
- * `CHG` [#1663] check parameter types of generic extends
781
- ```lua
782
- ---@generic T: string | boolean
783
- ---@param x T
784
- ---@return T
785
- local function f(x)
786
- return x
787
- end
788
-
789
- local x = f(1) --> Warning: Cannot assign `integer` to parameter `<T:boolean|string>`.
790
- ```
791
- * `CHG` [#1434] type check: check the fields in table:
792
- ```lua
793
- ---@type table<string, string>
794
- local x
795
-
796
- ---@type table<string, number>
797
- local y
798
-
799
- x = y --> Warning: Cannot assign `<string, number>` to `<string, string>`
800
- ```
801
- * `CHG` [#1374] type check: supports array part in literal table
802
- ```lua
803
- ---@type boolean[]
804
- local t = { 1, 2, 3 } --> Warning: Cannot assign `integer` to `boolean`
805
- ```
806
- * `CHG` `---@enum` supports runtime values
807
- * `FIX` [#1479]
808
- * `FIX` [#1480]
809
- * `FIX` [#1567]
810
- * `FIX` [#1593]
811
- * `FIX` [#1595]
812
- * `FIX` [#1599]
813
- * `FIX` [#1606]
814
- * `FIX` [#1608]
815
- * `FIX` [#1637]
816
- * `FIX` [#1640]
817
- * `FIX` [#1642]
818
- * `FIX` [#1662]
819
- * `FIX` [#1672]
820
-
821
- [#1153]: https://github.com/LuaLS/lua-language-server/issues/1153
822
- [#1177]: https://github.com/LuaLS/lua-language-server/issues/1177
823
- [#1201]: https://github.com/LuaLS/lua-language-server/issues/1201
824
- [#1202]: https://github.com/LuaLS/lua-language-server/issues/1202
825
- [#1332]: https://github.com/LuaLS/lua-language-server/issues/1332
826
- [#1344]: https://github.com/LuaLS/lua-language-server/issues/1344
827
- [#1374]: https://github.com/LuaLS/lua-language-server/issues/1374
828
- [#1434]: https://github.com/LuaLS/lua-language-server/issues/1434
829
- [#1457]: https://github.com/LuaLS/lua-language-server/issues/1457
830
- [#1458]: https://github.com/LuaLS/lua-language-server/issues/1458
831
- [#1479]: https://github.com/LuaLS/lua-language-server/issues/1479
832
- [#1480]: https://github.com/LuaLS/lua-language-server/issues/1480
833
- [#1484]: https://github.com/LuaLS/lua-language-server/issues/1484
834
- [#1533]: https://github.com/LuaLS/lua-language-server/issues/1533
835
- [#1557]: https://github.com/LuaLS/lua-language-server/issues/1557
836
- [#1558]: https://github.com/LuaLS/lua-language-server/issues/1558
837
- [#1561]: https://github.com/LuaLS/lua-language-server/issues/1561
838
- [#1567]: https://github.com/LuaLS/lua-language-server/issues/1567
839
- [#1575]: https://github.com/LuaLS/lua-language-server/issues/1575
840
- [#1582]: https://github.com/LuaLS/lua-language-server/issues/1582
841
- [#1593]: https://github.com/LuaLS/lua-language-server/issues/1593
842
- [#1595]: https://github.com/LuaLS/lua-language-server/issues/1595
843
- [#1599]: https://github.com/LuaLS/lua-language-server/issues/1599
844
- [#1606]: https://github.com/LuaLS/lua-language-server/issues/1606
845
- [#1608]: https://github.com/LuaLS/lua-language-server/issues/1608
846
- [#1626]: https://github.com/LuaLS/lua-language-server/issues/1626
847
- [#1637]: https://github.com/LuaLS/lua-language-server/issues/1637
848
- [#1640]: https://github.com/LuaLS/lua-language-server/issues/1640
849
- [#1641]: https://github.com/LuaLS/lua-language-server/issues/1641
850
- [#1642]: https://github.com/LuaLS/lua-language-server/issues/1642
851
- [#1662]: https://github.com/LuaLS/lua-language-server/issues/1662
852
- [#1663]: https://github.com/LuaLS/lua-language-server/issues/1663
853
- [#1670]: https://github.com/LuaLS/lua-language-server/issues/1670
854
- [#1672]: https://github.com/LuaLS/lua-language-server/issues/1672
855
-
856
- ## 3.5.6
857
- `2022-9-16`
858
- * `FIX` [#1439](https://github.com/LuaLS/lua-language-server/issues/1439)
859
- * `FIX` [#1467](https://github.com/LuaLS/lua-language-server/issues/1467)
860
- * `FIX` [#1506](https://github.com/LuaLS/lua-language-server/issues/1506)
861
- * `FIX` [#1537](https://github.com/LuaLS/lua-language-server/issues/1537)
862
-
863
- ## 3.5.5
864
- `2022-9-7`
865
- * `FIX` [#1529](https://github.com/LuaLS/lua-language-server/issues/1529)
866
- * `FIX` [#1530](https://github.com/LuaLS/lua-language-server/issues/1530)
867
-
868
- ## 3.5.4
869
- `2022-9-6`
870
- * `NEW` `type-formatting`: fix wrong indentation of VSCode
871
- * `CHG` `document-symbol`: redesigned to better support for `Sticky Scroll` feature of VSCode
872
- * `FIX` `diagnostics.workspaceDelay` can not prevent first workspace diagnostic
873
- * `FIX` [#1476](https://github.com/LuaLS/lua-language-server/issues/1476)
874
- * `FIX` [#1490](https://github.com/LuaLS/lua-language-server/issues/1490)
875
- * `FIX` [#1493](https://github.com/LuaLS/lua-language-server/issues/1493)
876
- * `FIX` [#1499](https://github.com/LuaLS/lua-language-server/issues/1499)
877
- * `FIX` [#1526](https://github.com/LuaLS/lua-language-server/issues/1526)
878
-
879
- ## 3.5.3
880
- `2022-8-13`
881
- * `FIX` [#1409](https://github.com/LuaLS/lua-language-server/issues/1409)
882
- * `FIX` [#1422](https://github.com/LuaLS/lua-language-server/issues/1422)
883
- * `FIX` [#1425](https://github.com/LuaLS/lua-language-server/issues/1425)
884
- * `FIX` [#1428](https://github.com/LuaLS/lua-language-server/issues/1428)
885
- * `FIX` [#1430](https://github.com/LuaLS/lua-language-server/issues/1430)
886
- * `FIX` [#1431](https://github.com/LuaLS/lua-language-server/issues/1431)
887
- * `FIX` [#1446](https://github.com/LuaLS/lua-language-server/issues/1446)
888
- * `FIX` [#1451](https://github.com/LuaLS/lua-language-server/issues/1451)
889
- * `FIX` [#1461](https://github.com/LuaLS/lua-language-server/issues/1461)
890
- * `FIX` [#1463](https://github.com/LuaLS/lua-language-server/issues/1463)
891
-
892
- ## 3.5.2
893
- `2022-8-1`
894
- * `FIX` [#1395](https://github.com/LuaLS/lua-language-server/issues/1395)
895
- * `FIX` [#1403](https://github.com/LuaLS/lua-language-server/issues/1403)
896
- * `FIX` [#1405](https://github.com/LuaLS/lua-language-server/issues/1405)
897
- * `FIX` [#1406](https://github.com/LuaLS/lua-language-server/issues/1406)
898
- * `FIX` [#1418](https://github.com/LuaLS/lua-language-server/issues/1418)
899
-
900
- ## 3.5.1
901
- `2022-7-26`
902
- * `NEW` supports [color](https://github.com/LuaLS/lua-language-server/pull/1379)
903
- * `NEW` setting `Lua.runtime.pluginArgs`
904
- * `CHG` setting `type.castNumberToInteger` default by `true`
905
- * `CHG` improve supports for multi-workspace
906
- * `FIX` [#1354](https://github.com/LuaLS/lua-language-server/issues/1354)
907
- * `FIX` [#1355](https://github.com/LuaLS/lua-language-server/issues/1355)
908
- * `FIX` [#1363](https://github.com/LuaLS/lua-language-server/issues/1363)
909
- * `FIX` [#1365](https://github.com/LuaLS/lua-language-server/issues/1365)
910
- * `FIX` [#1367](https://github.com/LuaLS/lua-language-server/issues/1367)
911
- * `FIX` [#1368](https://github.com/LuaLS/lua-language-server/issues/1368)
912
- * `FIX` [#1370](https://github.com/LuaLS/lua-language-server/issues/1370)
913
- * `FIX` [#1375](https://github.com/LuaLS/lua-language-server/issues/1375)
914
- * `FIX` [#1391](https://github.com/LuaLS/lua-language-server/issues/1391)
915
-
916
- ## 3.5.0
917
- `2022-7-19`
918
- * `NEW` `LuaDoc`: `---@operator`:
919
- ```lua
920
- ---@class fspath
921
- ---@operator div(string|fspath): fspath
922
-
923
- ---@type fspath
924
- local root
925
-
926
- local fileName = root / 'script' / 'main.lua' -- `fileName` is `fspath` here
927
- ```
928
- * `NEW` `LuaDoc`: `---@source`:
929
- ```lua
930
- -- Also supports absolute path or relative path (based on current file path)
931
- ---@source file:///xxx.c:50:20
932
- XXX = 1 -- when finding definitions of `XXX`, returns `file:///xxx.c:50:20` instead here.
933
- ```
934
- * `NEW` `LuaDoc`: `---@enum`:
935
- ```lua
936
- ---@enum animal
937
- Animal = {
938
- Cat = 1,
939
- Dog = 2,
940
- }
941
-
942
- ---@param x animal
943
- local function f(x) end
944
-
945
- f() -- suggests `Animal.Cat`, `Animal.Dog`, `1`, `2` as the first parameter
946
- ```
947
- * `NEW` diagnostics:
948
- * `unknown-operator`
949
- * `unreachable-code`
950
- * `NEW` settings:
951
- * `diagnostics.unusedLocalExclude`
952
- * `NEW` VSCode: add support for [EmmyLuaUnity](https://marketplace.visualstudio.com/items?itemName=CppCXY.emmylua-unity)
953
- * `CHG` support multi-type:
954
- ```lua
955
- ---@type number, _, boolean
956
- local a, b, c -- `a` is `number`, `b` is `unknown`, `c` is `boolean`
957
- ```
958
- * `CHG` treat `_ENV = XXX` as `local _ENV = XXX`
959
- * `_ENV = nil`: disable all globals
960
- * `_ENV = {}`: allow all globals
961
- * `_ENV = {} ---@type mathlib`: only allow globals in `mathlib`
962
- * `CHG` hover: dose not show unknown `---@XXX` as description
963
- * `CHG` contravariance is allowed at the class declaration
964
- ```lua
965
- ---@class BaseClass
966
- local BaseClass
967
-
968
- ---@class MyClass: BaseClass
969
- local MyClass = BaseClass -- OK!
970
- ```
971
- * `CHG` hover: supports path in link
972
- ```lua
973
- --![](https://github.com/LuaLS/lua-language-server/raw/HEAD/image.png) --> will convert to `--![](file:///xxxx/image.png)`
974
- local x
975
- ```
976
- * `CHG` signature: only show signatures matching the entered parameters
977
- * `FIX` [#880](https://github.com/LuaLS/lua-language-server/issues/880)
978
- * `FIX` [#1284](https://github.com/LuaLS/lua-language-server/issues/1284)
979
- * `FIX` [#1292](https://github.com/LuaLS/lua-language-server/issues/1292)
980
- * `FIX` [#1294](https://github.com/LuaLS/lua-language-server/issues/1294)
981
- * `FIX` [#1306](https://github.com/LuaLS/lua-language-server/issues/1306)
982
- * `FIX` [#1311](https://github.com/LuaLS/lua-language-server/issues/1311)
983
- * `FIX` [#1317](https://github.com/LuaLS/lua-language-server/issues/1317)
984
- * `FIX` [#1320](https://github.com/LuaLS/lua-language-server/issues/1320)
985
- * `FIX` [#1330](https://github.com/LuaLS/lua-language-server/issues/1330)
986
- * `FIX` [#1345](https://github.com/LuaLS/lua-language-server/issues/1345)
987
- * `FIX` [#1346](https://github.com/LuaLS/lua-language-server/issues/1346)
988
- * `FIX` [#1348](https://github.com/LuaLS/lua-language-server/issues/1348)
989
-
990
- ## 3.4.2
991
- `2022-7-6`
992
- * `CHG` diagnostic: `type-check` ignores `nil` in `getfield`
993
- * `CHG` diagnostic: `---@diagnostic disable: <ERR_NAME>` can suppress syntax errors
994
- * `CHG` completion: `completion.callSnippet` no longer generate parameter types
995
- * `CHG` hover: show `---@type {x: number, y: number}` as detail instead of `table`
996
- * `CHG` dose not infer as `nil` by `t.field = nil`
997
- * `FIX` [#1278](https://github.com/LuaLS/lua-language-server/issues/1278)
998
- * `FIX` [#1288](https://github.com/LuaLS/lua-language-server/issues/1288)
999
-
1000
- ## 3.4.1
1001
- `2022-7-5`
1002
- * `NEW` settings:
1003
- * `type.weakNilCheck`
1004
- * `CHG` allow type contravariance for `setmetatable` when initializing a class
1005
- ```lua
1006
- ---@class A
1007
- local a = {}
1008
-
1009
- ---@class B: A
1010
- local b = setmetatable({}, { __index = a }) -- OK!
1011
- ```
1012
- * `FIX` [#1256](https://github.com/LuaLS/lua-language-server/issues/1256)
1013
- * `FIX` [#1257](https://github.com/LuaLS/lua-language-server/issues/1257)
1014
- * `FIX` [#1267](https://github.com/LuaLS/lua-language-server/issues/1267)
1015
- * `FIX` [#1269](https://github.com/LuaLS/lua-language-server/issues/1269)
1016
- * `FIX` [#1273](https://github.com/LuaLS/lua-language-server/issues/1273)
1017
- * `FIX` [#1275](https://github.com/LuaLS/lua-language-server/issues/1275)
1018
- * `FIX` [#1279](https://github.com/LuaLS/lua-language-server/issues/1279)
1019
-
1020
- ## 3.4.0
1021
- `2022-6-29`
1022
- * `NEW` diagnostics:
1023
- * `cast-local-type`
1024
- * `assign-type-mismatch`
1025
- * `param-type-mismatch`
1026
- * `unknown-cast-variable`
1027
- * `cast-type-mismatch`
1028
- * `missing-return-value`
1029
- * `redundant-return-value`
1030
- * `missing-return`
1031
- * `return-type-mismatch`
1032
- * `NEW` settings:
1033
- * `diagnostics.groupSeverity`
1034
- * `diagnostics.groupFileStatus`
1035
- * `type.castNumberToInteger`
1036
- * `type.weakUnionCheck`
1037
- * `hint.semicolon`
1038
- * `CHG` infer `nil` as redundant return value
1039
- ```lua
1040
- local function f() end
1041
- local x = f() -- `x` is `nil` instead of `unknown`
1042
- ```
1043
- * `CHG` infer called function by params num
1044
- ```lua
1045
- ---@overload fun(x: number, y: number):string
1046
- ---@overload fun(x: number):number
1047
- ---@return boolean
1048
- local function f() end
1049
-
1050
- local n1 = f() -- `n1` is `boolean`
1051
- local n2 = f(0) -- `n2` is `number`
1052
- local n3 = f(0, 0) -- `n3` is `string`
1053
- ```
1054
- * `CHG` semicolons and parentheses can be used in `DocTable`
1055
- ```lua
1056
- ---@type { (x: number); (y: boolean) }
1057
- ```
1058
- * `CHG` return names and parentheses can be used in `DocFunction`
1059
- ```lua
1060
- ---@type fun():(x: number, y: number, ...: number)
1061
- ```
1062
- * `CHG` supports `---@return boolean ...`
1063
- * `CHG` improve experience for diagnostics and semantic-tokens
1064
- * `FIX` diagnostics flash when opening a file
1065
- * `FIX` sometimes workspace diagnostics are not triggered
1066
- * `FIX` [#1228](https://github.com/LuaLS/lua-language-server/issues/1228)
1067
- * `FIX` [#1229](https://github.com/LuaLS/lua-language-server/issues/1229)
1068
- * `FIX` [#1242](https://github.com/LuaLS/lua-language-server/issues/1242)
1069
- * `FIX` [#1243](https://github.com/LuaLS/lua-language-server/issues/1243)
1070
- * `FIX` [#1249](https://github.com/LuaLS/lua-language-server/issues/1249)
1071
-
1072
- ## 3.3.1
1073
- `2022-6-17`
1074
- * `FIX` [#1213](https://github.com/LuaLS/lua-language-server/issues/1213)
1075
- * `FIX` [#1215](https://github.com/LuaLS/lua-language-server/issues/1215)
1076
- * `FIX` [#1217](https://github.com/LuaLS/lua-language-server/issues/1217)
1077
- * `FIX` [#1218](https://github.com/LuaLS/lua-language-server/issues/1218)
1078
- * `FIX` [#1220](https://github.com/LuaLS/lua-language-server/issues/1220)
1079
- * `FIX` [#1223](https://github.com/LuaLS/lua-language-server/issues/1223)
1080
-
1081
- ## 3.3.0
1082
- `2022-6-15`
1083
- * `NEW` `LuaDoc` supports `` `CODE` ``
1084
- ```lua
1085
- ---@type `CONST.X` | `CONST.Y`
1086
- local x
1087
-
1088
- if x == -- suggest `CONST.X` and `CONST.Y` here
1089
- ```
1090
- * `CHG` infer type by `error`
1091
- ```lua
1092
- ---@type integer|nil
1093
- local n
1094
-
1095
- if not n then
1096
- error('n is nil')
1097
- end
1098
-
1099
- print(n) -- `n` is `integer` here
1100
- ```
1101
- * `CHG` infer type by `t and t.x`
1102
- ```lua
1103
- ---@type table|nil
1104
- local t
1105
-
1106
- local s = t and t.x or 1 -- `t` in `t.x` is `table`
1107
- ```
1108
- * `CHG` infer type by `type(x)`
1109
- ```lua
1110
- local x
1111
-
1112
- if type(x) == 'string' then
1113
- print(x) -- `x` is `string` here
1114
- end
1115
-
1116
- local tp = type(x)
1117
-
1118
- if tp == 'boolean' then
1119
- print(x) -- `x` is `boolean` here
1120
- end
1121
- ```
1122
- * `CHG` infer type by `>`/`<`/`>=`/`<=`
1123
- * `FIX` with clients that support LSP 3.17 (VSCode), workspace diagnostics are triggered every time when opening a file.
1124
- * `FIX` [#1204](https://github.com/LuaLS/lua-language-server/issues/1204)
1125
- * `FIX` [#1208](https://github.com/LuaLS/lua-language-server/issues/1208)
1126
-
1127
- ## 3.2.5
1128
- `2022-6-9`
1129
- * `NEW` provide config docs in `LUA_LANGUAGE_SERVER/doc/`
1130
- * `FIX` [#1148](https://github.com/LuaLS/lua-language-server/issues/1148)
1131
- * `FIX` [#1149](https://github.com/LuaLS/lua-language-server/issues/1149)
1132
- * `FIX` [#1192](https://github.com/LuaLS/lua-language-server/issues/1192)
1133
-
1134
- ## 3.2.4
1135
- `2022-5-25`
1136
- * `NEW` settings:
1137
- + `workspace.supportScheme`: `["file", "untitled", "git"]`
1138
- + `diagnostics.disableScheme`: `["git"]`
1139
- * `NEW` folding: support folding `---@alias`
1140
- * `CHG` if `rootUri` or `workspaceFolder` is set to `ROOT` or `HOME`, this extension will refuse to load these directories and show an error message.
1141
- * `CHG` show warning message when scanning more than 100,000 files.
1142
- * `CHG` upgrade [LSP](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/) to `3.17`
1143
- * `FIX` hover: can not union `table` with other basic types
1144
- * `FIX` [#1125](https://github.com/LuaLS/lua-language-server/issues/1125)
1145
- * `FIX` [#1131](https://github.com/LuaLS/lua-language-server/issues/1131)
1146
- * `FIX` [#1134](https://github.com/LuaLS/lua-language-server/issues/1134)
1147
- * `FIX` [#1141](https://github.com/LuaLS/lua-language-server/issues/1141)
1148
- * `FIX` [#1144](https://github.com/LuaLS/lua-language-server/issues/1144)
1149
- * `FIX` [#1150](https://github.com/LuaLS/lua-language-server/issues/1150)
1150
- * `FIX` [#1155](https://github.com/LuaLS/lua-language-server/issues/1155)
1151
-
1152
- ## 3.2.3
1153
- `2022-5-16`
1154
- * `CHG` parse `.luarc.json` as jsonc. In order to please the editor, it also supports `.luarc.jsonc` as the file name.
1155
- * `CHG` dose not load files in symbol links
1156
- * `FIX` memory leak with symbol links
1157
- * `FIX` diagnostic: send empty results to every file after startup
1158
- * `FIX` [#1103](https://github.com/LuaLS/lua-language-server/issues/1103)
1159
- * `FIX` [#1107](https://github.com/LuaLS/lua-language-server/issues/1107)
1160
-
1161
- ## 3.2.2
1162
- `2022-4-26`
1163
- * `FIX` diagnostic: `unused-function` cannot handle recursion correctly
1164
- * `FIX` [#1092](https://github.com/LuaLS/lua-language-server/issues/1092)
1165
- * `FIX` [#1093](https://github.com/LuaLS/lua-language-server/issues/1093)
1166
- * `FIX` runtime errors reported by telemetry, see [#1091](https://github.com/LuaLS/lua-language-server/issues/1091)
1167
-
1168
- ## 3.2.1
1169
- `2022-4-25`
1170
- * `FIX` broken in VSCode
1171
-
1172
- ## 3.2.0
1173
- `2022-4-25`
1174
- * `NEW` supports infer of callback parameter
1175
- ```lua
1176
- ---@type string[]
1177
- local t
1178
-
1179
- table.sort(t, function (a, b)
1180
- -- `a` and `b` is `string` here
1181
- end)
1182
- ```
1183
- * `NEW` using `---@overload` as class constructor
1184
- ```lua
1185
- ---@class Class
1186
- ---@overload fun():Class
1187
- local mt
1188
-
1189
- local x = mt() --> x is `Class` here
1190
- ```
1191
- * `NEW` add `--[[@as type]]`
1192
- ```lua
1193
- local x = true
1194
- local y = x--[[@as integer]] -- y is `integer` here
1195
- ```
1196
- * `NEW` add `---@cast`
1197
- * `---@cast localname type`
1198
- * `---@cast localname +type`
1199
- * `---@cast localname -type`
1200
- * `---@cast localname +?`
1201
- * `---@cast localname -?`
1202
- * `NEW` generic: resolve `T[]` by `table<integer, type>` or `---@field [integer] type`
1203
- * `NEW` resolve `class[1]` by `---@field [integer] type`
1204
- * `NEW` diagnostic: `missing-parameter`
1205
- * `NEW` diagnostic: `need-check-nil`
1206
- * `CHG` diagnostic: no longer mark `redundant-parameter` as `Unnecessary`
1207
- * `FIX` diagnostic: `unused-function` does not recognize recursion
1208
- * `FIX` [#1051](https://github.com/LuaLS/lua-language-server/issues/1051)
1209
- * `FIX` [#1072](https://github.com/LuaLS/lua-language-server/issues/1072)
1210
- * `FIX` [#1077](https://github.com/LuaLS/lua-language-server/issues/1077)
1211
- * `FIX` [#1088](https://github.com/LuaLS/lua-language-server/issues/1088)
1212
- * `FIX` runtime errors
1213
-
1214
- ## 3.1.0
1215
- `2022-4-17`
1216
- * `NEW` support find definition in method
1217
- * `CHG` hint: move to LSP. Its font is now controlled by the client.
1218
- * `CHG` hover: split `local` into `local` / `parameter` / `upvalue` / `self`.
1219
- * `CHG` hover: added parentheses to some words, such as `global` / `field` / `class`.
1220
- * `FIX` definition of `table<k, v>`
1221
- * `FIX` [#994](https://github.com/LuaLS/lua-language-server/issues/994)
1222
- * `FIX` [#1057](https://github.com/LuaLS/lua-language-server/issues/1057)
1223
- * `FIX` runtime errors reported by telemetry, see [#1058](https://github.com/LuaLS/lua-language-server/issues/1058)
1224
-
1225
- ## 3.0.2
1226
- `2022-4-15`
1227
- * `FIX` `table<string, boolean>[string] -> boolean`
1228
- * `FIX` goto `type definition`
1229
- * `FIX` [#1050](https://github.com/LuaLS/lua-language-server/issues/1050)
1230
-
1231
- ## 3.0.1
1232
- `2022-4-11`
1233
- * `FIX` [#1033](https://github.com/LuaLS/lua-language-server/issues/1033)
1234
- * `FIX` [#1034](https://github.com/LuaLS/lua-language-server/issues/1034)
1235
- * `FIX` [#1035](https://github.com/LuaLS/lua-language-server/issues/1035)
1236
- * `FIX` [#1036](https://github.com/LuaLS/lua-language-server/issues/1036)
1237
- * `FIX` runtime errors reported by telemetry, see [#1037](https://github.com/LuaLS/lua-language-server/issues/1037)
1238
-
1239
- ## 3.0.0
1240
- `2022-4-10`
1241
- * `CHG` [break changes](https://github.com/LuaLS/lua-language-server/issues/980)
1242
- * `CHG` diagnostic:
1243
- + `type-check`: removed for now
1244
- + `no-implicit-any`: renamed to `no-unknown`
1245
- * `CHG` formatter: no longer need` --preview`
1246
- * `CHG` `LuaDoc`: supports `---@type (string|integer)[]`
1247
- * `FIX` semantic: color of `function`
1248
- * `FIX` [#1027](https://github.com/LuaLS/lua-language-server/issues/1027)
1249
- * `FIX` [#1028](https://github.com/LuaLS/lua-language-server/issues/1028)
1250
-
1251
- ## 2.6.8
1252
- `2022-4-9`
1253
- * `CHG` completion: call snippet shown as `Function` instead of `Snippet` when `Lua.completion.callSnippet` is `Replace`
1254
- * `FIX` [#976](https://github.com/LuaLS/lua-language-server/issues/976)
1255
- * `FIX` [#995](https://github.com/LuaLS/lua-language-server/issues/995)
1256
- * `FIX` [#1004](https://github.com/LuaLS/lua-language-server/issues/1004)
1257
- * `FIX` [#1008](https://github.com/LuaLS/lua-language-server/issues/1008)
1258
- * `FIX` [#1009](https://github.com/LuaLS/lua-language-server/issues/1009)
1259
- * `FIX` [#1011](https://github.com/LuaLS/lua-language-server/issues/1011)
1260
- * `FIX` [#1014](https://github.com/LuaLS/lua-language-server/issues/1014)
1261
- * `FIX` [#1016](https://github.com/LuaLS/lua-language-server/issues/1016)
1262
- * `FIX` [#1017](https://github.com/LuaLS/lua-language-server/issues/1017)
1263
- * `FIX` runtime errors reported by telemetry
1264
-
1265
- ## 2.6.7
1266
- `2022-3-9`
1267
- * `NEW` diagnosis report, [read more](https://luals.github.io/wiki/diagnosis-report/)
1268
- * `CHG` `VSCode`: 1.65 has built in new `Lua` syntax files, so this extension no longer provides syntax files, which means you can install other syntax extensions in the marketplace. If you have any suggestions or issues, please [open issues here](https://github.com/LuaLS/lua.tmbundle).
1269
- * `CHG` telemetry: the prompt will only appear in VSCode to avoid repeated prompts in other platforms due to the inability to automatically modify the settings.
1270
- * `FIX` [#965](https://github.com/LuaLS/lua-language-server/issues/965)
1271
- * `FIX` [#975](https://github.com/LuaLS/lua-language-server/issues/975)
1272
-
1273
- ## 2.6.6
1274
- `2022-2-21`
1275
- * `NEW` formatter preview, use `--preview` to enable this feature, [read more](https://github.com/LuaLS/lua-language-server/issues/960)
1276
- * `FIX` [#958](https://github.com/LuaLS/lua-language-server/issues/958)
1277
- * `FIX` runtime errors
1278
-
1279
- ## 2.6.5
1280
- `2022-2-17`
1281
- * `FIX` telemetry is not disabled by default (since 2.6.0)
1282
- * `FIX` [#934](https://github.com/LuaLS/lua-language-server/issues/934)
1283
- * `FIX` [#952](https://github.com/LuaLS/lua-language-server/issues/952)
1284
-
1285
- ## 2.6.4
1286
- `2022-2-9`
1287
- * `CHG` completion: reduced sorting priority for postfix completion
1288
- * `FIX` [#936](https://github.com/LuaLS/lua-language-server/issues/936)
1289
- * `FIX` [#937](https://github.com/LuaLS/lua-language-server/issues/937)
1290
- * `FIX` [#940](https://github.com/LuaLS/lua-language-server/issues/940)
1291
- * `FIX` [#941](https://github.com/LuaLS/lua-language-server/issues/941)
1292
- * `FIX` [#941](https://github.com/LuaLS/lua-language-server/issues/942)
1293
- * `FIX` [#943](https://github.com/LuaLS/lua-language-server/issues/943)
1294
- * `FIX` [#946](https://github.com/LuaLS/lua-language-server/issues/946)
1295
-
1296
- ## 2.6.3
1297
- `2022-1-25`
1298
- * `FIX` new files are not loaded correctly
1299
- * `FIX` [#923](https://github.com/LuaLS/lua-language-server/issues/923)
1300
- * `FIX` [#926](https://github.com/LuaLS/lua-language-server/issues/926)
1301
-
1302
- ## 2.6.2
1303
- `2022-1-25`
1304
- * `FIX` [#925](https://github.com/LuaLS/lua-language-server/issues/925)
1305
-
1306
- ## 2.6.1
1307
- `2022-1-24`
1308
- * `CHG` default values of settings:
1309
- + `Lua.diagnostics.workspaceDelay`: `0` sec -> `3` sec
1310
- + `Lua.workspace.maxPreload`: `1000` -> `5000`
1311
- + `Lua.workspace.preloadFileSize`: `100` KB -> `500` KB
1312
- * `CHG` improve performance
1313
- * `FIX` modify luarc failed
1314
- * `FIX` library files not recognized correctly
1315
- * `FIX` [#903](https://github.com/LuaLS/lua-language-server/issues/903)
1316
- * `FIX` [#906](https://github.com/LuaLS/lua-language-server/issues/906)
1317
- * `FIX` [#920](https://github.com/LuaLS/lua-language-server/issues/920)
1318
-
1319
- ## 2.6.0
1320
- `2022-1-13`
1321
- * `NEW` supports multi-workspace in server side, for developers of language clients, please [read here](https://luals.github.io/wiki/developing/#multiple-workspace-support) to learn more.
1322
- * `NEW` setting:
1323
- + `Lua.hint.arrayIndex`
1324
- + `Lua.semantic.enable`
1325
- + `Lua.semantic.variable`
1326
- + `Lua.semantic.annotation`
1327
- + `Lua.semantic.keyword`
1328
- * `CHG` completion: improve response speed
1329
- * `CHG` completion: can be triggered in `LuaDoc` and strings
1330
- * `CHG` diagnostic: smoother
1331
- * `CHG` settings `Lua.color.mode` removed
1332
- * `FIX` [#876](https://github.com/LuaLS/lua-language-server/issues/876)
1333
- * `FIX` [#879](https://github.com/LuaLS/lua-language-server/issues/879)
1334
- * `FIX` [#884](https://github.com/LuaLS/lua-language-server/issues/884)
1335
- * `FIX` [#885](https://github.com/LuaLS/lua-language-server/issues/885)
1336
- * `FIX` [#886](https://github.com/LuaLS/lua-language-server/issues/886)
1337
- * `FIX` [#902](https://github.com/LuaLS/lua-language-server/issues/902)
1338
-
1339
- ## 2.5.6
1340
- `2021-12-27`
1341
- * `CHG` diagnostic: now syntax errors in `LuaDoc` are shown as `Warning`
1342
- * `FIX` [#863](https://github.com/LuaLS/lua-language-server/issues/863)
1343
- * `FIX` return type of `math.floor`
1344
- * `FIX` runtime errors
1345
-
1346
- ## 2.5.5
1347
- `2021-12-16`
1348
- * `FIX` dose not work in VSCode
1349
-
1350
- ## 2.5.4
1351
- `2021-12-16`
1352
- * `FIX` [#847](https://github.com/LuaLS/lua-language-server/issues/847)
1353
- * `FIX` [#848](https://github.com/LuaLS/lua-language-server/issues/848)
1354
- * `FIX` completion: incorrect cache
1355
- * `FIX` hover: always view string
1356
-
1357
- ## 2.5.3
1358
- `2021-12-6`
1359
- * `FIX` [#842](https://github.com/LuaLS/lua-language-server/issues/844)
1360
- * `FIX` [#844](https://github.com/LuaLS/lua-language-server/issues/844)
1361
-
1362
- ## 2.5.2
1363
- `2021-12-2`
1364
- * `FIX` [#815](https://github.com/LuaLS/lua-language-server/issues/815)
1365
- * `FIX` [#825](https://github.com/LuaLS/lua-language-server/issues/825)
1366
- * `FIX` [#826](https://github.com/LuaLS/lua-language-server/issues/826)
1367
- * `FIX` [#827](https://github.com/LuaLS/lua-language-server/issues/827)
1368
- * `FIX` [#831](https://github.com/LuaLS/lua-language-server/issues/831)
1369
- * `FIX` [#837](https://github.com/LuaLS/lua-language-server/issues/837)
1370
- * `FIX` [#838](https://github.com/LuaLS/lua-language-server/issues/838)
1371
- * `FIX` postfix
1372
- * `FIX` runtime errors
1373
-
1374
- ## 2.5.1
1375
- `2021-11-29`
1376
- * `FIX` incorrect syntax error
1377
-
1378
- ## 2.5.0
1379
- `2021-11-29`
1380
- * `NEW` settings:
1381
- + `Lua.runtime.pathStrict`: not check subdirectories when using `runtime.path`
1382
- + `Lua.hint.await`: display `await` when calling a function marked as async
1383
- + `Lua.completion.postfix`: the symbol that triggers postfix, default is `@`
1384
- * `NEW` add supports for `lovr`
1385
- * `NEW` file encoding supports `utf16le` and `utf16be`
1386
- * `NEW` full IntelliSense supports for literal tables, see [#720](https://github.com/LuaLS/lua-language-server/issues/720) and [#727](https://github.com/LuaLS/lua-language-server/issues/727)
1387
- * `NEW` `LuaDoc` annotations:
1388
- + `---@async`: mark a function as async
1389
- + `---@nodiscard`: the return value of the marking function cannot be discarded
1390
- * `NEW` diagnostics:
1391
- + `await-in-sync`: check whether calls async function in sync function. disabled by default.
1392
- + `not-yieldable`: check whether the function supports async functions as parameters. disabled by default.
1393
- + `discard-returns`: check whether the return value is discarded.
1394
- * `NEW` locale `pt-br`, thanks [Jeferson Ferreira](https://github.com/jefersonf)
1395
- * `NEW` supports [utf-8-offsets](https://clangd.llvm.org/extensions#utf-8-offsets)
1396
- * `NEW` supports quickfix for `.luarc.json`
1397
- * `NEW` completion postifx: `@function`, `@method`, `@pcall`, `@xpcall`, `@insert`, `@remove`, `@concat`, `++`, `++?`
1398
- * `CHG` `LuaDoc`:
1399
- + `---@class` can be re-declared
1400
- + supports unicode
1401
- + supports `---@param ... number`, equivalent to `---@vararg number`
1402
- + supports `fun(...: string)`
1403
- + supports `fun(x, y, ...)`, equivalent to `fun(x: any, y: any, ...: any)`
1404
- * `CHG` settings from `--configpath`, `.luarc.json`, `client` no longer prevent subsequent settings, instead they are merged in order
1405
- * `CHG` no longer asks to trust plugin in VSCode, because VSCode already provides the workspace trust feature
1406
- * `CHG` skip huge files (>= 10 MB)
1407
- * `CHG` after using `Lua.runtime.nonstandardSymbol` to treat `//` as a comment, `//` is no longer parsed as an operator
1408
-
1409
- ## 2.4.11
1410
- `2021-11-25`
1411
- * `FIX` [#816](https://github.com/LuaLS/lua-language-server/issues/816)
1412
- * `FIX` [#817](https://github.com/LuaLS/lua-language-server/issues/817)
1413
- * `FIX` [#818](https://github.com/LuaLS/lua-language-server/issues/818)
1414
- * `FIX` [#820](https://github.com/LuaLS/lua-language-server/issues/820)
1415
-
1416
- ## 2.4.10
1417
- `2021-11-23`
1418
- * `FIX` [#790](https://github.com/LuaLS/lua-language-server/issues/790)
1419
- * `FIX` [#798](https://github.com/LuaLS/lua-language-server/issues/798)
1420
- * `FIX` [#804](https://github.com/LuaLS/lua-language-server/issues/804)
1421
- * `FIX` [#805](https://github.com/LuaLS/lua-language-server/issues/805)
1422
- * `FIX` [#806](https://github.com/LuaLS/lua-language-server/issues/806)
1423
- * `FIX` [#807](https://github.com/LuaLS/lua-language-server/issues/807)
1424
- * `FIX` [#809](https://github.com/LuaLS/lua-language-server/issues/809)
1425
-
1426
- ## 2.4.9
1427
- `2021-11-18`
1428
- * `CHG` for performance reasons, some of the features that are not cost-effective in IntelliSense have been disabled by default, and you can re-enable them through the following settings:
1429
- + `Lua.IntelliSense.traceLocalSet`
1430
- + `Lua.IntelliSense.traceReturn`
1431
- + `Lua.IntelliSense.traceBeSetted`
1432
- + `Lua.IntelliSense.traceFieldInject`
1433
-
1434
- [read more](https://github.com/LuaLS/lua-language-server/wiki/IntelliSense-optional-features)
1435
-
1436
- ## 2.4.8
1437
- `2021-11-15`
1438
- * `FIX` incorrect IntelliSense in specific situations
1439
- * `FIX` [#777](https://github.com/LuaLS/lua-language-server/issues/777)
1440
- * `FIX` [#778](https://github.com/LuaLS/lua-language-server/issues/778)
1441
- * `FIX` [#779](https://github.com/LuaLS/lua-language-server/issues/779)
1442
- * `FIX` [#780](https://github.com/LuaLS/lua-language-server/issues/780)
1443
-
1444
- ## 2.4.7
1445
- `2021-10-27`
1446
- * `FIX` [#762](https://github.com/LuaLS/lua-language-server/issues/762)
1447
-
1448
- ## 2.4.6
1449
- `2021-10-26`
1450
- * `NEW` diagnostic: `redundant-return`
1451
- * `FIX` [#744](https://github.com/LuaLS/lua-language-server/issues/744)
1452
- * `FIX` [#748](https://github.com/LuaLS/lua-language-server/issues/748)
1453
- * `FIX` [#749](https://github.com/LuaLS/lua-language-server/issues/749)
1454
- * `FIX` [#752](https://github.com/LuaLS/lua-language-server/issues/752)
1455
- * `FIX` [#753](https://github.com/LuaLS/lua-language-server/issues/753)
1456
- * `FIX` [#756](https://github.com/LuaLS/lua-language-server/issues/756)
1457
- * `FIX` [#758](https://github.com/LuaLS/lua-language-server/issues/758)
1458
- * `FIX` [#760](https://github.com/LuaLS/lua-language-server/issues/760)
1459
-
1460
- ## 2.4.5
1461
- `2021-10-18`
1462
- * `FIX` accidentally load lua files from user workspace
1463
-
1464
- ## 2.4.4
1465
- `2021-10-15`
1466
- * `CHG` improve `.luarc.json`
1467
- * `FIX` [#722](https://github.com/LuaLS/lua-language-server/issues/722)
1468
-
1469
- ## 2.4.3
1470
- `2021-10-13`
1471
- * `FIX` [#713](https://github.com/LuaLS/lua-language-server/issues/713)
1472
- * `FIX` [#718](https://github.com/LuaLS/lua-language-server/issues/718)
1473
- * `FIX` [#719](https://github.com/LuaLS/lua-language-server/issues/719)
1474
- * `FIX` [#725](https://github.com/LuaLS/lua-language-server/issues/725)
1475
- * `FIX` [#729](https://github.com/LuaLS/lua-language-server/issues/729)
1476
- * `FIX` [#730](https://github.com/LuaLS/lua-language-server/issues/730)
1477
- * `FIX` runtime errors
1478
-
1479
- ## 2.4.2
1480
- `2021-10-8`
1481
- * `FIX` [#702](https://github.com/LuaLS/lua-language-server/issues/702)
1482
- * `FIX` [#706](https://github.com/LuaLS/lua-language-server/issues/706)
1483
- * `FIX` [#707](https://github.com/LuaLS/lua-language-server/issues/707)
1484
- * `FIX` [#709](https://github.com/LuaLS/lua-language-server/issues/709)
1485
- * `FIX` [#712](https://github.com/LuaLS/lua-language-server/issues/712)
1486
-
1487
- ## 2.4.1
1488
- `2021-10-2`
1489
- * `FIX` broken with single file
1490
- * `FIX` [#698](https://github.com/LuaLS/lua-language-server/issues/698)
1491
- * `FIX` [#699](https://github.com/LuaLS/lua-language-server/issues/699)
1492
-
1493
- ## 2.4.0
1494
- `2021-10-1`
1495
- * `NEW` loading settings from `.luarc.json`
1496
- * `NEW` settings:
1497
- + `Lua.diagnostics.libraryFiles`
1498
- + `Lua.diagnostics.ignoredFiles`
1499
- + `Lua.completion.showWord`
1500
- + `Lua.completion.requireSeparator`
1501
- * `NEW` diagnostics:
1502
- + `different-requires`
1503
- * `NEW` `---@CustomClass<string, number>`
1504
- * `NEW` supports `$/cancelRequest`
1505
- * `NEW` `EventEmitter`
1506
- ```lua
1507
- --- @class Emit
1508
- --- @field on fun(eventName: string, cb: function)
1509
- --- @field on fun(eventName: '"died"', cb: fun(i: integer))
1510
- --- @field on fun(eventName: '"won"', cb: fun(s: string))
1511
- local emit = {}
1512
-
1513
- emit:on(--[[support autocomplete fr "died" and "won"]])
1514
-
1515
- emit:on("died", function (i)
1516
- -- should be i: integer
1517
- end)
1518
-
1519
- emit:on('won', function (s)
1520
- -- should be s: string
1521
- end)
1522
- ```
1523
- * `NEW` `---@module 'moduleName'`
1524
- ```lua
1525
- ---@module 'mylib'
1526
- local lib -- the same as `local lib = require 'mylib'`
1527
- ```
1528
- * `NEW` add supports of `skynet`
1529
- * `CHG` hover: improve showing multi defines
1530
- * `CHG` hover: improve showing multi comments at enums
1531
- * `CHG` hover: shows method
1532
- * `CHG` hint: `Lua.hint.paramName` now supports `Disable`, `Literal` and `All`
1533
- * `CHG` only search first file by `require`
1534
- * `CHG` no longer infer by usage
1535
- * `CHG` no longer ignore file names case in Windows
1536
- * `CHG` watching library changes
1537
- * `CHG` completion: improve misspelling results
1538
- * `CHG` completion: `Lua.completion.displayContext` default to `0`
1539
- * `CHG` completion: `autoRequire` has better inserting position
1540
- * `CHG` diagnostics:
1541
- + `redundant-parameter` default severity to `Warning`
1542
- + `redundant-value` default severity to `Warning`
1543
- * `CHG` infer: more strict of calculation results
1544
- * `CHG` [#663](https://github.com/LuaLS/lua-language-server/issues/663)
1545
- * `FIX` runtime errors
1546
- * `FIX` hint: may show param-2 as `self`
1547
- * `FIX` semantic: may fail when scrolling
1548
- * `FIX` [#647](https://github.com/LuaLS/lua-language-server/issues/647)
1549
- * `FIX` [#660](https://github.com/LuaLS/lua-language-server/issues/660)
1550
- * `FIX` [#673](https://github.com/LuaLS/lua-language-server/issues/673)
1551
-
1552
- ## 2.3.7
1553
- `2021-8-17`
1554
- * `CHG` improve performance
1555
- * `FIX` [#244](https://github.com/LuaLS/lua-language-server/issues/244)
1556
-
1557
- ## 2.3.6
1558
- `2021-8-9`
1559
- * `FIX` completion: can not find global fields
1560
- * `FIX` globals and class may lost
1561
-
1562
- ## 2.3.5
1563
- `2021-8-9`
1564
- * `CHG` improve memory usage
1565
- * `CHG` completion: call snip triggers signature (VSCode only)
1566
- * `FIX` completion: may not find results
1567
-
1568
- ## 2.3.4
1569
- `2021-8-6`
1570
- * `CHG` improve performance
1571
- * `FIX` [#625](https://github.com/LuaLS/lua-language-server/issues/625)
1572
-
1573
- ## 2.3.3
1574
- `2021-7-26`
1575
- * `NEW` config supports prop
1576
- * `FIX` [#612](https://github.com/LuaLS/lua-language-server/issues/612)
1577
- * `FIX` [#613](https://github.com/LuaLS/lua-language-server/issues/613)
1578
- * `FIX` [#618](https://github.com/LuaLS/lua-language-server/issues/618)
1579
- * `FIX` [#620](https://github.com/LuaLS/lua-language-server/issues/620)
1580
-
1581
- ## 2.3.2
1582
- `2021-7-21`
1583
- * `NEW` `LuaDoc`: supports `['string']` as field:
1584
- ```lua
1585
- ---@class keyboard
1586
- ---@field ['!'] number
1587
- ---@field ['?'] number
1588
- ---@field ['#'] number
1589
- ```
1590
- * `NEW` add supports of `love2d`
1591
- * `FIX` gitignore pattern `\` broken initialization
1592
- * `FIX` runtime errors
1593
-
1594
- ## 2.3.1
1595
- `2021-7-19`
1596
- * `NEW` setting `Lua.workspace.userThirdParty`, add private user [third-parth](https://github.com/LuaLS/lua-language-server/tree/master/meta/3rd) by this setting
1597
- * `CHG` path in config supports `~/xxxx`
1598
- * `FIX` `autoRequire` inserted incorrect code
1599
- * `FIX` `autoRequire` may provide dumplicated options
1600
- * `FIX` [#606](https://github.com/LuaLS/lua-language-server/issues/606)
1601
- * `FIX` [#607](https://github.com/LuaLS/lua-language-server/issues/607)
1602
-
1603
- ## 2.3.0
1604
- `2021-7-16`
1605
- * `NEW` `VSCode`: click the status bar icon to operate:
1606
- * run workspace diagnostics
1607
- * `NEW` `LuaDoc`: supports `[1]` as field:
1608
- ```lua
1609
- ---@class position
1610
- ---@field [1] number
1611
- ---@field [2] number
1612
- ---@field [3] number
1613
- ```
1614
- * `NEW` hover: view array `local array = {'a', 'b', 'c'}`:
1615
- ```lua
1616
- local array: {
1617
- [1]: string = "a",
1618
- [2]: string = "b",
1619
- [3]: string = "c",
1620
- }
1621
- ```
1622
- * `NEW` completion: supports enums in `fun()`
1623
- ```lua
1624
- ---@type fun(x: "'aaa'"|"'bbb'")
1625
- local f
1626
-
1627
- f(--[[show `'aaa'` and `'bbb'` here]])
1628
- ```
1629
- * `FIX` loading workspace may hang
1630
- * `FIX` `debug.getuservalue` and `debug.setuservalue` should not exist in `Lua 5.1`
1631
- * `FIX` infer of `---@type class[][]`
1632
- * `FIX` infer of `---@type {}[]`
1633
- * `FIX` completion: displaying `@fenv` in `Lua 5.1`
1634
- * `FIX` completion: incorrect at end of line
1635
- * `FIX` when a file is renamed, the file will still be loaded even if the new file name has been set to ignore
1636
- * `FIX` [#596](https://github.com/LuaLS/lua-language-server/issues/596)
1637
- * `FIX` [#597](https://github.com/LuaLS/lua-language-server/issues/597)
1638
- * `FIX` [#598](https://github.com/LuaLS/lua-language-server/issues/598)
1639
- * `FIX` [#601](https://github.com/LuaLS/lua-language-server/issues/601)
1640
-
1641
- ## 2.2.3
1642
- `2021-7-9`
1643
- * `CHG` improve `auto require`
1644
- * `CHG` will not sleep anymore
1645
- * `FIX` incorrect doc: `debug.getlocal`
1646
- * `FIX` completion: incorrect callback
1647
- * `FIX` [#592](https://github.com/LuaLS/lua-language-server/issues/592)
1648
-
1649
- ## 2.2.2
1650
- `2021-7-9`
1651
- * `FIX` incorrect syntax color
1652
- * `FIX` incorrect type infer
1653
-
1654
- ## 2.2.1
1655
- `2021-7-8`
1656
- * `FIX` change setting may failed
1657
-
1658
- ## 2.2.0
1659
- `2021-7-8`
1660
- * `NEW` detect and apply third-party libraries, including:
1661
- * OpenResty
1662
- * Cocos4.0
1663
- * Jass
1664
- * `NEW` `LuaDoc`: supports literal table:
1665
- ```lua
1666
- ---@generic T
1667
- ---@param x T
1668
- ---@return { x: number, y: T, z?: boolean}
1669
- local function f(x) end
1670
-
1671
- local t = f('str')
1672
- -- hovering "t" shows:
1673
- local t: {
1674
- x: number,
1675
- y: string,
1676
- z?: boolean,
1677
- }
1678
- ```
1679
- * `CHG` improve changing config from server side
1680
- * `CHG` improve hover color
1681
- * `CHG` improve performance
1682
- * `CHG` telemetry: sends version of this extension
1683
- * `FIX` supports for file with LF
1684
- * `FIX` may infer a custom class as a string
1685
-
1686
- ## 2.1.0
1687
- `2021-7-2`
1688
- * `NEW` supports local config file, using `--configpath="config.json"`, [learn more here](https://luals.github.io/wiki/usage/#--configpath)
1689
- * `NEW` goto `type definition`
1690
- * `NEW` infer type by callback param:
1691
- ```lua
1692
- ---@param callback fun(value: string)
1693
- local function work(callback)
1694
- end
1695
-
1696
- work(function (value)
1697
- -- value is string here
1698
- end)
1699
- ```
1700
- * `NEW` optional field `---@field name? type`
1701
- * `CHG` [#549](https://github.com/LuaLS/lua-language-server/issues/549)
1702
- * `CHG` diagnostics: always ignore the ignored files even if they are opened
1703
- * `FIX` completion: `type() ==` may does not work
1704
-
1705
- ## 2.0.5
1706
- `2021-7-1`
1707
- * `NEW` `hover` and `completion` reports initialization progress
1708
- * `CHG` `class field` consider implicit definition
1709
- ```lua
1710
- ---@class Class
1711
- local mt = {}
1712
-
1713
- function mt:init()
1714
- self.xxx = 1
1715
- end
1716
-
1717
- function mt:func()
1718
- print(self.xxx) -- self.xxx is defined
1719
- end
1720
- ```
1721
- * `CHG` improve performance
1722
- * `FIX` [#580](https://github.com/LuaLS/lua-language-server/issues/580)
1723
-
1724
- ## 2.0.4
1725
- `2021-6-25`
1726
- * `FIX` [#550](https://github.com/LuaLS/lua-language-server/issues/550)
1727
- * `FIX` [#555](https://github.com/LuaLS/lua-language-server/issues/555)
1728
- * `FIX` [#574](https://github.com/LuaLS/lua-language-server/issues/574)
1729
-
1730
- ## 2.0.3
1731
- `2021-6-24`
1732
- * `CHG` improve memory usage
1733
- * `FIX` some dialog boxes block the initialization process
1734
- * `FIX` diagnostics `undefined-field`: blocks main thread
1735
- * `FIX` [#565](https://github.com/LuaLS/lua-language-server/issues/565)
1736
-
1737
- ## 2.0.2
1738
- `2021-6-23`
1739
- * `NEW` supports literal table in `pairs`
1740
- ```lua
1741
- local t = { a = 1, b = 2, c = 3 }
1742
- for k, v in pairs(t) do
1743
- -- `k` is string and `v` is integer here
1744
- end
1745
- ```
1746
- * `CHG` view `local f ---@type fun(x:number):boolean`
1747
- ```lua
1748
- ---before
1749
- function f(x: number)
1750
- -> boolean
1751
- ---after
1752
- local f: fun(x: number): boolean
1753
- ```
1754
- * `FIX` [#558](https://github.com/LuaLS/lua-language-server/issues/558)
1755
- * `FIX` [#567](https://github.com/LuaLS/lua-language-server/issues/567)
1756
- * `FIX` [#568](https://github.com/LuaLS/lua-language-server/issues/568)
1757
- * `FIX` [#570](https://github.com/LuaLS/lua-language-server/issues/570)
1758
- * `FIX` [#571](https://github.com/LuaLS/lua-language-server/issues/571)
1759
-
1760
- ## 2.0.1
1761
- `2021-6-21`
1762
- * `FIX` [#566](https://github.com/LuaLS/lua-language-server/issues/566)
1763
-
1764
- ## 2.0.0
1765
- `2021-6-21`
1766
- * `NEW` implement
1767
- * `CHG` diagnostics `undefined-field`, `deprecated`: default by `Opened` instead of `None`
1768
- * `CHG` setting `Lua.runtime.plugin`: default by `""` instead of `".vscode/lua/plugin.lua"` (for security)
1769
- * `CHG` setting `Lua.intelliSense.searchDepth`: removed
1770
- * `CHG` setting `Lua.misc.parameters`: `string array` instead of `string`
1771
- * `CHG` setting `Lua.develop.enable`, `Lua.develop.debuggerPort`, `Lua.develop.debuggerWait`: removed, use `Lua.misc.parameters` instead
1772
- * `FIX` [#441](https://github.com/LuaLS/lua-language-server/issues/441)
1773
- * `FIX` [#493](https://github.com/LuaLS/lua-language-server/issues/493)
1774
- * `FIX` [#531](https://github.com/LuaLS/lua-language-server/issues/531)
1775
- * `FIX` [#542](https://github.com/LuaLS/lua-language-server/issues/542)
1776
- * `FIX` [#543](https://github.com/LuaLS/lua-language-server/issues/543)
1777
- * `FIX` [#553](https://github.com/LuaLS/lua-language-server/issues/553)
1778
- * `FIX` [#562](https://github.com/LuaLS/lua-language-server/issues/562)
1779
- * `FIX` [#563](https://github.com/LuaLS/lua-language-server/issues/563)
1780
-
1781
- ## 1.21.3
1782
- `2021-6-17`
1783
- * `NEW` supports `untrusted workspaces`
1784
- * `FIX` performance issues, thanks to [folke](https://github.com/folke)
1785
-
1786
- ## 1.21.2
1787
- `2021-5-18`
1788
- * `FIX` loaded new file with ignored filename
1789
- * `FIX` [#536](https://github.com/LuaLS/lua-language-server/issues/536)
1790
- * `FIX` [#537](https://github.com/LuaLS/lua-language-server/issues/537)
1791
- * `FIX` [#538](https://github.com/LuaLS/lua-language-server/issues/538)
1792
- * `FIX` [#539](https://github.com/LuaLS/lua-language-server/issues/539)
1793
-
1794
- ## 1.21.1
1795
- `2021-5-8`
1796
- * `FIX` [#529](https://github.com/LuaLS/lua-language-server/issues/529)
1797
-
1798
- ## 1.21.0
1799
- `2021-5-7`
1800
- * `NEW` setting: `completion.showParams`
1801
- * `NEW` `LuaDoc`: supports multiline comments
1802
- * `NEW` `LuaDoc`: tail comments support lua string
1803
-
1804
- ## 1.20.5
1805
- `2021-4-30`
1806
- * `NEW` setting: `completion.autoRequire`
1807
- * `NEW` setting: `hover.enumsLimit`
1808
- * `CHG` folding: supports `-- #region`
1809
- * `FIX` completion: details may be suspended
1810
- * `FIX` [#522](https://github.com/LuaLS/lua-language-server/issues/522)
1811
- * `FIX` [#523](https://github.com/LuaLS/lua-language-server/issues/523)
1812
-
1813
- ## 1.20.4
1814
- `2021-4-13`
1815
- * `NEW` diagnostic: `deprecated`
1816
- * `FIX` [#464](https://github.com/LuaLS/lua-language-server/issues/464)
1817
- * `FIX` [#497](https://github.com/LuaLS/lua-language-server/issues/497)
1818
- * `FIX` [#502](https://github.com/LuaLS/lua-language-server/issues/502)
1819
-
1820
- ## 1.20.3
1821
- `2021-4-6`
1822
- * `FIX` [#479](https://github.com/LuaLS/lua-language-server/issues/479)
1823
- * `FIX` [#483](https://github.com/LuaLS/lua-language-server/issues/483)
1824
- * `FIX` [#485](https://github.com/LuaLS/lua-language-server/issues/485)
1825
- * `FIX` [#487](https://github.com/LuaLS/lua-language-server/issues/487)
1826
- * `FIX` [#488](https://github.com/LuaLS/lua-language-server/issues/488)
1827
- * `FIX` [#490](https://github.com/LuaLS/lua-language-server/issues/490)
1828
- * `FIX` [#495](https://github.com/LuaLS/lua-language-server/issues/495)
1829
-
1830
- ## 1.20.2
1831
- `2021-4-2`
1832
- * `CHG` `LuaDoc`: supports `---@param self TYPE`
1833
- * `CHG` completion: does not show suggests after `\n`, `{` and `,`, unless your setting `editor.acceptSuggestionOnEnter` is `off`
1834
- * `FIX` [#482](https://github.com/LuaLS/lua-language-server/issues/482)
1835
-
1836
- ## 1.20.1
1837
- `2021-3-27`
1838
- * `FIX` telemetry window blocks initializing
1839
- * `FIX` [#468](https://github.com/LuaLS/lua-language-server/issues/468)
1840
-
1841
- ## 1.20.0
1842
- `2021-3-27`
1843
- * `CHG` telemetry: change to opt-in, see [#462](https://github.com/LuaLS/lua-language-server/issues/462) and [Privacy-Policy](https://luals.github.io/privacy/#language-server)
1844
- * `FIX` [#467](https://github.com/LuaLS/lua-language-server/issues/467)
1845
-
1846
- ## 1.19.1
1847
- `2021-3-22`
1848
- * `CHG` improve performance
1849
- * `FIX` [#457](https://github.com/LuaLS/lua-language-server/issues/457)
1850
- * `FIX` [#458](https://github.com/LuaLS/lua-language-server/issues/458)
1851
-
1852
- ## 1.19.0
1853
- `2021-3-18`
1854
- * `NEW` VSCode: new setting `Lua.misc.parameters`
1855
- * `NEW` new setting `Lua.runtime.builtin`, used to disable some built-in libraries
1856
- * `NEW` quick fix: disable diagnostic in line/file
1857
- * `NEW` setting: `Lua.runtime.path` supports absolute path
1858
- * `NEW` completion: field in table
1859
- ```lua
1860
- ---@class A
1861
- ---@field x number
1862
- ---@field y number
1863
- ---@field z number
1864
-
1865
- ---@type A
1866
- local t = {
1867
- -- provide `x`, `y` and `z` here
1868
- }
1869
- ```
1870
- * `NEW` `LuaDoc`: supports multi-line comment before resume
1871
- ```lua
1872
- ---this is
1873
- ---a multi line
1874
- ---comment
1875
- ---@alias XXXX
1876
- ---comment 1
1877
- ---comment 1
1878
- ---| '1'
1879
- ---comment 2
1880
- ---comment 2
1881
- ---| '2'
1882
-
1883
- ---@param x XXXX
1884
- local function f(x)
1885
- end
1886
-
1887
- f( -- view comments of `1` and `2` in completion
1888
- ```
1889
- * `CHG` intelli-scense: search from generic param to return
1890
- * `CHG` intelli-scense: search across vararg
1891
- * `CHG` text-document-synchronization: refactored
1892
- * `CHG` diagnostic: improve `newline-call`
1893
- * `CHG` completion: improve `then .. end`
1894
- * `CHG` improve initialization speed
1895
- * `CHG` improve performance
1896
- * `FIX` missed syntax error `function m['x']() end`
1897
- * `FIX` [#452](https://github.com/LuaLS/lua-language-server/issues/452)
1898
-
1899
- ## 1.18.1
1900
- `2021-3-10`
1901
- * `CHG` semantic-tokens: improve colors of `const` and `close`
1902
- * `CHG` type-formating: improve execution conditions
1903
- * `FIX` [#444](https://github.com/LuaLS/lua-language-server/issues/444)
1904
-
1905
- ## 1.18.0
1906
- `2021-3-9`
1907
- * `NEW` `LuaDoc`: supports `---@diagnostic disable`
1908
- * `NEW` code-action: convert JSON to Lua
1909
- * `NEW` completion: provide `then .. end` snippet
1910
- * `NEW` type-formating:
1911
- ```lua
1912
- -- press `enter` at $
1913
- local function f() $ end
1914
- -- formating result:
1915
- local function f()
1916
- $
1917
- end
1918
-
1919
- -- as well as
1920
- do $ end
1921
- -- formating result
1922
- do
1923
- $
1924
- end
1925
- ```
1926
- * `CHG` `Windows`: dose not provide `ucrt` any more
1927
- * `CHG` `Lua.workspace.library`: use `path[]` instead of `<path, true>`
1928
- * `FIX` missed syntax error `local a <const>= 1`
1929
- * `FIX` workspace: preload blocked when hitting `Lua.workspace.maxPreload`
1930
- * `FIX` [#443](https://github.com/LuaLS/lua-language-server/issues/443)
1931
- * `FIX` [#445](https://github.com/LuaLS/lua-language-server/issues/445)
1932
-
1933
- ## 1.17.4
1934
- `2021-3-4`
1935
- * `FIX` [#437](https://github.com/LuaLS/lua-language-server/issues/437) again
1936
- * `FIX` [#438](https://github.com/LuaLS/lua-language-server/issues/438)
1937
-
1938
- ## 1.17.3
1939
- `2021-3-3`
1940
- * `CHG` intelli-scense: treat `V[]` as `table<integer, V>` in `pairs`
1941
- * `FIX` completion: `detail` disappears during continuous input
1942
- * `FIX` [#435](https://github.com/LuaLS/lua-language-server/issues/435)
1943
- * `FIX` [#436](https://github.com/LuaLS/lua-language-server/issues/436)
1944
- * `FIX` [#437](https://github.com/LuaLS/lua-language-server/issues/437)
1945
-
1946
- ## 1.17.2
1947
- `2021-3-2`
1948
- * `FIX` running in Windows
1949
-
1950
- ## 1.17.1
1951
- `2021-3-1`
1952
- * `CHG` intelli-scense: improve infer across `table<K, V>` and `V[]`.
1953
- * `CHG` intelli-scense: improve infer across `pairs` and `ipairs`
1954
- * `FIX` hover: shows nothing when hovering unknown function
1955
- * `FIX` [#398](https://github.com/LuaLS/lua-language-server/issues/398)
1956
- * `FIX` [#421](https://github.com/LuaLS/lua-language-server/issues/421)
1957
- * `FIX` [#422](https://github.com/LuaLS/lua-language-server/issues/422)
1958
-
1959
- ## 1.17.0
1960
- `2021-2-24`
1961
- * `NEW` diagnostic: `duplicate-set-field`
1962
- * `NEW` diagnostic: `no-implicit-any`, disabled by default
1963
- * `CHG` completion: improve field and table
1964
- * `CHG` improve infer cross `ipairs`
1965
- * `CHG` cache globals when loading
1966
- * `CHG` completion: remove trigger character `\n` for now, see [#401](https://github.com/LuaLS/lua-language-server/issues/401)
1967
- * `FIX` diagnositc: may open file with wrong uri case
1968
- * `FIX` [#406](https://github.com/LuaLS/lua-language-server/issues/406)
1969
-
1970
- ## 1.16.1
1971
- `2021-2-22`
1972
- * `FIX` signature: parameters may be misplaced
1973
- * `FIX` completion: interface in nested table
1974
- * `FIX` completion: interface not show after `,`
1975
- * `FIX` [#400](https://github.com/LuaLS/lua-language-server/issues/400)
1976
- * `FIX` [#402](https://github.com/LuaLS/lua-language-server/issues/402)
1977
- * `FIX` [#403](https://github.com/LuaLS/lua-language-server/issues/403)
1978
- * `FIX` [#404](https://github.com/LuaLS/lua-language-server/issues/404)
1979
- * `FIX` runtime errors
1980
-
1981
- ## 1.16.0
1982
- `2021-2-20`
1983
- * `NEW` file encoding supports `ansi`
1984
- * `NEW` completion: supports interface, see [#384](https://github.com/LuaLS/lua-language-server/issues/384)
1985
- * `NEW` `LuaDoc`: supports multiple class inheritance: `---@class Food: Burger, Pizza, Pie, Pasta`
1986
- * `CHG` rename `table*` to `tablelib`
1987
- * `CHG` `LuaDoc`: revert compatible with `--@`, see [#392](https://github.com/LuaLS/lua-language-server/issues/392)
1988
- * `CHG` improve performance
1989
- * `FIX` missed syntax error `f() = 1`
1990
- * `FIX` missed global `bit` in `LuaJIT`
1991
- * `FIX` completion: may insert error text when continuous inputing
1992
- * `FIX` completion: may insert error text after resolve
1993
- * `FIX` [#349](https://github.com/LuaLS/lua-language-server/issues/349)
1994
- * `FIX` [#396](https://github.com/LuaLS/lua-language-server/issues/396)
1995
-
1996
- ## 1.15.1
1997
- `2021-2-18`
1998
- * `CHG` diagnostic: `unused-local` excludes `doc.param`
1999
- * `CHG` definition: excludes values, see [#391](https://github.com/LuaLS/lua-language-server/issues/391)
2000
- * `FIX` not works on Linux and macOS
2001
-
2002
- ## 1.15.0
2003
- `2021-2-9`
2004
- * `NEW` LUNAR YEAR, BE HAPPY!
2005
- * `CHG` diagnostic: when there are too many errors, the main errors will be displayed first
2006
- * `CHG` main thread no longer loop sleeps, see [#329](https://github.com/LuaLS/lua-language-server/issues/329) [#386](https://github.com/LuaLS/lua-language-server/issues/386)
2007
- * `CHG` improve performance
2008
-
2009
- ## 1.14.3
2010
- `2021-2-8`
2011
- * `CHG` hint: disabled by default, see [#380](https://github.com/LuaLS/lua-language-server/issues/380)
2012
- * `FIX` [#381](https://github.com/LuaLS/lua-language-server/issues/381)
2013
- * `FIX` [#382](https://github.com/LuaLS/lua-language-server/issues/382)
2014
- * `FIX` [#388](https://github.com/LuaLS/lua-language-server/issues/388)
2015
-
2016
- ## 1.14.2
2017
- `2021-2-4`
2018
- * `FIX` [#356](https://github.com/LuaLS/lua-language-server/issues/356)
2019
- * `FIX` [#375](https://github.com/LuaLS/lua-language-server/issues/375)
2020
- * `FIX` [#376](https://github.com/LuaLS/lua-language-server/issues/376)
2021
- * `FIX` [#377](https://github.com/LuaLS/lua-language-server/issues/377)
2022
- * `FIX` [#378](https://github.com/LuaLS/lua-language-server/issues/378)
2023
- * `FIX` [#379](https://github.com/LuaLS/lua-language-server/issues/379)
2024
- * `FIX` a lot of runtime errors
2025
-
2026
- ## 1.14.1
2027
- `2021-2-2`
2028
- * `FIX` [#372](https://github.com/LuaLS/lua-language-server/issues/372)
2029
-
2030
- ## 1.14.0
2031
- `2021-2-2`
2032
- * `NEW` `VSCode` hint
2033
- * `NEW` flush cache after 5 min
2034
- * `NEW` `VSCode` help semantic color with market theme
2035
- * `CHG` create/delete/rename files no longer reload workspace
2036
- * `CHG` `LuaDoc`: compatible with `--@`
2037
- * `FIX` `VSCode` settings
2038
- * `FIX` [#368](https://github.com/LuaLS/lua-language-server/issues/368)
2039
- * `FIX` [#371](https://github.com/LuaLS/lua-language-server/issues/371)
2040
-
2041
- ## 1.13.0
2042
- `2021-1-28`
2043
- * `NEW` `VSCode` status bar
2044
- * `NEW` `VSCode` options in some window
2045
- * `CHG` performance optimization
2046
- * `FIX` endless loop
2047
-
2048
- ## 1.12.2
2049
- `2021-1-27`
2050
- * `CHG` performance optimization
2051
- * `FIX` modifying the code before loading finish makes confusion
2052
- * `FIX` signature: not works
2053
-
2054
- ## 1.12.1
2055
- `2021-1-27`
2056
- * `FIX` endless loop
2057
-
2058
- ## 1.12.0
2059
- `2021-1-26`
2060
- * `NEW` progress
2061
- * `NEW` [#340](https://github.com/LuaLS/lua-language-server/pull/340): supports `---@type table<string, number>`
2062
- * `FIX` [#355](https://github.com/LuaLS/lua-language-server/pull/355)
2063
- * `FIX` [#359](https://github.com/LuaLS/lua-language-server/issues/359)
2064
- * `FIX` [#361](https://github.com/LuaLS/lua-language-server/issues/361)
2065
-
2066
- ## 1.11.2
2067
- `2021-1-7`
2068
- * `FIX` [#345](https://github.com/LuaLS/lua-language-server/issues/345): not works with unexpect args
2069
- * `FIX` [#346](https://github.com/LuaLS/lua-language-server/issues/346): dont modify the cache
2070
-
2071
- ## 1.11.1
2072
- `2021-1-5`
2073
- * `CHG` performance optimization
2074
-
2075
- ## 1.11.0
2076
- `2021-1-5`
2077
- * `NEW` `Lua.runtime.plugin`
2078
- * `NEW` intelli-scense: improved `m.f = function (self) end` from `self` to `m`
2079
- * `CHG` performance optimization
2080
- * `CHG` completion: improve performance of workspace words
2081
- * `FIX` hover: tail comments may be cutted
2082
- * `FIX` runtime errors
2083
-
2084
- ## 1.10.0
2085
- `2021-1-4`
2086
- * `NEW` workspace: supports `.dll`(`.so`) in `require`
2087
- * `NEW` folding: `---@class`, `--#region` and docs of function
2088
- * `NEW` diagnostic: `count-down-loop`
2089
- * `CHG` supports `~` in command line
2090
- * `CHG` completion: improve workspace words
2091
- * `CHG` completion: show words in string
2092
- * `CHG` completion: split `for .. in` to `for .. ipairs` and `for ..pairs`
2093
- * `CHG` diagnostic: `unused-function` checks recursive
2094
- * `FIX` [#339](https://github.com/LuaLS/lua-language-server/issues/339)
2095
-
2096
- ## 1.9.0
2097
- `2020-12-31`
2098
- * `NEW` YEAR! Peace and love!
2099
- * `NEW` specify path of `log` and `meta` by `--logpath=xxx` and `--metapath=XXX` in command line
2100
- * `NEW` completion: worksapce word
2101
- * `NEW` completion: show words in comment
2102
- * `NEW` completion: generate function documentation
2103
- * `CHG` got arg after script name: `lua-language-server.exe main.lua --logpath=D:\log --metapath=D:\meta --develop=false`
2104
- * `FIX` runtime errors
2105
-
2106
- ## 1.8.2
2107
- `2020-12-29`
2108
- * `CHG` performance optimization
2109
-
2110
- ## 1.8.1
2111
- `2020-12-24`
2112
- * `FIX` telemetry: connect failed caused not working
2113
-
2114
- ## 1.8.0
2115
- `2020-12-23`
2116
- * `NEW` runtime: support nonstandard symbol
2117
- * `NEW` diagnostic: `close-non-object`
2118
- * `FIX` [#318](https://github.com/LuaLS/lua-language-server/issues/318)
2119
-
2120
- ## 1.7.4
2121
- `2020-12-20`
2122
- * `FIX` workspace: preload may failed
2123
-
2124
- ## 1.7.3
2125
- `2020-12-20`
2126
- * `FIX` luadoc: typo of `package.config`
2127
- * `FIX` [#310](https://github.com/LuaLS/lua-language-server/issues/310)
2128
-
2129
- ## 1.7.2
2130
- `2020-12-17`
2131
- * `CHG` completion: use custom tabsize
2132
- * `FIX` [#307](https://github.com/LuaLS/lua-language-server/issues/307)
2133
- * `FIX` a lot of runtime errors
2134
-
2135
- ## 1.7.1
2136
- `2020-12-16`
2137
- * `NEW` setting: `diagnostics.neededFileStatus`
2138
- * `FIX` scan workspace may fails
2139
- * `FIX` quickfix: `newline-call` failed
2140
- * `FIX` a lot of other runtime errors
2141
-
2142
- ## 1.7.0
2143
- `2020-12-16`
2144
- * `NEW` diagnostic: `undefined-field`
2145
- * `NEW` telemetry:
2146
- + [What data will be sent](https://github.com/LuaLS/lua-language-server/blob/master/script/service/telemetry.lua)
2147
- + [How to use this data](https://github.com/LuaLS/lua-telemetry-server/tree/master/method)
2148
- * `CHG` diagnostic: `unused-function` ignores function with `<close>`
2149
- * `CHG` semantic: not cover local call
2150
- * `CHG` language client: update to [7.0.0](https://github.com/microsoft/vscode-languageserver-node/commit/20681d7632bb129def0c751be73cf76bd01f2f3a)
2151
- * `FIX` semantic: tokens may not be updated correctly
2152
- * `FIX` completion: require path broken
2153
- * `FIX` hover: document uri
2154
- * `FIX` [#291](https://github.com/LuaLS/lua-language-server/issues/291)
2155
- * `FIX` [#294](https://github.com/LuaLS/lua-language-server/issues/294)
2156
-
2157
- ## 1.6.0
2158
- `2020-12-14`
2159
- * `NEW` completion: auto require local modules
2160
- * `NEW` completion: support delegate
2161
- * `NEW` hover: show function by keyword `function`
2162
- * `NEW` code action: swap params
2163
- * `CHG` standalone: unbind the relative path between binaries and scripts
2164
- * `CHG` hover: `LuaDoc` also catchs `--` (no need `---`)
2165
- * `CHG` rename: support doc
2166
- * `CHG` completion: keyword considers expression
2167
- * `FIX` [#297](https://github.com/LuaLS/lua-language-server/issues/297)
2168
-
2169
- ## 1.5.0
2170
- `2020-12-5`
2171
- * `NEW` setting `runtime.unicodeName`
2172
- * `NEW` fully supports `---@generic T`
2173
- * `FIX` [#274](https://github.com/LuaLS/lua-language-server/issues/274)
2174
- * `FIX` [#276](https://github.com/LuaLS/lua-language-server/issues/276)
2175
- * `FIX` [#279](https://github.com/LuaLS/lua-language-server/issues/279)
2176
- * `FIX` [#280](https://github.com/LuaLS/lua-language-server/issues/280)
2177
-
2178
- ## 1.4.0
2179
- `2020-12-3`
2180
- * `NEW` setting `hover.previewFields`: limit how many fields are shown in table hover
2181
- * `NEW` fully supports `---@type Object[]`
2182
- * `NEW` supports `---@see`
2183
- * `NEW` diagnostic `unbalanced-assignments`
2184
- * `CHG` resolves infer of `string|table`
2185
- * `CHG` `unused-local` ignores local with `---@class`
2186
- * `CHG` locale file format changes to `lua`
2187
-
2188
- ## 1.3.0
2189
- `2020-12-1`
2190
-
2191
- * `NEW` provides change logs, I think it's good idea for people knowing what's new ~~(bugs)~~
2192
- * `NEW` meta files of LuaJIT
2193
- * `NEW` support completion of `type(o) == ?`
2194
- * `CHG` now I think it's a bad idea as it took me nearly an hour to complete the logs started from version `1.0.0`
2195
- * `FIX` closing ignored or library file dose not clean diagnostics
2196
- * `FIX` searching of `t.f1` when `t.f1 = t.f2`
2197
- * `FIX` missing signature help of global function
2198
-
2199
- ## 1.2.1
2200
- `2020-11-27`
2201
-
2202
- * `FIX` syntaxes tokens: [#272](https://github.com/LuaLS/lua-language-server/issues/272)
2203
-
2204
- ## 1.2.0
2205
- `2020-11-27`
2206
-
2207
- * `NEW` hover shows comments from `---@param` and `---@return`: [#135](https://github.com/LuaLS/lua-language-server/issues/135)
2208
- * `NEW` support `LuaDoc` as tail comment
2209
- * `FIX` `---@class` inheritance
2210
- * `FIX` missed syntaxes token: `punctuation.definition.parameters.finish.lua`
2211
-
2212
- ## 1.1.4
2213
- `2020-11-25`
2214
-
2215
- * `FIX` wiered completion suggests for require paths in `Linux` and `macOS`: [#269](https://github.com/LuaLS/lua-language-server/issues/269)
2216
-
2217
- ## 1.1.3
2218
- `2020-11-25`
2219
-
2220
- * `FIX` extension not works in `Ubuntu`: [#268](https://github.com/LuaLS/lua-language-server/issues/268)
2221
-
2222
- ## 1.1.2
2223
- `2020-11-24`
2224
-
2225
- * `NEW` auto completion finds globals from `Lua.diagnostics.globals`
2226
- * `NEW` support tail `LuaDoc`
2227
- * `CHG` no more `Lua.intelliScense.fastGlobal`, now globals always fast and accurate
2228
- * `CHG` `LuaDoc` supports `--- @`
2229
- * `CHG` `find reference` uses extra `Lua.intelliSense.searchDepth`
2230
- * `CHG` diagnostics are limited by `100` in each file
2231
- * `FIX` library files are under limit of `Lua.workspace.maxPreload`: [#266](https://github.com/LuaLS/lua-language-server/issues/266)
2232
-
2233
- ## 1.1.1
2234
- `2020-11-23`
2235
-
2236
- * `NEW` auto completion special marks deprecated items
2237
- * `FIX` diagnostics may push wrong uri in `Linux` and `macOS`
2238
- * `FIX` diagnostics not cleaned up when closing ignored lua file
2239
- * `FIX` reload workspace remains old caches
2240
- * `FIX` incorrect hover of local attribute
2241
-
2242
- ## 1.1.0
2243
- `2020-11-20`
2244
-
2245
- * `NEW` no longer `BETA`
2246
- * `NEW` use `meta.lua` instead of `meta.lni`, now you can find the definition of builtin function
2247
- * `CHG` Lua files outside of workspace no longer launch a new server
2248
-
2249
- ## 1.0.6
2250
- `2020-11-20`
2251
-
2252
- * `NEW` diagnostic `code-after-break`
2253
- * `CHG` optimize performance
2254
- * `CHG` updated language client
2255
- * `CHG` `unused-function` ignores global functions (may used out of Lua)
2256
- * `CHG` checks if client supports `Lua.completion.enable`: [#259](https://github.com/LuaLS/lua-language-server/issues/259)
2257
- * `FIX` support for single Lua file
2258
- * `FIX` [#257](https://github.com/LuaLS/lua-language-server/issues/257)
2259
-
2260
- ## 1.0.5
2261
- `2020-11-14`
2262
-
2263
- * `NEW` `LuaDoc` supports more `EmmyLua`
2264
-
2265
- ## 1.0.4
2266
- `2020-11-12`
2267
-
2268
- * `FIX` extension not works
2269
-
2270
- ## 1.0.3
2271
- `2020-11-12`
2272
-
2273
- * `NEW` server kills itself when disconnecting
2274
- * `NEW` `LuaDoc` supports more `EmmyLua`
2275
- * `FIX` `Lua.diagnostics.enable` not works: [#251](https://github.com/LuaLS/lua-language-server/issues/251)
2276
-
2277
- ## 1.0.2
2278
- `2020-11-11`
2279
-
2280
- * `NEW` supports `---|` after `doc.type`
2281
- * `CHG` `lowcase-global` ignores globals with `---@class`
2282
- * `FIX` endless loop
2283
- * `FIX` [#244](https://github.com/LuaLS/lua-language-server/issues/244)
2284
-
2285
- ## 1.0.1
2286
- `2020-11-10`
2287
-
2288
- * `FIX` autocompletion not works.
2289
-
2290
- ## 1.0.0
2291
- `2020-11-9`
2292
-
2293
- * `NEW` implementation, NEW start!
2294
-
2295
- <!-- contributors -->
2296
- [lizho]: (https://github.com/lizho)
2297
- [fesily]: (https://github.com/fesily)
2298
- [Andreas Matthias]: (https://github.com/AndreasMatthias)
2299
- [Daniel Farrell]: (https://github.com/danpf)
2300
- [Paul Emmerich]: (https://github.com/emmericp)
2301
- [Artem Dzhemesiuk]: (https://github.com/zziger)
2302
- [clay-golem]: (https://github.com/clay-golem)
1
+ # changelog
2
+
3
+ ## Unreleased
4
+ <!-- Add all new changes here. They will be moved under a version at release -->
5
+
6
+ ## 3.14.0
7
+ `2025-4-7`
8
+ * `NEW` locale `es-419`, thanks [Felipe Lema](https://codeberg.org/FelipeLema)
9
+ * `FIX` prevent unnecessary edits by LSP formatting when content did not change
10
+ * `FIX` return no completions if completion is disabled
11
+ * `FIX` optimized the performance of large literal tables (e.g., configuration tables)
12
+
13
+ ## 3.13.9
14
+ `2025-3-13`
15
+ * `CHG` remove the limit for analyzing the literal table
16
+
17
+ ## 3.13.8
18
+ `2025-3-12`
19
+ * `CHG` when analyzing the literal table, only the first 100 items are analyzed at most
20
+ * `CHG` when checking type matching for union types, only the first 100 items are checked at most
21
+ * `FIX` Update `--help` message.
22
+ * `FIX` --check now respects ignoreDir setting
23
+ * `FIX` incorrect argument skip pattern for `--check_out_path=`, which incorrectly skips the next argument
24
+
25
+ ## 3.13.7
26
+ `2025-3-10`
27
+ * `NEW` CLI: added `--help`.
28
+ * `CHG` default path for `--doc_out_path` is the current directory
29
+ * `FIX` incorrect argument skip pattern for `--check_out_path=`, which incorrectly skips the next argument
30
+ * `FIX` incorrect error message for `--doc_update`.
31
+ * `FIX` reimplement section `luals.config` in file doc.json
32
+ * `FIX` incorrect file names in file doc.json
33
+ * `FIX` remove extra `./` path prefix in the check report when using `--check=.`
34
+ * `FIX` Narrowing of types with literal fields: [#3056](https://github.com/LuaLS/lua-language-server/issues/3056), [#3089](https://github.com/LuaLS/lua-language-server/issues/3089)
35
+ * `FIX` correct lua version of `math.ult` and `math.type`
36
+ * `FIX` incorrect links for `pattern` in `string` methods
37
+ * `FIX` fix type annotations for bit module
38
+ * `FIX` Another regression related to type narrow and generic param introduced since `v3.10.1` [#3087](https://github.com/LuaLS/lua-language-server/issues/3087)
39
+
40
+ ## 3.13.6
41
+ `2025-2-6`
42
+ * `NEW` `---@class` supports attribute `partial`, which will not check missing inherited fields [#3023](https://github.com/LuaLS/lua-language-server/issues/3023)
43
+ ```lua
44
+ ---@class Config
45
+ ---@field a number
46
+
47
+ ---@class (partial) Config.P: Config
48
+ ---@field b number
49
+
50
+ ---@type Config.P[]
51
+ local cfgs = {}
52
+ cfgs[1] = { b = 1 } -- no warning
53
+ cfgs[2] = {} -- only warns missing `b`
54
+ ```
55
+ This enables the previous missing field check behavior before [#2970](https://github.com/LuaLS/lua-language-server/issues/2970)
56
+ * `NEW` Added variable substitution support for vscode's `${workspaceFolder:x}` when resolving path placeholders [#2987](https://github.com/LuaLS/lua-language-server/issues/2987)
57
+ * `NEW` Added `--check_format=json|pretty` for use with `--check` to output diagnostics in a human readable format.
58
+ * `NEW` Test CLI: `--name=<testname>` `-n=<testname>`: run specify unit test
59
+ * `CHG` Generic pattern now supports definition after capture and optional, union, array [#3014](https://github.com/LuaLS/lua-language-server/issues/3014) [#3031](https://github.com/LuaLS/lua-language-server/pull/3031)
60
+ ```lua
61
+ ---@generic T
62
+ ---@param t `T`.Cat?
63
+ ---@return T?
64
+ local function f(t) end
65
+
66
+ local t = f('Smile') --> t is `(Smile.Cat)?`
67
+ ```
68
+ * `FIX` Fixed the error that the configuration file pointed to by the `--configpath` option was not read and loaded.
69
+ * `FIX` Don't truncate any output when running in `--doc` mode [#3049](https://github.com/LuaLS/lua-language-server/issues/3049)
70
+ * `FIX` Generic return can be optional.
71
+ * `FIX` Fixed the comment calculating in docs `---@param a string?Comment` - now its `Comment` instead of `omment` [#3028](https://github.com/LuaLS/lua-language-server/pull/3028)
72
+ * `FIX` Fixed cannot bind variables using tail comment `@class` [#2673](https://github.com/LuaLS/lua-language-server/issues/2673)
73
+ * `FIX` Fixed missing field completion for generic class object [#2196](https://github.com/LuaLS/lua-language-server/issues/2196) [#2945](https://github.com/LuaLS/lua-language-server/issues/2945) [#3041](https://github.com/LuaLS/lua-language-server/issues/3041)
74
+
75
+ ## 3.13.5
76
+ `2024-12-20`
77
+ * `NEW` Setting: `Lua.hint.awaitPropagate`: When enabled, `--@async` propagates to the caller.
78
+ * `CHG` Add server version information to `initialize` response [#2996](https://github.com/LuaLS/lua-language-server/pull/2996)
79
+ * `CHG` If the `---@field` of the same name has a type of `fun`, the `duplicate-doc-field` check will not be performed.
80
+ * `FIX` Incorrect infer for function array annotation on tables [#2367](https://github.com/LuaLS/lua-language-server/issues/2367)
81
+
82
+ ## 3.13.4
83
+ `2024-12-13`
84
+ * `CHG` Can adjust the level of detail of Hover (VSCode)
85
+
86
+ ## 3.13.3
87
+ `2024-12-6`
88
+ * `CHG` Update Love2d version
89
+ * `CHG` Improve type infer of `table.unpack` and `unpack`
90
+ * `FIX` `missing-fields` diagnostic now warns about missing inherited fields
91
+ * `FIX` Incorrect `param-type-mismatch` diagnostic for optional fields
92
+
93
+ ## 3.13.2
94
+ `2024-11-21`
95
+ * `CHG` fulfill zh-cn translations
96
+ * `FIX` Add missing `errs ~= nil` checks to script/vm/type checkTableShape
97
+
98
+ ## 3.13.1
99
+ `2024-11-13`
100
+ * `FIX` Incorrect type check in some case
101
+
102
+ ## 3.13.0
103
+ `2024-11-13`
104
+ * `NEW` Setting: `Lua.type.inferTableSize`: A Small Table array can be infered
105
+ * `NEW` Add custom repository support for addonManager. New configuration setting: `Lua.addonManager.repositoryBranch` and `Lua.addonManager.repositoryPath`
106
+ * `NEW` Infer function parameter types when the function is used as an callback argument and that argument has a `fun()` annotation. Enable with `Lua.type.inferParamType` setting. [#2695](https://github.com/LuaLS/lua-language-server/pull/2695)
107
+ ```lua
108
+ ---@param callback fun(a: integer)
109
+ function register(callback) end
110
+
111
+ local function callback(a) end --> a: integer
112
+ register(callback)
113
+ ```
114
+ * `CHG` Basic types allow contravariance
115
+ ```lua
116
+ ---@class int32: integer
117
+
118
+ ---@type integer
119
+ local n
120
+
121
+ ---@type int32
122
+ local a = n
123
+ ```
124
+ * `FIX` Improve type narrow with **literal alias type** during completion and signature help
125
+
126
+ ## 3.12.0
127
+ `2024-10-30`
128
+ * `NEW` Support importing `enum` through class name suffix matching in quick fixes, allowing the import of `enum` from `table.table.enum; return table`.
129
+ * `NEW` Support limited multiline annotations
130
+ ```lua
131
+ ---@type {
132
+ --- x: number,
133
+ --- y: number,
134
+ --- z: number,
135
+ ---}
136
+ local point --> local point: { x: number, y: number, z: number }
137
+ ```
138
+ * `FIX` A regression related to type narrow and generic param introduced since `v3.10.1`
139
+ * `FIX` Parse storagePath to improve reliability of resolving ${addons} placeholder
140
+ * `FIX` Reference should also look in tablefield
141
+ * `FIX` Determine that the index of `{...}` is an integer when iterating
142
+
143
+ ## 3.11.1
144
+ `2024-10-9`
145
+ * `FIX` Fixed an issue preventing to set the locale to Japanese
146
+ * `FIX` Preserve newlines between function comment and @see
147
+ * `FIX` Accept storagePath option from client to resolve addon directory not found
148
+
149
+ ## 3.11.0
150
+ `2024-9-30`
151
+ * `NEW` Added support for Japanese locale
152
+ * `NEW` Infer function parameter types when overriding the same-named class function in an instance of that class [#2158](https://github.com/LuaLS/lua-language-server/issues/2158)
153
+ * `NEW` Types with literal fields can be narrowed.
154
+ * `NEW` Reference addons installed via the addon manager with `${addons}` [#2866](https://github.com/LuaLS/lua-language-server/pull/2866).
155
+ * `NEW` Support using `---@class` on `rawset(_G, ...)` to annotate the created global variable [#2862](https://github.com/LuaLS/lua-language-server/issues/2862)
156
+ * `NEW` Settings:
157
+ + `Lua.language.fixIndent`
158
+ + `Lua.language.completeAnnotation`
159
+ * `FIX` Eliminate floating point error in test benchmark output
160
+ * `FIX` Remove luamake install from make scripts
161
+ * `FIX` Incorrect `table` type injected to the global variable created by `rawset(_G, ...)` [#2863](https://github.com/LuaLS/lua-language-server/issues/2863)
162
+
163
+ ## 3.10.6
164
+ `2024-9-10`
165
+ * `NEW` Custom documentation exporter
166
+ * `NEW` Setting: `Lua.docScriptPath`: Path to a script that overrides `cli.doc.export`, allowing user-specified documentation exporting.
167
+ * `NEW` Infer the parameter types of a same-named function in the subclass based on the parameter types in the superclass function.
168
+ * `FIX` Fix `VM.OnCompileFunctionParam` function in plugins
169
+ * `FIX` Lua 5.1: fix incorrect warning when using setfenv with an int as first parameter
170
+ * `FIX` Improve type narrow by checking exact match on literal type params
171
+ * `FIX` Correctly list enums for function overload arguments [#2840](https://github.com/LuaLS/lua-language-server/pull/2840)
172
+ * `FIX` Incorrect function params' type infer when there is only `@overload` [#2509](https://github.com/LuaLS/lua-language-server/issues/2509) [#2708](https://github.com/LuaLS/lua-language-server/issues/2708) [#2709](https://github.com/LuaLS/lua-language-server/issues/2709)
173
+ * `FIX` Only call workspace/configuration when available [#981](https://github.com/LuaLS/lua-language-server/issues/981), [#2318](https://github.com/LuaLS/lua-language-server/issues/2318), [2336](https://github.com/LuaLS/lua-language-server/issues/2336) [#2843](https://github.com/LuaLS/lua-language-server/pull/2843)
174
+
175
+ ## 3.10.5
176
+ `2024-8-19`
177
+ * `NEW` using `enum (partial)`, it suggests all fields with the same `enum` type rather than just the fields from the current table.
178
+ * `NEW` When using `enum["<key>" or <index>]`, undefined fields will raise an 'undefined' error.
179
+ * `FIX` Renaming files in the directory leads to the auto-correction in "require" adding extra characters.
180
+ * `FIX` Performance issue
181
+ * `FIX` Fix incorrect indent fixing for `for`
182
+
183
+ ## 3.10.4
184
+ `2024-8-16`
185
+ * `NEW` Setting: `Lua.type.checkTableShape`: Add matching checks between the shape of tables and classes, during type checking. [#2768](https://github.com/LuaLS/lua-language-server/pull/2768)
186
+ * `NEW` `undefined-field` supports `enum`
187
+ * `CHG` Show enumed table as `enum X` instead of `table`
188
+ * `FIX` Error `attempt to index a nil value` when `Lua.hint.semicolon == 'All'` [#2788](https://github.com/LuaLS/lua-language-server/issues/2788)
189
+ * `FIX` Incorrect LuaCats parsing for `"'"`
190
+ * `FIX` Incorrect indent fixings
191
+
192
+ ## 3.10.3
193
+ `2024-8-8`
194
+ * `FIX` Memory leak with `---@enum(partical)`
195
+
196
+ ## 3.10.2
197
+ `2024-8-7`
198
+ * `NEW` Add support for binary metamethod on right operand [#2777](https://github.com/LuaLS/lua-language-server/pull/2777)
199
+ * `FIX` Incorrect indentation fixing in some case
200
+
201
+ ## 3.10.1
202
+ `2024-8-2`
203
+ * `FIX` Runtime error
204
+ * `FIX` Disable indentation fixing for Non-VSCode
205
+
206
+ ## 3.10.0
207
+ `2024-8-1`
208
+ * `NEW` Add postfix snippet for `unpack`
209
+ * `NEW` Add support for lambda style functions, `|paramList| expr` is syntactic sugar for `function(paramList) return expr end`
210
+ * `NEW` Added lua regular expression support for `Lua.doc.<scope>Name` [#2753](https://github.com/LuaLS/lua-language-server/pull/2753)
211
+ * `NEW` You can now click on "References" in CodeLen to display the reference list(VSCode)
212
+ * `NEW` Improved behavior for inserting new lines:
213
+ + When inside an annotation, an annotation tag will be added at the beginning of the line (VSCode).
214
+ + When between `function () end` or similar constructs, the format will be adjusted to a more reasonable one (VSCode) and leading/trailing spaces will be removed (generic).
215
+ + Attempts to semantically fix improper indentation (generic).
216
+ * `CHG` Improve performance of multithreaded `--check` and `undefined-field` diagnostic
217
+ * `CHG` Change spacing of parameter inlay hints to match other LSPs, like `rust-analyzer`
218
+ * `FIX` `diagnostics.severity` defaulting to "Warning" when run using `--check` [#2730](https://github.com/LuaLS/lua-language-server/issues/2730)
219
+ * `FIX` Respect `completion.showParams` config for local function completion
220
+ * `FIX` Addons can now self-recommend as expected. Fixed by correcting the `wholeMatch` function
221
+ * `FIX` Now correctly evaluates the visibility of fields in a class when they are defined directly in the object. use for completion and invisible dianostic. [#2752](https://github.com/LuaLS/lua-language-server/issues/2752)
222
+ * `FIX` Bad triggering of the `inject-field` diagnostic, when the fields are declared at the creation of the object [#2746](https://github.com/LuaLS/lua-language-server/issues/2746)
223
+ * `FIX` Inconsistent type narrow behavior of function call args [#2758](https://github.com/LuaLS/lua-language-server/issues/2758)
224
+ * `FIX` Improve the `missing-fields` logic to be able to correctly handle classes defined several times [#22770](https://github.com/LuaLS/lua-language-server/pull/2770)
225
+ * `FIX` Typos in annotation descriptions
226
+ * `FIX` incorrect `CompletionItemKind` for postfix snippets [#2773](https://github.com/LuaLS/lua-language-server/pull/2773)
227
+
228
+ ## 3.9.3
229
+ `2024-6-11`
230
+ * `FIX` Sometimes providing incorrect autocompletion when chaining calls
231
+
232
+ ## 3.9.2
233
+ `2024-6-6`
234
+ * `NEW` Reference workspace symbols in comments using `[some text](lua://symbolName)` syntax
235
+ * `FIX` Don't do diagnostics when the workspace is not ready
236
+ * `FIX` Autocompletion for enum values ​​is not available in some cases
237
+
238
+ ## 3.9.1
239
+ `2024-5-14`
240
+ * revert extension runtime
241
+
242
+ ## 3.9.0
243
+ `2024-5-11`
244
+ * `NEW` goto implementation
245
+ * `NEW` narrow the function prototype based on the parameter type
246
+ ```lua
247
+ ---@overload fun(a: boolean): A
248
+ ---@overload fun(a: number): B
249
+ local function f(...) end
250
+
251
+ local r1 = f(true) --> r1 is `A`
252
+ local r2 = f(10) --> r2 is `B`
253
+ ```
254
+
255
+ ## 3.8.3
256
+ `2024-4-23`
257
+ * `FIX` server may crash when the workspace is using a non-English path.
258
+
259
+ ## 3.8.2
260
+ `2024-4-23`
261
+ * This is a fake version only for the new version of VSCode, with a core of 3.8.0.
262
+
263
+ ## 3.8.1
264
+ `2024-4-23`
265
+ * This is a fake version only for the old version of VSCode, with a core of `3.7.4`. Starting from the next minor version, the version requirement for VSCode will be raised to prevent users still using the old version of VSCode from updating to the new version and experiencing compatibility issues.
266
+
267
+ ## 3.8.0
268
+ `2024-4-22`
269
+ * `NEW` supports tuple type (@[lizho])
270
+ ```lua
271
+ ---@type [string, number, boolean]
272
+ local t
273
+
274
+ local x = t[1] --> x is `string`
275
+ local y = t[2] --> y is `number`
276
+ local z = t[3] --> z is `boolean`
277
+ ```
278
+ * `NEW` generic pattern (@[fesily])
279
+ ```lua
280
+ ---@generic T
281
+ ---@param t Cat.`T`
282
+ ---@return T
283
+ local function f(t) end
284
+
285
+ local t = f('Smile') --> t is `Cat.Smile`
286
+ ```
287
+ * `NEW` alias and enums supports attribute `partial`
288
+ ```lua
289
+ ---@alias Animal Cat
290
+
291
+ ---@alias(partial) Animal Dog
292
+
293
+ ---@type Animal
294
+ local animal --> animal is `Cat|Dog` here
295
+ ```
296
+
297
+ ```lua
298
+ ---@enum(key) ErrorCodes
299
+ local codes1 = {
300
+ OK = 0,
301
+ ERROR = 1,
302
+ FATAL = 2,
303
+ }
304
+
305
+ ---@enum(key, partial) ErrorCodes
306
+ local codes2 = {
307
+ WARN = 3,
308
+ INFO = 4,
309
+ }
310
+
311
+ ---@type ErrorCodes
312
+ local code
313
+
314
+ code = 'ERROR' --> OK
315
+ code = 'WARN' --> OK
316
+
317
+ ```
318
+ * `NEW` plugin: add `OnTransFormAst` interface (@[fesily])
319
+ * `NEW` plugin: add `OnNodeCompileFunctionParam` interface (@[fesily])
320
+ * `NEW` plugin: add `ResolveRequire` interface (@[Artem Dzhemesiuk])
321
+ * `NEW` plugin: support multi plugins (@[fesily])
322
+ + setting: `Lua.runtime.plugin` can be `string|string[]`
323
+ + setting: `Lua.runtime.pluginArgs` can be `string[]|table<string, string>`
324
+ * `NEW` CLI: `--doc` add option `--doc_out_path <PATH>` (@[Andreas Matthias])
325
+ * `NEW` CLI: `--doc_update`, update an existing `doc.json` without using `--doc` again (@[Andreas Matthias])
326
+ * `NEW` CLI: `--trust_all_plugins`, this is potentially unsafe for normal use and meant for usage in CI environments only (@[Paul Emmerich])
327
+ * `CHG` CLI: `--check` will run plugins (@[Daniel Farrell])
328
+ * `FIX` diagnostic: `discard-returns` not works in some blocks (@clay-golem)
329
+ * `FIX` rename in library files
330
+
331
+ ## 3.7.4
332
+ `2024-1-5`
333
+ * `FIX` rename to unicode with `Lua.runtime.unicodeName = true`
334
+
335
+ ## 3.7.3
336
+ `2023-11-14`
337
+ * `FIX` can not infer arg type in some cases.
338
+
339
+ ## 3.7.2
340
+ `2023-11-9`
341
+ * `FIX` [#2407]
342
+
343
+ [#2407]: https://github.com/LuaLS/lua-language-server/issues/2407
344
+
345
+ ## 3.7.1
346
+ `2023-11-7`
347
+ * `FIX` [#2299]
348
+ * `FIX` [#2335]
349
+
350
+ [#2299]: https://github.com/LuaLS/lua-language-server/issues/2299
351
+ [#2335]: https://github.com/LuaLS/lua-language-server/issues/2335
352
+
353
+ ## 3.7.0
354
+ `2023-8-24`
355
+ * `NEW` support `---@type` and `--[[@as]]` for return statement
356
+ * `NEW` commandline parameter `--force-accept-workspace`: allowing the use of the root directory or home directory as the workspace
357
+ * `NEW` diagnostic: `inject-field`
358
+ * `NEW` `---@enum` supports attribute `key`
359
+ ```lua
360
+ ---@enum (key) AnimalType
361
+ local enum = {
362
+ Cat = 1,
363
+ Dog = 2,
364
+ }
365
+
366
+ ---@param animal userdata
367
+ ---@param atp AnimalType
368
+ ---@return boolean
369
+ local function isAnimalType(animal, atp)
370
+ return API.isAnimalType(animal, enum[atp])
371
+ end
372
+
373
+ assert(isAnimalType(animal, 'Cat'))
374
+ ```
375
+ * `NEW` `---@class` supports attribute `exact`
376
+ ```lua
377
+ ---@class (exact) Point
378
+ ---@field x number
379
+ ---@field y number
380
+ local m = {}
381
+ m.x = 1 -- OK
382
+ m.y = 2 -- OK
383
+ m.z = 3 -- Warning
384
+ ```
385
+
386
+ * `FIX` wrong hover and signature for method with varargs and overloads
387
+ * `FIX` [#2155]
388
+ * `FIX` [#2224]
389
+ * `FIX` [#2252]
390
+ * `FIX` [#2267]
391
+
392
+ [#2155]: https://github.com/LuaLS/lua-language-server/issues/2155
393
+ [#2224]: https://github.com/LuaLS/lua-language-server/issues/2224
394
+ [#2252]: https://github.com/LuaLS/lua-language-server/issues/2252
395
+ [#2267]: https://github.com/LuaLS/lua-language-server/issues/2267
396
+
397
+ ## 3.6.25
398
+ `2023-7-26`
399
+ * `FIX` [#2214]
400
+
401
+ [#2214]: https://github.com/LuaLS/lua-language-server/issues/2214
402
+
403
+ ## 3.6.24
404
+ `2023-7-21`
405
+ * `NEW` diagnostic: `missing-fields`
406
+ * `FIX` shake of `codeLens`
407
+ * `FIX` [#2145]
408
+
409
+ [#2145]: https://github.com/LuaLS/lua-language-server/issues/2145
410
+
411
+ ## 3.6.23
412
+ `2023-7-7`
413
+ * `CHG` signature: narrow by inputed literal
414
+
415
+ ## 3.6.22
416
+ `2023-6-14`
417
+ * `FIX` [#2038]
418
+ * `FIX` [#2042]
419
+ * `FIX` [#2062]
420
+ * `FIX` [#2083]
421
+ * `FIX` [#2088]
422
+ * `FIX` [#2110]
423
+ * `FIX` [#2129]
424
+
425
+ [#2038]: https://github.com/LuaLS/lua-language-server/issues/2038
426
+ [#2042]: https://github.com/LuaLS/lua-language-server/issues/2042
427
+ [#2062]: https://github.com/LuaLS/lua-language-server/issues/2062
428
+ [#2083]: https://github.com/LuaLS/lua-language-server/issues/2083
429
+ [#2088]: https://github.com/LuaLS/lua-language-server/issues/2088
430
+ [#2110]: https://github.com/LuaLS/lua-language-server/issues/2110
431
+ [#2129]: https://github.com/LuaLS/lua-language-server/issues/2129
432
+
433
+ ## 3.6.21
434
+ `2023-5-24`
435
+ * `FIX` disable ffi plugin
436
+
437
+ ## 3.6.20
438
+ `2023-5-23`
439
+ * `NEW` support connecting by socket with `--socket=PORT`
440
+ * `FIX` [#2113]
441
+
442
+ [#2113]: https://github.com/LuaLS/lua-language-server/issues/2113
443
+
444
+ ## 3.6.19
445
+ `2023-4-26`
446
+ * `FIX` commandline parameter `checklevel` may not work
447
+ * `FIX` [#2036]
448
+ * `FIX` [#2037]
449
+ * `FIX` [#2056]
450
+ * `FIX` [#2077]
451
+ * `FIX` [#2081]
452
+
453
+ [#2036]: https://github.com/LuaLS/lua-language-server/issues/2036
454
+ [#2037]: https://github.com/LuaLS/lua-language-server/issues/2037
455
+ [#2056]: https://github.com/LuaLS/lua-language-server/issues/2056
456
+ [#2077]: https://github.com/LuaLS/lua-language-server/issues/2077
457
+ [#2081]: https://github.com/LuaLS/lua-language-server/issues/2081
458
+
459
+ ## 3.6.18
460
+ `2023-3-23`
461
+ * `FIX` [#1943]
462
+ * `FIX` [#1996]
463
+ * `FIX` [#2004]
464
+ * `FIX` [#2013]
465
+
466
+ [#1943]: https://github.com/LuaLS/lua-language-server/issues/1943
467
+ [#1996]: https://github.com/LuaLS/lua-language-server/issues/1996
468
+ [#2004]: https://github.com/LuaLS/lua-language-server/issues/2004
469
+ [#2013]: https://github.com/LuaLS/lua-language-server/issues/2013
470
+
471
+ ## 3.6.17
472
+ `2023-3-9`
473
+ * `CHG` export documents: export global variables
474
+ * `FIX` [#1715]
475
+ * `FIX` [#1753]
476
+ * `FIX` [#1914]
477
+ * `FIX` [#1922]
478
+ * `FIX` [#1924]
479
+ * `FIX` [#1928]
480
+ * `FIX` [#1945]
481
+ * `FIX` [#1955]
482
+ * `FIX` [#1978]
483
+
484
+ [#1715]: https://github.com/LuaLS/lua-language-server/issues/1715
485
+ [#1753]: https://github.com/LuaLS/lua-language-server/issues/1753
486
+ [#1914]: https://github.com/LuaLS/lua-language-server/issues/1914
487
+ [#1922]: https://github.com/LuaLS/lua-language-server/issues/1922
488
+ [#1924]: https://github.com/LuaLS/lua-language-server/issues/1924
489
+ [#1928]: https://github.com/LuaLS/lua-language-server/issues/1928
490
+ [#1945]: https://github.com/LuaLS/lua-language-server/issues/1945
491
+ [#1955]: https://github.com/LuaLS/lua-language-server/issues/1955
492
+ [#1978]: https://github.com/LuaLS/lua-language-server/issues/1978
493
+
494
+ ## 3.6.13
495
+ `2023-3-2`
496
+ * `FIX` setting: `Lua.addonManager.enable` should be `true` by default
497
+ * `FIX` failed to publish to Windows
498
+
499
+ ## 3.6.12
500
+ `2023-3-2`
501
+ * `NEW` [Addon Manager](https://github.com/LuaLS/lua-language-server/discussions/1607), try it with command `lua.addon_manager.open`. Thanks to [carsakiller](https://github.com/carsakiller)!
502
+
503
+ ## 3.6.11
504
+ `2023-2-13`
505
+ * `CHG` completion: don't show loading process
506
+ * `FIX` [#1886]
507
+ * `FIX` [#1887]
508
+ * `FIX` [#1889]
509
+ * `FIX` [#1895]
510
+ * `FIX` [#1902]
511
+
512
+ [#1886]: https://github.com/LuaLS/lua-language-server/issues/1886
513
+ [#1887]: https://github.com/LuaLS/lua-language-server/issues/1887
514
+ [#1889]: https://github.com/LuaLS/lua-language-server/issues/1889
515
+ [#1895]: https://github.com/LuaLS/lua-language-server/issues/1895
516
+ [#1902]: https://github.com/LuaLS/lua-language-server/issues/1902
517
+
518
+ ## 3.6.10
519
+ `2023-2-7`
520
+ * `FIX` [#1869]
521
+ * `FIX` [#1872]
522
+
523
+ [#1869]: https://github.com/LuaLS/lua-language-server/issues/1869
524
+ [#1872]: https://github.com/LuaLS/lua-language-server/issues/1872
525
+
526
+ ## 3.6.9
527
+ `2023-2-2`
528
+ * `FIX` [#1864]
529
+ * `FIX` [#1868]
530
+ * `FIX` [#1869]
531
+ * `FIX` [#1871]
532
+
533
+ [#1864]: https://github.com/LuaLS/lua-language-server/issues/1864
534
+ [#1868]: https://github.com/LuaLS/lua-language-server/issues/1868
535
+ [#1869]: https://github.com/LuaLS/lua-language-server/issues/1869
536
+ [#1871]: https://github.com/LuaLS/lua-language-server/issues/1871
537
+
538
+ ## 3.6.8
539
+ `2023-1-31`
540
+ * `NEW` command `lua.exportDocument` . VSCode will display this command in the right-click menu
541
+ * `CHG` setting `Lua.workspace.supportScheme` has been removed. All schemes are supported if the language id is `lua`
542
+ * `FIX` [#1831]
543
+ * `FIX` [#1838]
544
+ * `FIX` [#1841]
545
+ * `FIX` [#1851]
546
+ * `FIX` [#1855]
547
+ * `FIX` [#1857]
548
+
549
+ [#1831]: https://github.com/LuaLS/lua-language-server/issues/1831
550
+ [#1838]: https://github.com/LuaLS/lua-language-server/issues/1838
551
+ [#1841]: https://github.com/LuaLS/lua-language-server/issues/1841
552
+ [#1851]: https://github.com/LuaLS/lua-language-server/issues/1851
553
+ [#1855]: https://github.com/LuaLS/lua-language-server/issues/1855
554
+ [#1857]: https://github.com/LuaLS/lua-language-server/issues/1857
555
+
556
+ ## 3.6.7
557
+ `2023-1-20`
558
+ * `FIX` [#1810]
559
+ * `FIX` [#1829]
560
+
561
+ [#1810]: https://github.com/LuaLS/lua-language-server/issues/1810
562
+ [#1829]: https://github.com/LuaLS/lua-language-server/issues/1829
563
+
564
+ ## 3.6.6
565
+ `2023-1-17`
566
+ * `FIX` [#1825]
567
+ * `FIX` [#1826]
568
+
569
+ [#1825]: https://github.com/LuaLS/lua-language-server/issues/1825
570
+ [#1826]: https://github.com/LuaLS/lua-language-server/issues/1826
571
+
572
+ ## 3.6.5
573
+ `2023-1-16`
574
+ * `NEW` support casting global variables
575
+ * `NEW` code lens: this feature is disabled by default.
576
+ * `NEW` settings:
577
+ * `Lua.codeLens.enable`: Enable code lens.
578
+ * `CHG` improve memory usage for large libraries
579
+ * `CHG` definition: supports finding definitions for `@class` and `@alias`, since they may be defined multi times
580
+ * `CHG` rename: supports `@field`
581
+ * `CHG` improve patch for `.luarc.json`
582
+ * `CHG` `---@meta [name]`: once declared `name`, user can only require this file by declared name. meta file can not be required with name `_`
583
+ * `CHG` remove telemetry
584
+ * `FIX` [#831]
585
+ * `FIX` [#1729]
586
+ * `FIX` [#1737]
587
+ * `FIX` [#1751]
588
+ * `FIX` [#1767]
589
+ * `FIX` [#1796]
590
+ * `FIX` [#1805]
591
+ * `FIX` [#1808]
592
+ * `FIX` [#1811]
593
+ * `FIX` [#1824]
594
+
595
+ [#831]: https://github.com/LuaLS/lua-language-server/issues/831
596
+ [#1729]: https://github.com/LuaLS/lua-language-server/issues/1729
597
+ [#1737]: https://github.com/LuaLS/lua-language-server/issues/1737
598
+ [#1751]: https://github.com/LuaLS/lua-language-server/issues/1751
599
+ [#1767]: https://github.com/LuaLS/lua-language-server/issues/1767
600
+ [#1796]: https://github.com/LuaLS/lua-language-server/issues/1796
601
+ [#1805]: https://github.com/LuaLS/lua-language-server/issues/1805
602
+ [#1808]: https://github.com/LuaLS/lua-language-server/issues/1808
603
+ [#1811]: https://github.com/LuaLS/lua-language-server/issues/1811
604
+ [#1824]: https://github.com/LuaLS/lua-language-server/issues/1824
605
+
606
+ ## 3.6.4
607
+ `2022-11-29`
608
+ * `NEW` modify `require` after renaming files
609
+ * `FIX` circulation reference in process analysis
610
+ ```lua
611
+ ---@type number
612
+ local x
613
+
614
+ ---@type number
615
+ local y
616
+
617
+ x = y
618
+
619
+ y = x --> Can not infer `y` before
620
+ ```
621
+ * `FIX` [#1698]
622
+ * `FIX` [#1704]
623
+ * `FIX` [#1717]
624
+
625
+ [#1698]: https://github.com/LuaLS/lua-language-server/issues/1698
626
+ [#1704]: https://github.com/LuaLS/lua-language-server/issues/1704
627
+ [#1717]: https://github.com/LuaLS/lua-language-server/issues/1717
628
+
629
+ ## 3.6.3
630
+ `2022-11-14`
631
+ * `FIX` [#1684]
632
+ * `FIX` [#1692]
633
+
634
+ [#1684]: https://github.com/LuaLS/lua-language-server/issues/1684
635
+ [#1692]: https://github.com/LuaLS/lua-language-server/issues/1692
636
+
637
+ ## 3.6.2
638
+ `2022-11-10`
639
+ * `FIX` incorrect type check for generic with nil
640
+ * `FIX` [#1676]
641
+ * `FIX` [#1677]
642
+ * `FIX` [#1679]
643
+ * `FIX` [#1680]
644
+
645
+ [#1676]: https://github.com/LuaLS/lua-language-server/issues/1676
646
+ [#1677]: https://github.com/LuaLS/lua-language-server/issues/1677
647
+ [#1679]: https://github.com/LuaLS/lua-language-server/issues/1679
648
+ [#1680]: https://github.com/LuaLS/lua-language-server/issues/1680
649
+
650
+ ## 3.6.1
651
+ `2022-11-8`
652
+ * `FIX` wrong diagnostics for `pcall` and `xpcall`
653
+ * `FIX` duplicate fields in table hover
654
+ * `FIX` description disapeared for overloaded function
655
+ * `FIX` [#1675]
656
+
657
+ [#1675]: https://github.com/LuaLS/lua-language-server/issues/1675
658
+
659
+ ## 3.6.0
660
+ `2022-11-8`
661
+ * `NEW` supports `private`/`protected`/`public`/`package`
662
+ * mark in `doc.field`
663
+ ```lua
664
+ ---@class unit
665
+ ---@field private uuid integer
666
+ ```
667
+ * mark with `---@private`, `---@protected`, `---@public` and `---@package`
668
+ ```lua
669
+ ---@class unit
670
+ local mt = {}
671
+
672
+ ---@private
673
+ function mt:init()
674
+ end
675
+
676
+ ---@protected
677
+ function mt:update()
678
+ end
679
+ ```
680
+ * mark by settings `Lua.doc.privateName`, `Lua.doc.protectedName` and `Lua.doc.packageName`
681
+ ```lua
682
+ ---@class unit
683
+ ---@field _uuid integer --> treat as private when `Lua.doc.privateName` has `"_*"`
684
+ ```
685
+ * `NEW` settings:
686
+ * `Lua.misc.executablePath`: [#1557] specify the executable path in VSCode
687
+ * `Lua.diagnostics.workspaceEvent`: [#1626] set the time to trigger workspace diagnostics.
688
+ * `Lua.doc.privateName`: treat matched fields as private
689
+ * `Lua.doc.protectedName`: treat matched fields as protected
690
+ * `Lua.doc.packageName`: treat matched fields as package
691
+ * `NEW` CLI `--doc [path]` to make docs.
692
+ server will generate `doc.json` and `doc.md` in `LOGPATH`.
693
+ `doc.md` is generated by `doc.json` by example code `script/cli/doc2md.lua`.
694
+ * `CHG` [#1558] detect multi libraries
695
+ * `CHG` [#1458] `semantic-tokens`: global variable is setted to `variable.global`
696
+ ```jsonc
697
+ // color global variables to red
698
+ "editor.semanticTokenColorCustomizations": {
699
+ "rules": {
700
+ "variable.global": "#ff0000"
701
+ }
702
+ }
703
+ ```
704
+ * `CHG` [#1177] re-support for symlinks, users need to maintain the correctness of symlinks themselves
705
+ * `CHG` [#1561] infer definitions and types across chain expression
706
+ ```lua
707
+ ---@class myClass
708
+ local myClass = {}
709
+
710
+ myClass.a.b.c.e.f.g = 1
711
+
712
+ ---@type myClass
713
+ local class
714
+
715
+ print(class.a.b.c.e.f.g) --> inferred as integer
716
+ ```
717
+ * `CHG` [#1582] the following diagnostics consider `overload`
718
+ * `missing-return`
719
+ * `missing-return-value`
720
+ * `redundant-return-value`
721
+ * `return-type-mismatch`
722
+ * `CHG` workspace-symbol: supports chain fields based on global variables and types. try `io.open` or `iolib.open`
723
+ * `CHG` [#1641] if a function only has varargs and has `---@overload`, the varargs will be ignored
724
+ * `CHG` [#1575] search definitions by first argument of `setmetatable`
725
+ ```lua
726
+ ---@class Object
727
+ local obj = setmetatable({
728
+ initValue = 1,
729
+ }, mt)
730
+
731
+ print(obj.initValue) --> `obj.initValue` is integer
732
+ ```
733
+ * `CHG` [#1153] infer type by generic parameters or returns of function
734
+ ```lua
735
+ ---@generic T
736
+ ---@param f fun(x: T)
737
+ ---@return T[]
738
+ local function x(f) end
739
+
740
+ ---@type fun(x: integer)
741
+ local cb
742
+
743
+ local arr = x(cb) --> `arr` is inferred as `integer[]`
744
+ ```
745
+ * `CHG` [#1201] infer parameter type by expected returned function of parent function
746
+ ```lua
747
+ ---@return fun(x: integer)
748
+ local function f()
749
+ return function (x) --> `x` is inferred as `integer`
750
+ end
751
+ end
752
+ ```
753
+ * `CHG` [#1332] infer parameter type when function in table
754
+ ```lua
755
+ ---@class A
756
+ ---@field f fun(x: string)
757
+
758
+ ---@type A
759
+ local t = {
760
+ f = function (x) end --> `x` is inferred as `string`
761
+ }
762
+ ```
763
+ * `CHG` find reference: respect `includeDeclaration` (although I don't know how to turn off this option in VSCode)
764
+ * `CHG` [#1344] improve `---@see`
765
+ * `CHG` [#1484] setting `runtime.special` supports fields
766
+ ```jsonc
767
+ {
768
+ "runtime.special": {
769
+ "sandbox.require": "require"
770
+ }
771
+ }
772
+ ```
773
+ * `CHG` [#1533] supports completion with table field of function
774
+ * `CHG` [#1457] infer parameter type by function type
775
+ ```lua
776
+ ---@type fun(x: number)
777
+ local function f(x) --> `x` is inferred as `number`
778
+ end
779
+ ```
780
+ * `CHG` [#1663] check parameter types of generic extends
781
+ ```lua
782
+ ---@generic T: string | boolean
783
+ ---@param x T
784
+ ---@return T
785
+ local function f(x)
786
+ return x
787
+ end
788
+
789
+ local x = f(1) --> Warning: Cannot assign `integer` to parameter `<T:boolean|string>`.
790
+ ```
791
+ * `CHG` [#1434] type check: check the fields in table:
792
+ ```lua
793
+ ---@type table<string, string>
794
+ local x
795
+
796
+ ---@type table<string, number>
797
+ local y
798
+
799
+ x = y --> Warning: Cannot assign `<string, number>` to `<string, string>`
800
+ ```
801
+ * `CHG` [#1374] type check: supports array part in literal table
802
+ ```lua
803
+ ---@type boolean[]
804
+ local t = { 1, 2, 3 } --> Warning: Cannot assign `integer` to `boolean`
805
+ ```
806
+ * `CHG` `---@enum` supports runtime values
807
+ * `FIX` [#1479]
808
+ * `FIX` [#1480]
809
+ * `FIX` [#1567]
810
+ * `FIX` [#1593]
811
+ * `FIX` [#1595]
812
+ * `FIX` [#1599]
813
+ * `FIX` [#1606]
814
+ * `FIX` [#1608]
815
+ * `FIX` [#1637]
816
+ * `FIX` [#1640]
817
+ * `FIX` [#1642]
818
+ * `FIX` [#1662]
819
+ * `FIX` [#1672]
820
+
821
+ [#1153]: https://github.com/LuaLS/lua-language-server/issues/1153
822
+ [#1177]: https://github.com/LuaLS/lua-language-server/issues/1177
823
+ [#1201]: https://github.com/LuaLS/lua-language-server/issues/1201
824
+ [#1202]: https://github.com/LuaLS/lua-language-server/issues/1202
825
+ [#1332]: https://github.com/LuaLS/lua-language-server/issues/1332
826
+ [#1344]: https://github.com/LuaLS/lua-language-server/issues/1344
827
+ [#1374]: https://github.com/LuaLS/lua-language-server/issues/1374
828
+ [#1434]: https://github.com/LuaLS/lua-language-server/issues/1434
829
+ [#1457]: https://github.com/LuaLS/lua-language-server/issues/1457
830
+ [#1458]: https://github.com/LuaLS/lua-language-server/issues/1458
831
+ [#1479]: https://github.com/LuaLS/lua-language-server/issues/1479
832
+ [#1480]: https://github.com/LuaLS/lua-language-server/issues/1480
833
+ [#1484]: https://github.com/LuaLS/lua-language-server/issues/1484
834
+ [#1533]: https://github.com/LuaLS/lua-language-server/issues/1533
835
+ [#1557]: https://github.com/LuaLS/lua-language-server/issues/1557
836
+ [#1558]: https://github.com/LuaLS/lua-language-server/issues/1558
837
+ [#1561]: https://github.com/LuaLS/lua-language-server/issues/1561
838
+ [#1567]: https://github.com/LuaLS/lua-language-server/issues/1567
839
+ [#1575]: https://github.com/LuaLS/lua-language-server/issues/1575
840
+ [#1582]: https://github.com/LuaLS/lua-language-server/issues/1582
841
+ [#1593]: https://github.com/LuaLS/lua-language-server/issues/1593
842
+ [#1595]: https://github.com/LuaLS/lua-language-server/issues/1595
843
+ [#1599]: https://github.com/LuaLS/lua-language-server/issues/1599
844
+ [#1606]: https://github.com/LuaLS/lua-language-server/issues/1606
845
+ [#1608]: https://github.com/LuaLS/lua-language-server/issues/1608
846
+ [#1626]: https://github.com/LuaLS/lua-language-server/issues/1626
847
+ [#1637]: https://github.com/LuaLS/lua-language-server/issues/1637
848
+ [#1640]: https://github.com/LuaLS/lua-language-server/issues/1640
849
+ [#1641]: https://github.com/LuaLS/lua-language-server/issues/1641
850
+ [#1642]: https://github.com/LuaLS/lua-language-server/issues/1642
851
+ [#1662]: https://github.com/LuaLS/lua-language-server/issues/1662
852
+ [#1663]: https://github.com/LuaLS/lua-language-server/issues/1663
853
+ [#1670]: https://github.com/LuaLS/lua-language-server/issues/1670
854
+ [#1672]: https://github.com/LuaLS/lua-language-server/issues/1672
855
+
856
+ ## 3.5.6
857
+ `2022-9-16`
858
+ * `FIX` [#1439](https://github.com/LuaLS/lua-language-server/issues/1439)
859
+ * `FIX` [#1467](https://github.com/LuaLS/lua-language-server/issues/1467)
860
+ * `FIX` [#1506](https://github.com/LuaLS/lua-language-server/issues/1506)
861
+ * `FIX` [#1537](https://github.com/LuaLS/lua-language-server/issues/1537)
862
+
863
+ ## 3.5.5
864
+ `2022-9-7`
865
+ * `FIX` [#1529](https://github.com/LuaLS/lua-language-server/issues/1529)
866
+ * `FIX` [#1530](https://github.com/LuaLS/lua-language-server/issues/1530)
867
+
868
+ ## 3.5.4
869
+ `2022-9-6`
870
+ * `NEW` `type-formatting`: fix wrong indentation of VSCode
871
+ * `CHG` `document-symbol`: redesigned to better support for `Sticky Scroll` feature of VSCode
872
+ * `FIX` `diagnostics.workspaceDelay` can not prevent first workspace diagnostic
873
+ * `FIX` [#1476](https://github.com/LuaLS/lua-language-server/issues/1476)
874
+ * `FIX` [#1490](https://github.com/LuaLS/lua-language-server/issues/1490)
875
+ * `FIX` [#1493](https://github.com/LuaLS/lua-language-server/issues/1493)
876
+ * `FIX` [#1499](https://github.com/LuaLS/lua-language-server/issues/1499)
877
+ * `FIX` [#1526](https://github.com/LuaLS/lua-language-server/issues/1526)
878
+
879
+ ## 3.5.3
880
+ `2022-8-13`
881
+ * `FIX` [#1409](https://github.com/LuaLS/lua-language-server/issues/1409)
882
+ * `FIX` [#1422](https://github.com/LuaLS/lua-language-server/issues/1422)
883
+ * `FIX` [#1425](https://github.com/LuaLS/lua-language-server/issues/1425)
884
+ * `FIX` [#1428](https://github.com/LuaLS/lua-language-server/issues/1428)
885
+ * `FIX` [#1430](https://github.com/LuaLS/lua-language-server/issues/1430)
886
+ * `FIX` [#1431](https://github.com/LuaLS/lua-language-server/issues/1431)
887
+ * `FIX` [#1446](https://github.com/LuaLS/lua-language-server/issues/1446)
888
+ * `FIX` [#1451](https://github.com/LuaLS/lua-language-server/issues/1451)
889
+ * `FIX` [#1461](https://github.com/LuaLS/lua-language-server/issues/1461)
890
+ * `FIX` [#1463](https://github.com/LuaLS/lua-language-server/issues/1463)
891
+
892
+ ## 3.5.2
893
+ `2022-8-1`
894
+ * `FIX` [#1395](https://github.com/LuaLS/lua-language-server/issues/1395)
895
+ * `FIX` [#1403](https://github.com/LuaLS/lua-language-server/issues/1403)
896
+ * `FIX` [#1405](https://github.com/LuaLS/lua-language-server/issues/1405)
897
+ * `FIX` [#1406](https://github.com/LuaLS/lua-language-server/issues/1406)
898
+ * `FIX` [#1418](https://github.com/LuaLS/lua-language-server/issues/1418)
899
+
900
+ ## 3.5.1
901
+ `2022-7-26`
902
+ * `NEW` supports [color](https://github.com/LuaLS/lua-language-server/pull/1379)
903
+ * `NEW` setting `Lua.runtime.pluginArgs`
904
+ * `CHG` setting `type.castNumberToInteger` default by `true`
905
+ * `CHG` improve supports for multi-workspace
906
+ * `FIX` [#1354](https://github.com/LuaLS/lua-language-server/issues/1354)
907
+ * `FIX` [#1355](https://github.com/LuaLS/lua-language-server/issues/1355)
908
+ * `FIX` [#1363](https://github.com/LuaLS/lua-language-server/issues/1363)
909
+ * `FIX` [#1365](https://github.com/LuaLS/lua-language-server/issues/1365)
910
+ * `FIX` [#1367](https://github.com/LuaLS/lua-language-server/issues/1367)
911
+ * `FIX` [#1368](https://github.com/LuaLS/lua-language-server/issues/1368)
912
+ * `FIX` [#1370](https://github.com/LuaLS/lua-language-server/issues/1370)
913
+ * `FIX` [#1375](https://github.com/LuaLS/lua-language-server/issues/1375)
914
+ * `FIX` [#1391](https://github.com/LuaLS/lua-language-server/issues/1391)
915
+
916
+ ## 3.5.0
917
+ `2022-7-19`
918
+ * `NEW` `LuaDoc`: `---@operator`:
919
+ ```lua
920
+ ---@class fspath
921
+ ---@operator div(string|fspath): fspath
922
+
923
+ ---@type fspath
924
+ local root
925
+
926
+ local fileName = root / 'script' / 'main.lua' -- `fileName` is `fspath` here
927
+ ```
928
+ * `NEW` `LuaDoc`: `---@source`:
929
+ ```lua
930
+ -- Also supports absolute path or relative path (based on current file path)
931
+ ---@source file:///xxx.c:50:20
932
+ XXX = 1 -- when finding definitions of `XXX`, returns `file:///xxx.c:50:20` instead here.
933
+ ```
934
+ * `NEW` `LuaDoc`: `---@enum`:
935
+ ```lua
936
+ ---@enum animal
937
+ Animal = {
938
+ Cat = 1,
939
+ Dog = 2,
940
+ }
941
+
942
+ ---@param x animal
943
+ local function f(x) end
944
+
945
+ f() -- suggests `Animal.Cat`, `Animal.Dog`, `1`, `2` as the first parameter
946
+ ```
947
+ * `NEW` diagnostics:
948
+ * `unknown-operator`
949
+ * `unreachable-code`
950
+ * `NEW` settings:
951
+ * `diagnostics.unusedLocalExclude`
952
+ * `NEW` VSCode: add support for [EmmyLuaUnity](https://marketplace.visualstudio.com/items?itemName=CppCXY.emmylua-unity)
953
+ * `CHG` support multi-type:
954
+ ```lua
955
+ ---@type number, _, boolean
956
+ local a, b, c -- `a` is `number`, `b` is `unknown`, `c` is `boolean`
957
+ ```
958
+ * `CHG` treat `_ENV = XXX` as `local _ENV = XXX`
959
+ * `_ENV = nil`: disable all globals
960
+ * `_ENV = {}`: allow all globals
961
+ * `_ENV = {} ---@type mathlib`: only allow globals in `mathlib`
962
+ * `CHG` hover: dose not show unknown `---@XXX` as description
963
+ * `CHG` contravariance is allowed at the class declaration
964
+ ```lua
965
+ ---@class BaseClass
966
+ local BaseClass
967
+
968
+ ---@class MyClass: BaseClass
969
+ local MyClass = BaseClass -- OK!
970
+ ```
971
+ * `CHG` hover: supports path in link
972
+ ```lua
973
+ --![](https://github.com/LuaLS/lua-language-server/raw/HEAD/image.png) --> will convert to `--![](file:///xxxx/image.png)`
974
+ local x
975
+ ```
976
+ * `CHG` signature: only show signatures matching the entered parameters
977
+ * `FIX` [#880](https://github.com/LuaLS/lua-language-server/issues/880)
978
+ * `FIX` [#1284](https://github.com/LuaLS/lua-language-server/issues/1284)
979
+ * `FIX` [#1292](https://github.com/LuaLS/lua-language-server/issues/1292)
980
+ * `FIX` [#1294](https://github.com/LuaLS/lua-language-server/issues/1294)
981
+ * `FIX` [#1306](https://github.com/LuaLS/lua-language-server/issues/1306)
982
+ * `FIX` [#1311](https://github.com/LuaLS/lua-language-server/issues/1311)
983
+ * `FIX` [#1317](https://github.com/LuaLS/lua-language-server/issues/1317)
984
+ * `FIX` [#1320](https://github.com/LuaLS/lua-language-server/issues/1320)
985
+ * `FIX` [#1330](https://github.com/LuaLS/lua-language-server/issues/1330)
986
+ * `FIX` [#1345](https://github.com/LuaLS/lua-language-server/issues/1345)
987
+ * `FIX` [#1346](https://github.com/LuaLS/lua-language-server/issues/1346)
988
+ * `FIX` [#1348](https://github.com/LuaLS/lua-language-server/issues/1348)
989
+
990
+ ## 3.4.2
991
+ `2022-7-6`
992
+ * `CHG` diagnostic: `type-check` ignores `nil` in `getfield`
993
+ * `CHG` diagnostic: `---@diagnostic disable: <ERR_NAME>` can suppress syntax errors
994
+ * `CHG` completion: `completion.callSnippet` no longer generate parameter types
995
+ * `CHG` hover: show `---@type {x: number, y: number}` as detail instead of `table`
996
+ * `CHG` dose not infer as `nil` by `t.field = nil`
997
+ * `FIX` [#1278](https://github.com/LuaLS/lua-language-server/issues/1278)
998
+ * `FIX` [#1288](https://github.com/LuaLS/lua-language-server/issues/1288)
999
+
1000
+ ## 3.4.1
1001
+ `2022-7-5`
1002
+ * `NEW` settings:
1003
+ * `type.weakNilCheck`
1004
+ * `CHG` allow type contravariance for `setmetatable` when initializing a class
1005
+ ```lua
1006
+ ---@class A
1007
+ local a = {}
1008
+
1009
+ ---@class B: A
1010
+ local b = setmetatable({}, { __index = a }) -- OK!
1011
+ ```
1012
+ * `FIX` [#1256](https://github.com/LuaLS/lua-language-server/issues/1256)
1013
+ * `FIX` [#1257](https://github.com/LuaLS/lua-language-server/issues/1257)
1014
+ * `FIX` [#1267](https://github.com/LuaLS/lua-language-server/issues/1267)
1015
+ * `FIX` [#1269](https://github.com/LuaLS/lua-language-server/issues/1269)
1016
+ * `FIX` [#1273](https://github.com/LuaLS/lua-language-server/issues/1273)
1017
+ * `FIX` [#1275](https://github.com/LuaLS/lua-language-server/issues/1275)
1018
+ * `FIX` [#1279](https://github.com/LuaLS/lua-language-server/issues/1279)
1019
+
1020
+ ## 3.4.0
1021
+ `2022-6-29`
1022
+ * `NEW` diagnostics:
1023
+ * `cast-local-type`
1024
+ * `assign-type-mismatch`
1025
+ * `param-type-mismatch`
1026
+ * `unknown-cast-variable`
1027
+ * `cast-type-mismatch`
1028
+ * `missing-return-value`
1029
+ * `redundant-return-value`
1030
+ * `missing-return`
1031
+ * `return-type-mismatch`
1032
+ * `NEW` settings:
1033
+ * `diagnostics.groupSeverity`
1034
+ * `diagnostics.groupFileStatus`
1035
+ * `type.castNumberToInteger`
1036
+ * `type.weakUnionCheck`
1037
+ * `hint.semicolon`
1038
+ * `CHG` infer `nil` as redundant return value
1039
+ ```lua
1040
+ local function f() end
1041
+ local x = f() -- `x` is `nil` instead of `unknown`
1042
+ ```
1043
+ * `CHG` infer called function by params num
1044
+ ```lua
1045
+ ---@overload fun(x: number, y: number):string
1046
+ ---@overload fun(x: number):number
1047
+ ---@return boolean
1048
+ local function f() end
1049
+
1050
+ local n1 = f() -- `n1` is `boolean`
1051
+ local n2 = f(0) -- `n2` is `number`
1052
+ local n3 = f(0, 0) -- `n3` is `string`
1053
+ ```
1054
+ * `CHG` semicolons and parentheses can be used in `DocTable`
1055
+ ```lua
1056
+ ---@type { (x: number); (y: boolean) }
1057
+ ```
1058
+ * `CHG` return names and parentheses can be used in `DocFunction`
1059
+ ```lua
1060
+ ---@type fun():(x: number, y: number, ...: number)
1061
+ ```
1062
+ * `CHG` supports `---@return boolean ...`
1063
+ * `CHG` improve experience for diagnostics and semantic-tokens
1064
+ * `FIX` diagnostics flash when opening a file
1065
+ * `FIX` sometimes workspace diagnostics are not triggered
1066
+ * `FIX` [#1228](https://github.com/LuaLS/lua-language-server/issues/1228)
1067
+ * `FIX` [#1229](https://github.com/LuaLS/lua-language-server/issues/1229)
1068
+ * `FIX` [#1242](https://github.com/LuaLS/lua-language-server/issues/1242)
1069
+ * `FIX` [#1243](https://github.com/LuaLS/lua-language-server/issues/1243)
1070
+ * `FIX` [#1249](https://github.com/LuaLS/lua-language-server/issues/1249)
1071
+
1072
+ ## 3.3.1
1073
+ `2022-6-17`
1074
+ * `FIX` [#1213](https://github.com/LuaLS/lua-language-server/issues/1213)
1075
+ * `FIX` [#1215](https://github.com/LuaLS/lua-language-server/issues/1215)
1076
+ * `FIX` [#1217](https://github.com/LuaLS/lua-language-server/issues/1217)
1077
+ * `FIX` [#1218](https://github.com/LuaLS/lua-language-server/issues/1218)
1078
+ * `FIX` [#1220](https://github.com/LuaLS/lua-language-server/issues/1220)
1079
+ * `FIX` [#1223](https://github.com/LuaLS/lua-language-server/issues/1223)
1080
+
1081
+ ## 3.3.0
1082
+ `2022-6-15`
1083
+ * `NEW` `LuaDoc` supports `` `CODE` ``
1084
+ ```lua
1085
+ ---@type `CONST.X` | `CONST.Y`
1086
+ local x
1087
+
1088
+ if x == -- suggest `CONST.X` and `CONST.Y` here
1089
+ ```
1090
+ * `CHG` infer type by `error`
1091
+ ```lua
1092
+ ---@type integer|nil
1093
+ local n
1094
+
1095
+ if not n then
1096
+ error('n is nil')
1097
+ end
1098
+
1099
+ print(n) -- `n` is `integer` here
1100
+ ```
1101
+ * `CHG` infer type by `t and t.x`
1102
+ ```lua
1103
+ ---@type table|nil
1104
+ local t
1105
+
1106
+ local s = t and t.x or 1 -- `t` in `t.x` is `table`
1107
+ ```
1108
+ * `CHG` infer type by `type(x)`
1109
+ ```lua
1110
+ local x
1111
+
1112
+ if type(x) == 'string' then
1113
+ print(x) -- `x` is `string` here
1114
+ end
1115
+
1116
+ local tp = type(x)
1117
+
1118
+ if tp == 'boolean' then
1119
+ print(x) -- `x` is `boolean` here
1120
+ end
1121
+ ```
1122
+ * `CHG` infer type by `>`/`<`/`>=`/`<=`
1123
+ * `FIX` with clients that support LSP 3.17 (VSCode), workspace diagnostics are triggered every time when opening a file.
1124
+ * `FIX` [#1204](https://github.com/LuaLS/lua-language-server/issues/1204)
1125
+ * `FIX` [#1208](https://github.com/LuaLS/lua-language-server/issues/1208)
1126
+
1127
+ ## 3.2.5
1128
+ `2022-6-9`
1129
+ * `NEW` provide config docs in `LUA_LANGUAGE_SERVER/doc/`
1130
+ * `FIX` [#1148](https://github.com/LuaLS/lua-language-server/issues/1148)
1131
+ * `FIX` [#1149](https://github.com/LuaLS/lua-language-server/issues/1149)
1132
+ * `FIX` [#1192](https://github.com/LuaLS/lua-language-server/issues/1192)
1133
+
1134
+ ## 3.2.4
1135
+ `2022-5-25`
1136
+ * `NEW` settings:
1137
+ + `workspace.supportScheme`: `["file", "untitled", "git"]`
1138
+ + `diagnostics.disableScheme`: `["git"]`
1139
+ * `NEW` folding: support folding `---@alias`
1140
+ * `CHG` if `rootUri` or `workspaceFolder` is set to `ROOT` or `HOME`, this extension will refuse to load these directories and show an error message.
1141
+ * `CHG` show warning message when scanning more than 100,000 files.
1142
+ * `CHG` upgrade [LSP](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/) to `3.17`
1143
+ * `FIX` hover: can not union `table` with other basic types
1144
+ * `FIX` [#1125](https://github.com/LuaLS/lua-language-server/issues/1125)
1145
+ * `FIX` [#1131](https://github.com/LuaLS/lua-language-server/issues/1131)
1146
+ * `FIX` [#1134](https://github.com/LuaLS/lua-language-server/issues/1134)
1147
+ * `FIX` [#1141](https://github.com/LuaLS/lua-language-server/issues/1141)
1148
+ * `FIX` [#1144](https://github.com/LuaLS/lua-language-server/issues/1144)
1149
+ * `FIX` [#1150](https://github.com/LuaLS/lua-language-server/issues/1150)
1150
+ * `FIX` [#1155](https://github.com/LuaLS/lua-language-server/issues/1155)
1151
+
1152
+ ## 3.2.3
1153
+ `2022-5-16`
1154
+ * `CHG` parse `.luarc.json` as jsonc. In order to please the editor, it also supports `.luarc.jsonc` as the file name.
1155
+ * `CHG` dose not load files in symbol links
1156
+ * `FIX` memory leak with symbol links
1157
+ * `FIX` diagnostic: send empty results to every file after startup
1158
+ * `FIX` [#1103](https://github.com/LuaLS/lua-language-server/issues/1103)
1159
+ * `FIX` [#1107](https://github.com/LuaLS/lua-language-server/issues/1107)
1160
+
1161
+ ## 3.2.2
1162
+ `2022-4-26`
1163
+ * `FIX` diagnostic: `unused-function` cannot handle recursion correctly
1164
+ * `FIX` [#1092](https://github.com/LuaLS/lua-language-server/issues/1092)
1165
+ * `FIX` [#1093](https://github.com/LuaLS/lua-language-server/issues/1093)
1166
+ * `FIX` runtime errors reported by telemetry, see [#1091](https://github.com/LuaLS/lua-language-server/issues/1091)
1167
+
1168
+ ## 3.2.1
1169
+ `2022-4-25`
1170
+ * `FIX` broken in VSCode
1171
+
1172
+ ## 3.2.0
1173
+ `2022-4-25`
1174
+ * `NEW` supports infer of callback parameter
1175
+ ```lua
1176
+ ---@type string[]
1177
+ local t
1178
+
1179
+ table.sort(t, function (a, b)
1180
+ -- `a` and `b` is `string` here
1181
+ end)
1182
+ ```
1183
+ * `NEW` using `---@overload` as class constructor
1184
+ ```lua
1185
+ ---@class Class
1186
+ ---@overload fun():Class
1187
+ local mt
1188
+
1189
+ local x = mt() --> x is `Class` here
1190
+ ```
1191
+ * `NEW` add `--[[@as type]]`
1192
+ ```lua
1193
+ local x = true
1194
+ local y = x--[[@as integer]] -- y is `integer` here
1195
+ ```
1196
+ * `NEW` add `---@cast`
1197
+ * `---@cast localname type`
1198
+ * `---@cast localname +type`
1199
+ * `---@cast localname -type`
1200
+ * `---@cast localname +?`
1201
+ * `---@cast localname -?`
1202
+ * `NEW` generic: resolve `T[]` by `table<integer, type>` or `---@field [integer] type`
1203
+ * `NEW` resolve `class[1]` by `---@field [integer] type`
1204
+ * `NEW` diagnostic: `missing-parameter`
1205
+ * `NEW` diagnostic: `need-check-nil`
1206
+ * `CHG` diagnostic: no longer mark `redundant-parameter` as `Unnecessary`
1207
+ * `FIX` diagnostic: `unused-function` does not recognize recursion
1208
+ * `FIX` [#1051](https://github.com/LuaLS/lua-language-server/issues/1051)
1209
+ * `FIX` [#1072](https://github.com/LuaLS/lua-language-server/issues/1072)
1210
+ * `FIX` [#1077](https://github.com/LuaLS/lua-language-server/issues/1077)
1211
+ * `FIX` [#1088](https://github.com/LuaLS/lua-language-server/issues/1088)
1212
+ * `FIX` runtime errors
1213
+
1214
+ ## 3.1.0
1215
+ `2022-4-17`
1216
+ * `NEW` support find definition in method
1217
+ * `CHG` hint: move to LSP. Its font is now controlled by the client.
1218
+ * `CHG` hover: split `local` into `local` / `parameter` / `upvalue` / `self`.
1219
+ * `CHG` hover: added parentheses to some words, such as `global` / `field` / `class`.
1220
+ * `FIX` definition of `table<k, v>`
1221
+ * `FIX` [#994](https://github.com/LuaLS/lua-language-server/issues/994)
1222
+ * `FIX` [#1057](https://github.com/LuaLS/lua-language-server/issues/1057)
1223
+ * `FIX` runtime errors reported by telemetry, see [#1058](https://github.com/LuaLS/lua-language-server/issues/1058)
1224
+
1225
+ ## 3.0.2
1226
+ `2022-4-15`
1227
+ * `FIX` `table<string, boolean>[string] -> boolean`
1228
+ * `FIX` goto `type definition`
1229
+ * `FIX` [#1050](https://github.com/LuaLS/lua-language-server/issues/1050)
1230
+
1231
+ ## 3.0.1
1232
+ `2022-4-11`
1233
+ * `FIX` [#1033](https://github.com/LuaLS/lua-language-server/issues/1033)
1234
+ * `FIX` [#1034](https://github.com/LuaLS/lua-language-server/issues/1034)
1235
+ * `FIX` [#1035](https://github.com/LuaLS/lua-language-server/issues/1035)
1236
+ * `FIX` [#1036](https://github.com/LuaLS/lua-language-server/issues/1036)
1237
+ * `FIX` runtime errors reported by telemetry, see [#1037](https://github.com/LuaLS/lua-language-server/issues/1037)
1238
+
1239
+ ## 3.0.0
1240
+ `2022-4-10`
1241
+ * `CHG` [break changes](https://github.com/LuaLS/lua-language-server/issues/980)
1242
+ * `CHG` diagnostic:
1243
+ + `type-check`: removed for now
1244
+ + `no-implicit-any`: renamed to `no-unknown`
1245
+ * `CHG` formatter: no longer need` --preview`
1246
+ * `CHG` `LuaDoc`: supports `---@type (string|integer)[]`
1247
+ * `FIX` semantic: color of `function`
1248
+ * `FIX` [#1027](https://github.com/LuaLS/lua-language-server/issues/1027)
1249
+ * `FIX` [#1028](https://github.com/LuaLS/lua-language-server/issues/1028)
1250
+
1251
+ ## 2.6.8
1252
+ `2022-4-9`
1253
+ * `CHG` completion: call snippet shown as `Function` instead of `Snippet` when `Lua.completion.callSnippet` is `Replace`
1254
+ * `FIX` [#976](https://github.com/LuaLS/lua-language-server/issues/976)
1255
+ * `FIX` [#995](https://github.com/LuaLS/lua-language-server/issues/995)
1256
+ * `FIX` [#1004](https://github.com/LuaLS/lua-language-server/issues/1004)
1257
+ * `FIX` [#1008](https://github.com/LuaLS/lua-language-server/issues/1008)
1258
+ * `FIX` [#1009](https://github.com/LuaLS/lua-language-server/issues/1009)
1259
+ * `FIX` [#1011](https://github.com/LuaLS/lua-language-server/issues/1011)
1260
+ * `FIX` [#1014](https://github.com/LuaLS/lua-language-server/issues/1014)
1261
+ * `FIX` [#1016](https://github.com/LuaLS/lua-language-server/issues/1016)
1262
+ * `FIX` [#1017](https://github.com/LuaLS/lua-language-server/issues/1017)
1263
+ * `FIX` runtime errors reported by telemetry
1264
+
1265
+ ## 2.6.7
1266
+ `2022-3-9`
1267
+ * `NEW` diagnosis report, [read more](https://luals.github.io/wiki/diagnosis-report/)
1268
+ * `CHG` `VSCode`: 1.65 has built in new `Lua` syntax files, so this extension no longer provides syntax files, which means you can install other syntax extensions in the marketplace. If you have any suggestions or issues, please [open issues here](https://github.com/LuaLS/lua.tmbundle).
1269
+ * `CHG` telemetry: the prompt will only appear in VSCode to avoid repeated prompts in other platforms due to the inability to automatically modify the settings.
1270
+ * `FIX` [#965](https://github.com/LuaLS/lua-language-server/issues/965)
1271
+ * `FIX` [#975](https://github.com/LuaLS/lua-language-server/issues/975)
1272
+
1273
+ ## 2.6.6
1274
+ `2022-2-21`
1275
+ * `NEW` formatter preview, use `--preview` to enable this feature, [read more](https://github.com/LuaLS/lua-language-server/issues/960)
1276
+ * `FIX` [#958](https://github.com/LuaLS/lua-language-server/issues/958)
1277
+ * `FIX` runtime errors
1278
+
1279
+ ## 2.6.5
1280
+ `2022-2-17`
1281
+ * `FIX` telemetry is not disabled by default (since 2.6.0)
1282
+ * `FIX` [#934](https://github.com/LuaLS/lua-language-server/issues/934)
1283
+ * `FIX` [#952](https://github.com/LuaLS/lua-language-server/issues/952)
1284
+
1285
+ ## 2.6.4
1286
+ `2022-2-9`
1287
+ * `CHG` completion: reduced sorting priority for postfix completion
1288
+ * `FIX` [#936](https://github.com/LuaLS/lua-language-server/issues/936)
1289
+ * `FIX` [#937](https://github.com/LuaLS/lua-language-server/issues/937)
1290
+ * `FIX` [#940](https://github.com/LuaLS/lua-language-server/issues/940)
1291
+ * `FIX` [#941](https://github.com/LuaLS/lua-language-server/issues/941)
1292
+ * `FIX` [#941](https://github.com/LuaLS/lua-language-server/issues/942)
1293
+ * `FIX` [#943](https://github.com/LuaLS/lua-language-server/issues/943)
1294
+ * `FIX` [#946](https://github.com/LuaLS/lua-language-server/issues/946)
1295
+
1296
+ ## 2.6.3
1297
+ `2022-1-25`
1298
+ * `FIX` new files are not loaded correctly
1299
+ * `FIX` [#923](https://github.com/LuaLS/lua-language-server/issues/923)
1300
+ * `FIX` [#926](https://github.com/LuaLS/lua-language-server/issues/926)
1301
+
1302
+ ## 2.6.2
1303
+ `2022-1-25`
1304
+ * `FIX` [#925](https://github.com/LuaLS/lua-language-server/issues/925)
1305
+
1306
+ ## 2.6.1
1307
+ `2022-1-24`
1308
+ * `CHG` default values of settings:
1309
+ + `Lua.diagnostics.workspaceDelay`: `0` sec -> `3` sec
1310
+ + `Lua.workspace.maxPreload`: `1000` -> `5000`
1311
+ + `Lua.workspace.preloadFileSize`: `100` KB -> `500` KB
1312
+ * `CHG` improve performance
1313
+ * `FIX` modify luarc failed
1314
+ * `FIX` library files not recognized correctly
1315
+ * `FIX` [#903](https://github.com/LuaLS/lua-language-server/issues/903)
1316
+ * `FIX` [#906](https://github.com/LuaLS/lua-language-server/issues/906)
1317
+ * `FIX` [#920](https://github.com/LuaLS/lua-language-server/issues/920)
1318
+
1319
+ ## 2.6.0
1320
+ `2022-1-13`
1321
+ * `NEW` supports multi-workspace in server side, for developers of language clients, please [read here](https://luals.github.io/wiki/developing/#multiple-workspace-support) to learn more.
1322
+ * `NEW` setting:
1323
+ + `Lua.hint.arrayIndex`
1324
+ + `Lua.semantic.enable`
1325
+ + `Lua.semantic.variable`
1326
+ + `Lua.semantic.annotation`
1327
+ + `Lua.semantic.keyword`
1328
+ * `CHG` completion: improve response speed
1329
+ * `CHG` completion: can be triggered in `LuaDoc` and strings
1330
+ * `CHG` diagnostic: smoother
1331
+ * `CHG` settings `Lua.color.mode` removed
1332
+ * `FIX` [#876](https://github.com/LuaLS/lua-language-server/issues/876)
1333
+ * `FIX` [#879](https://github.com/LuaLS/lua-language-server/issues/879)
1334
+ * `FIX` [#884](https://github.com/LuaLS/lua-language-server/issues/884)
1335
+ * `FIX` [#885](https://github.com/LuaLS/lua-language-server/issues/885)
1336
+ * `FIX` [#886](https://github.com/LuaLS/lua-language-server/issues/886)
1337
+ * `FIX` [#902](https://github.com/LuaLS/lua-language-server/issues/902)
1338
+
1339
+ ## 2.5.6
1340
+ `2021-12-27`
1341
+ * `CHG` diagnostic: now syntax errors in `LuaDoc` are shown as `Warning`
1342
+ * `FIX` [#863](https://github.com/LuaLS/lua-language-server/issues/863)
1343
+ * `FIX` return type of `math.floor`
1344
+ * `FIX` runtime errors
1345
+
1346
+ ## 2.5.5
1347
+ `2021-12-16`
1348
+ * `FIX` dose not work in VSCode
1349
+
1350
+ ## 2.5.4
1351
+ `2021-12-16`
1352
+ * `FIX` [#847](https://github.com/LuaLS/lua-language-server/issues/847)
1353
+ * `FIX` [#848](https://github.com/LuaLS/lua-language-server/issues/848)
1354
+ * `FIX` completion: incorrect cache
1355
+ * `FIX` hover: always view string
1356
+
1357
+ ## 2.5.3
1358
+ `2021-12-6`
1359
+ * `FIX` [#842](https://github.com/LuaLS/lua-language-server/issues/844)
1360
+ * `FIX` [#844](https://github.com/LuaLS/lua-language-server/issues/844)
1361
+
1362
+ ## 2.5.2
1363
+ `2021-12-2`
1364
+ * `FIX` [#815](https://github.com/LuaLS/lua-language-server/issues/815)
1365
+ * `FIX` [#825](https://github.com/LuaLS/lua-language-server/issues/825)
1366
+ * `FIX` [#826](https://github.com/LuaLS/lua-language-server/issues/826)
1367
+ * `FIX` [#827](https://github.com/LuaLS/lua-language-server/issues/827)
1368
+ * `FIX` [#831](https://github.com/LuaLS/lua-language-server/issues/831)
1369
+ * `FIX` [#837](https://github.com/LuaLS/lua-language-server/issues/837)
1370
+ * `FIX` [#838](https://github.com/LuaLS/lua-language-server/issues/838)
1371
+ * `FIX` postfix
1372
+ * `FIX` runtime errors
1373
+
1374
+ ## 2.5.1
1375
+ `2021-11-29`
1376
+ * `FIX` incorrect syntax error
1377
+
1378
+ ## 2.5.0
1379
+ `2021-11-29`
1380
+ * `NEW` settings:
1381
+ + `Lua.runtime.pathStrict`: not check subdirectories when using `runtime.path`
1382
+ + `Lua.hint.await`: display `await` when calling a function marked as async
1383
+ + `Lua.completion.postfix`: the symbol that triggers postfix, default is `@`
1384
+ * `NEW` add supports for `lovr`
1385
+ * `NEW` file encoding supports `utf16le` and `utf16be`
1386
+ * `NEW` full IntelliSense supports for literal tables, see [#720](https://github.com/LuaLS/lua-language-server/issues/720) and [#727](https://github.com/LuaLS/lua-language-server/issues/727)
1387
+ * `NEW` `LuaDoc` annotations:
1388
+ + `---@async`: mark a function as async
1389
+ + `---@nodiscard`: the return value of the marking function cannot be discarded
1390
+ * `NEW` diagnostics:
1391
+ + `await-in-sync`: check whether calls async function in sync function. disabled by default.
1392
+ + `not-yieldable`: check whether the function supports async functions as parameters. disabled by default.
1393
+ + `discard-returns`: check whether the return value is discarded.
1394
+ * `NEW` locale `pt-br`, thanks [Jeferson Ferreira](https://github.com/jefersonf)
1395
+ * `NEW` supports [utf-8-offsets](https://clangd.llvm.org/extensions#utf-8-offsets)
1396
+ * `NEW` supports quickfix for `.luarc.json`
1397
+ * `NEW` completion postifx: `@function`, `@method`, `@pcall`, `@xpcall`, `@insert`, `@remove`, `@concat`, `++`, `++?`
1398
+ * `CHG` `LuaDoc`:
1399
+ + `---@class` can be re-declared
1400
+ + supports unicode
1401
+ + supports `---@param ... number`, equivalent to `---@vararg number`
1402
+ + supports `fun(...: string)`
1403
+ + supports `fun(x, y, ...)`, equivalent to `fun(x: any, y: any, ...: any)`
1404
+ * `CHG` settings from `--configpath`, `.luarc.json`, `client` no longer prevent subsequent settings, instead they are merged in order
1405
+ * `CHG` no longer asks to trust plugin in VSCode, because VSCode already provides the workspace trust feature
1406
+ * `CHG` skip huge files (>= 10 MB)
1407
+ * `CHG` after using `Lua.runtime.nonstandardSymbol` to treat `//` as a comment, `//` is no longer parsed as an operator
1408
+
1409
+ ## 2.4.11
1410
+ `2021-11-25`
1411
+ * `FIX` [#816](https://github.com/LuaLS/lua-language-server/issues/816)
1412
+ * `FIX` [#817](https://github.com/LuaLS/lua-language-server/issues/817)
1413
+ * `FIX` [#818](https://github.com/LuaLS/lua-language-server/issues/818)
1414
+ * `FIX` [#820](https://github.com/LuaLS/lua-language-server/issues/820)
1415
+
1416
+ ## 2.4.10
1417
+ `2021-11-23`
1418
+ * `FIX` [#790](https://github.com/LuaLS/lua-language-server/issues/790)
1419
+ * `FIX` [#798](https://github.com/LuaLS/lua-language-server/issues/798)
1420
+ * `FIX` [#804](https://github.com/LuaLS/lua-language-server/issues/804)
1421
+ * `FIX` [#805](https://github.com/LuaLS/lua-language-server/issues/805)
1422
+ * `FIX` [#806](https://github.com/LuaLS/lua-language-server/issues/806)
1423
+ * `FIX` [#807](https://github.com/LuaLS/lua-language-server/issues/807)
1424
+ * `FIX` [#809](https://github.com/LuaLS/lua-language-server/issues/809)
1425
+
1426
+ ## 2.4.9
1427
+ `2021-11-18`
1428
+ * `CHG` for performance reasons, some of the features that are not cost-effective in IntelliSense have been disabled by default, and you can re-enable them through the following settings:
1429
+ + `Lua.IntelliSense.traceLocalSet`
1430
+ + `Lua.IntelliSense.traceReturn`
1431
+ + `Lua.IntelliSense.traceBeSetted`
1432
+ + `Lua.IntelliSense.traceFieldInject`
1433
+
1434
+ [read more](https://github.com/LuaLS/lua-language-server/wiki/IntelliSense-optional-features)
1435
+
1436
+ ## 2.4.8
1437
+ `2021-11-15`
1438
+ * `FIX` incorrect IntelliSense in specific situations
1439
+ * `FIX` [#777](https://github.com/LuaLS/lua-language-server/issues/777)
1440
+ * `FIX` [#778](https://github.com/LuaLS/lua-language-server/issues/778)
1441
+ * `FIX` [#779](https://github.com/LuaLS/lua-language-server/issues/779)
1442
+ * `FIX` [#780](https://github.com/LuaLS/lua-language-server/issues/780)
1443
+
1444
+ ## 2.4.7
1445
+ `2021-10-27`
1446
+ * `FIX` [#762](https://github.com/LuaLS/lua-language-server/issues/762)
1447
+
1448
+ ## 2.4.6
1449
+ `2021-10-26`
1450
+ * `NEW` diagnostic: `redundant-return`
1451
+ * `FIX` [#744](https://github.com/LuaLS/lua-language-server/issues/744)
1452
+ * `FIX` [#748](https://github.com/LuaLS/lua-language-server/issues/748)
1453
+ * `FIX` [#749](https://github.com/LuaLS/lua-language-server/issues/749)
1454
+ * `FIX` [#752](https://github.com/LuaLS/lua-language-server/issues/752)
1455
+ * `FIX` [#753](https://github.com/LuaLS/lua-language-server/issues/753)
1456
+ * `FIX` [#756](https://github.com/LuaLS/lua-language-server/issues/756)
1457
+ * `FIX` [#758](https://github.com/LuaLS/lua-language-server/issues/758)
1458
+ * `FIX` [#760](https://github.com/LuaLS/lua-language-server/issues/760)
1459
+
1460
+ ## 2.4.5
1461
+ `2021-10-18`
1462
+ * `FIX` accidentally load lua files from user workspace
1463
+
1464
+ ## 2.4.4
1465
+ `2021-10-15`
1466
+ * `CHG` improve `.luarc.json`
1467
+ * `FIX` [#722](https://github.com/LuaLS/lua-language-server/issues/722)
1468
+
1469
+ ## 2.4.3
1470
+ `2021-10-13`
1471
+ * `FIX` [#713](https://github.com/LuaLS/lua-language-server/issues/713)
1472
+ * `FIX` [#718](https://github.com/LuaLS/lua-language-server/issues/718)
1473
+ * `FIX` [#719](https://github.com/LuaLS/lua-language-server/issues/719)
1474
+ * `FIX` [#725](https://github.com/LuaLS/lua-language-server/issues/725)
1475
+ * `FIX` [#729](https://github.com/LuaLS/lua-language-server/issues/729)
1476
+ * `FIX` [#730](https://github.com/LuaLS/lua-language-server/issues/730)
1477
+ * `FIX` runtime errors
1478
+
1479
+ ## 2.4.2
1480
+ `2021-10-8`
1481
+ * `FIX` [#702](https://github.com/LuaLS/lua-language-server/issues/702)
1482
+ * `FIX` [#706](https://github.com/LuaLS/lua-language-server/issues/706)
1483
+ * `FIX` [#707](https://github.com/LuaLS/lua-language-server/issues/707)
1484
+ * `FIX` [#709](https://github.com/LuaLS/lua-language-server/issues/709)
1485
+ * `FIX` [#712](https://github.com/LuaLS/lua-language-server/issues/712)
1486
+
1487
+ ## 2.4.1
1488
+ `2021-10-2`
1489
+ * `FIX` broken with single file
1490
+ * `FIX` [#698](https://github.com/LuaLS/lua-language-server/issues/698)
1491
+ * `FIX` [#699](https://github.com/LuaLS/lua-language-server/issues/699)
1492
+
1493
+ ## 2.4.0
1494
+ `2021-10-1`
1495
+ * `NEW` loading settings from `.luarc.json`
1496
+ * `NEW` settings:
1497
+ + `Lua.diagnostics.libraryFiles`
1498
+ + `Lua.diagnostics.ignoredFiles`
1499
+ + `Lua.completion.showWord`
1500
+ + `Lua.completion.requireSeparator`
1501
+ * `NEW` diagnostics:
1502
+ + `different-requires`
1503
+ * `NEW` `---@CustomClass<string, number>`
1504
+ * `NEW` supports `$/cancelRequest`
1505
+ * `NEW` `EventEmitter`
1506
+ ```lua
1507
+ --- @class Emit
1508
+ --- @field on fun(eventName: string, cb: function)
1509
+ --- @field on fun(eventName: '"died"', cb: fun(i: integer))
1510
+ --- @field on fun(eventName: '"won"', cb: fun(s: string))
1511
+ local emit = {}
1512
+
1513
+ emit:on(--[[support autocomplete fr "died" and "won"]])
1514
+
1515
+ emit:on("died", function (i)
1516
+ -- should be i: integer
1517
+ end)
1518
+
1519
+ emit:on('won', function (s)
1520
+ -- should be s: string
1521
+ end)
1522
+ ```
1523
+ * `NEW` `---@module 'moduleName'`
1524
+ ```lua
1525
+ ---@module 'mylib'
1526
+ local lib -- the same as `local lib = require 'mylib'`
1527
+ ```
1528
+ * `NEW` add supports of `skynet`
1529
+ * `CHG` hover: improve showing multi defines
1530
+ * `CHG` hover: improve showing multi comments at enums
1531
+ * `CHG` hover: shows method
1532
+ * `CHG` hint: `Lua.hint.paramName` now supports `Disable`, `Literal` and `All`
1533
+ * `CHG` only search first file by `require`
1534
+ * `CHG` no longer infer by usage
1535
+ * `CHG` no longer ignore file names case in Windows
1536
+ * `CHG` watching library changes
1537
+ * `CHG` completion: improve misspelling results
1538
+ * `CHG` completion: `Lua.completion.displayContext` default to `0`
1539
+ * `CHG` completion: `autoRequire` has better inserting position
1540
+ * `CHG` diagnostics:
1541
+ + `redundant-parameter` default severity to `Warning`
1542
+ + `redundant-value` default severity to `Warning`
1543
+ * `CHG` infer: more strict of calculation results
1544
+ * `CHG` [#663](https://github.com/LuaLS/lua-language-server/issues/663)
1545
+ * `FIX` runtime errors
1546
+ * `FIX` hint: may show param-2 as `self`
1547
+ * `FIX` semantic: may fail when scrolling
1548
+ * `FIX` [#647](https://github.com/LuaLS/lua-language-server/issues/647)
1549
+ * `FIX` [#660](https://github.com/LuaLS/lua-language-server/issues/660)
1550
+ * `FIX` [#673](https://github.com/LuaLS/lua-language-server/issues/673)
1551
+
1552
+ ## 2.3.7
1553
+ `2021-8-17`
1554
+ * `CHG` improve performance
1555
+ * `FIX` [#244](https://github.com/LuaLS/lua-language-server/issues/244)
1556
+
1557
+ ## 2.3.6
1558
+ `2021-8-9`
1559
+ * `FIX` completion: can not find global fields
1560
+ * `FIX` globals and class may lost
1561
+
1562
+ ## 2.3.5
1563
+ `2021-8-9`
1564
+ * `CHG` improve memory usage
1565
+ * `CHG` completion: call snip triggers signature (VSCode only)
1566
+ * `FIX` completion: may not find results
1567
+
1568
+ ## 2.3.4
1569
+ `2021-8-6`
1570
+ * `CHG` improve performance
1571
+ * `FIX` [#625](https://github.com/LuaLS/lua-language-server/issues/625)
1572
+
1573
+ ## 2.3.3
1574
+ `2021-7-26`
1575
+ * `NEW` config supports prop
1576
+ * `FIX` [#612](https://github.com/LuaLS/lua-language-server/issues/612)
1577
+ * `FIX` [#613](https://github.com/LuaLS/lua-language-server/issues/613)
1578
+ * `FIX` [#618](https://github.com/LuaLS/lua-language-server/issues/618)
1579
+ * `FIX` [#620](https://github.com/LuaLS/lua-language-server/issues/620)
1580
+
1581
+ ## 2.3.2
1582
+ `2021-7-21`
1583
+ * `NEW` `LuaDoc`: supports `['string']` as field:
1584
+ ```lua
1585
+ ---@class keyboard
1586
+ ---@field ['!'] number
1587
+ ---@field ['?'] number
1588
+ ---@field ['#'] number
1589
+ ```
1590
+ * `NEW` add supports of `love2d`
1591
+ * `FIX` gitignore pattern `\` broken initialization
1592
+ * `FIX` runtime errors
1593
+
1594
+ ## 2.3.1
1595
+ `2021-7-19`
1596
+ * `NEW` setting `Lua.workspace.userThirdParty`, add private user [third-parth](https://github.com/LuaLS/lua-language-server/tree/master/meta/3rd) by this setting
1597
+ * `CHG` path in config supports `~/xxxx`
1598
+ * `FIX` `autoRequire` inserted incorrect code
1599
+ * `FIX` `autoRequire` may provide dumplicated options
1600
+ * `FIX` [#606](https://github.com/LuaLS/lua-language-server/issues/606)
1601
+ * `FIX` [#607](https://github.com/LuaLS/lua-language-server/issues/607)
1602
+
1603
+ ## 2.3.0
1604
+ `2021-7-16`
1605
+ * `NEW` `VSCode`: click the status bar icon to operate:
1606
+ * run workspace diagnostics
1607
+ * `NEW` `LuaDoc`: supports `[1]` as field:
1608
+ ```lua
1609
+ ---@class position
1610
+ ---@field [1] number
1611
+ ---@field [2] number
1612
+ ---@field [3] number
1613
+ ```
1614
+ * `NEW` hover: view array `local array = {'a', 'b', 'c'}`:
1615
+ ```lua
1616
+ local array: {
1617
+ [1]: string = "a",
1618
+ [2]: string = "b",
1619
+ [3]: string = "c",
1620
+ }
1621
+ ```
1622
+ * `NEW` completion: supports enums in `fun()`
1623
+ ```lua
1624
+ ---@type fun(x: "'aaa'"|"'bbb'")
1625
+ local f
1626
+
1627
+ f(--[[show `'aaa'` and `'bbb'` here]])
1628
+ ```
1629
+ * `FIX` loading workspace may hang
1630
+ * `FIX` `debug.getuservalue` and `debug.setuservalue` should not exist in `Lua 5.1`
1631
+ * `FIX` infer of `---@type class[][]`
1632
+ * `FIX` infer of `---@type {}[]`
1633
+ * `FIX` completion: displaying `@fenv` in `Lua 5.1`
1634
+ * `FIX` completion: incorrect at end of line
1635
+ * `FIX` when a file is renamed, the file will still be loaded even if the new file name has been set to ignore
1636
+ * `FIX` [#596](https://github.com/LuaLS/lua-language-server/issues/596)
1637
+ * `FIX` [#597](https://github.com/LuaLS/lua-language-server/issues/597)
1638
+ * `FIX` [#598](https://github.com/LuaLS/lua-language-server/issues/598)
1639
+ * `FIX` [#601](https://github.com/LuaLS/lua-language-server/issues/601)
1640
+
1641
+ ## 2.2.3
1642
+ `2021-7-9`
1643
+ * `CHG` improve `auto require`
1644
+ * `CHG` will not sleep anymore
1645
+ * `FIX` incorrect doc: `debug.getlocal`
1646
+ * `FIX` completion: incorrect callback
1647
+ * `FIX` [#592](https://github.com/LuaLS/lua-language-server/issues/592)
1648
+
1649
+ ## 2.2.2
1650
+ `2021-7-9`
1651
+ * `FIX` incorrect syntax color
1652
+ * `FIX` incorrect type infer
1653
+
1654
+ ## 2.2.1
1655
+ `2021-7-8`
1656
+ * `FIX` change setting may failed
1657
+
1658
+ ## 2.2.0
1659
+ `2021-7-8`
1660
+ * `NEW` detect and apply third-party libraries, including:
1661
+ * OpenResty
1662
+ * Cocos4.0
1663
+ * Jass
1664
+ * `NEW` `LuaDoc`: supports literal table:
1665
+ ```lua
1666
+ ---@generic T
1667
+ ---@param x T
1668
+ ---@return { x: number, y: T, z?: boolean}
1669
+ local function f(x) end
1670
+
1671
+ local t = f('str')
1672
+ -- hovering "t" shows:
1673
+ local t: {
1674
+ x: number,
1675
+ y: string,
1676
+ z?: boolean,
1677
+ }
1678
+ ```
1679
+ * `CHG` improve changing config from server side
1680
+ * `CHG` improve hover color
1681
+ * `CHG` improve performance
1682
+ * `CHG` telemetry: sends version of this extension
1683
+ * `FIX` supports for file with LF
1684
+ * `FIX` may infer a custom class as a string
1685
+
1686
+ ## 2.1.0
1687
+ `2021-7-2`
1688
+ * `NEW` supports local config file, using `--configpath="config.json"`, [learn more here](https://luals.github.io/wiki/usage/#--configpath)
1689
+ * `NEW` goto `type definition`
1690
+ * `NEW` infer type by callback param:
1691
+ ```lua
1692
+ ---@param callback fun(value: string)
1693
+ local function work(callback)
1694
+ end
1695
+
1696
+ work(function (value)
1697
+ -- value is string here
1698
+ end)
1699
+ ```
1700
+ * `NEW` optional field `---@field name? type`
1701
+ * `CHG` [#549](https://github.com/LuaLS/lua-language-server/issues/549)
1702
+ * `CHG` diagnostics: always ignore the ignored files even if they are opened
1703
+ * `FIX` completion: `type() ==` may does not work
1704
+
1705
+ ## 2.0.5
1706
+ `2021-7-1`
1707
+ * `NEW` `hover` and `completion` reports initialization progress
1708
+ * `CHG` `class field` consider implicit definition
1709
+ ```lua
1710
+ ---@class Class
1711
+ local mt = {}
1712
+
1713
+ function mt:init()
1714
+ self.xxx = 1
1715
+ end
1716
+
1717
+ function mt:func()
1718
+ print(self.xxx) -- self.xxx is defined
1719
+ end
1720
+ ```
1721
+ * `CHG` improve performance
1722
+ * `FIX` [#580](https://github.com/LuaLS/lua-language-server/issues/580)
1723
+
1724
+ ## 2.0.4
1725
+ `2021-6-25`
1726
+ * `FIX` [#550](https://github.com/LuaLS/lua-language-server/issues/550)
1727
+ * `FIX` [#555](https://github.com/LuaLS/lua-language-server/issues/555)
1728
+ * `FIX` [#574](https://github.com/LuaLS/lua-language-server/issues/574)
1729
+
1730
+ ## 2.0.3
1731
+ `2021-6-24`
1732
+ * `CHG` improve memory usage
1733
+ * `FIX` some dialog boxes block the initialization process
1734
+ * `FIX` diagnostics `undefined-field`: blocks main thread
1735
+ * `FIX` [#565](https://github.com/LuaLS/lua-language-server/issues/565)
1736
+
1737
+ ## 2.0.2
1738
+ `2021-6-23`
1739
+ * `NEW` supports literal table in `pairs`
1740
+ ```lua
1741
+ local t = { a = 1, b = 2, c = 3 }
1742
+ for k, v in pairs(t) do
1743
+ -- `k` is string and `v` is integer here
1744
+ end
1745
+ ```
1746
+ * `CHG` view `local f ---@type fun(x:number):boolean`
1747
+ ```lua
1748
+ ---before
1749
+ function f(x: number)
1750
+ -> boolean
1751
+ ---after
1752
+ local f: fun(x: number): boolean
1753
+ ```
1754
+ * `FIX` [#558](https://github.com/LuaLS/lua-language-server/issues/558)
1755
+ * `FIX` [#567](https://github.com/LuaLS/lua-language-server/issues/567)
1756
+ * `FIX` [#568](https://github.com/LuaLS/lua-language-server/issues/568)
1757
+ * `FIX` [#570](https://github.com/LuaLS/lua-language-server/issues/570)
1758
+ * `FIX` [#571](https://github.com/LuaLS/lua-language-server/issues/571)
1759
+
1760
+ ## 2.0.1
1761
+ `2021-6-21`
1762
+ * `FIX` [#566](https://github.com/LuaLS/lua-language-server/issues/566)
1763
+
1764
+ ## 2.0.0
1765
+ `2021-6-21`
1766
+ * `NEW` implement
1767
+ * `CHG` diagnostics `undefined-field`, `deprecated`: default by `Opened` instead of `None`
1768
+ * `CHG` setting `Lua.runtime.plugin`: default by `""` instead of `".vscode/lua/plugin.lua"` (for security)
1769
+ * `CHG` setting `Lua.intelliSense.searchDepth`: removed
1770
+ * `CHG` setting `Lua.misc.parameters`: `string array` instead of `string`
1771
+ * `CHG` setting `Lua.develop.enable`, `Lua.develop.debuggerPort`, `Lua.develop.debuggerWait`: removed, use `Lua.misc.parameters` instead
1772
+ * `FIX` [#441](https://github.com/LuaLS/lua-language-server/issues/441)
1773
+ * `FIX` [#493](https://github.com/LuaLS/lua-language-server/issues/493)
1774
+ * `FIX` [#531](https://github.com/LuaLS/lua-language-server/issues/531)
1775
+ * `FIX` [#542](https://github.com/LuaLS/lua-language-server/issues/542)
1776
+ * `FIX` [#543](https://github.com/LuaLS/lua-language-server/issues/543)
1777
+ * `FIX` [#553](https://github.com/LuaLS/lua-language-server/issues/553)
1778
+ * `FIX` [#562](https://github.com/LuaLS/lua-language-server/issues/562)
1779
+ * `FIX` [#563](https://github.com/LuaLS/lua-language-server/issues/563)
1780
+
1781
+ ## 1.21.3
1782
+ `2021-6-17`
1783
+ * `NEW` supports `untrusted workspaces`
1784
+ * `FIX` performance issues, thanks to [folke](https://github.com/folke)
1785
+
1786
+ ## 1.21.2
1787
+ `2021-5-18`
1788
+ * `FIX` loaded new file with ignored filename
1789
+ * `FIX` [#536](https://github.com/LuaLS/lua-language-server/issues/536)
1790
+ * `FIX` [#537](https://github.com/LuaLS/lua-language-server/issues/537)
1791
+ * `FIX` [#538](https://github.com/LuaLS/lua-language-server/issues/538)
1792
+ * `FIX` [#539](https://github.com/LuaLS/lua-language-server/issues/539)
1793
+
1794
+ ## 1.21.1
1795
+ `2021-5-8`
1796
+ * `FIX` [#529](https://github.com/LuaLS/lua-language-server/issues/529)
1797
+
1798
+ ## 1.21.0
1799
+ `2021-5-7`
1800
+ * `NEW` setting: `completion.showParams`
1801
+ * `NEW` `LuaDoc`: supports multiline comments
1802
+ * `NEW` `LuaDoc`: tail comments support lua string
1803
+
1804
+ ## 1.20.5
1805
+ `2021-4-30`
1806
+ * `NEW` setting: `completion.autoRequire`
1807
+ * `NEW` setting: `hover.enumsLimit`
1808
+ * `CHG` folding: supports `-- #region`
1809
+ * `FIX` completion: details may be suspended
1810
+ * `FIX` [#522](https://github.com/LuaLS/lua-language-server/issues/522)
1811
+ * `FIX` [#523](https://github.com/LuaLS/lua-language-server/issues/523)
1812
+
1813
+ ## 1.20.4
1814
+ `2021-4-13`
1815
+ * `NEW` diagnostic: `deprecated`
1816
+ * `FIX` [#464](https://github.com/LuaLS/lua-language-server/issues/464)
1817
+ * `FIX` [#497](https://github.com/LuaLS/lua-language-server/issues/497)
1818
+ * `FIX` [#502](https://github.com/LuaLS/lua-language-server/issues/502)
1819
+
1820
+ ## 1.20.3
1821
+ `2021-4-6`
1822
+ * `FIX` [#479](https://github.com/LuaLS/lua-language-server/issues/479)
1823
+ * `FIX` [#483](https://github.com/LuaLS/lua-language-server/issues/483)
1824
+ * `FIX` [#485](https://github.com/LuaLS/lua-language-server/issues/485)
1825
+ * `FIX` [#487](https://github.com/LuaLS/lua-language-server/issues/487)
1826
+ * `FIX` [#488](https://github.com/LuaLS/lua-language-server/issues/488)
1827
+ * `FIX` [#490](https://github.com/LuaLS/lua-language-server/issues/490)
1828
+ * `FIX` [#495](https://github.com/LuaLS/lua-language-server/issues/495)
1829
+
1830
+ ## 1.20.2
1831
+ `2021-4-2`
1832
+ * `CHG` `LuaDoc`: supports `---@param self TYPE`
1833
+ * `CHG` completion: does not show suggests after `\n`, `{` and `,`, unless your setting `editor.acceptSuggestionOnEnter` is `off`
1834
+ * `FIX` [#482](https://github.com/LuaLS/lua-language-server/issues/482)
1835
+
1836
+ ## 1.20.1
1837
+ `2021-3-27`
1838
+ * `FIX` telemetry window blocks initializing
1839
+ * `FIX` [#468](https://github.com/LuaLS/lua-language-server/issues/468)
1840
+
1841
+ ## 1.20.0
1842
+ `2021-3-27`
1843
+ * `CHG` telemetry: change to opt-in, see [#462](https://github.com/LuaLS/lua-language-server/issues/462) and [Privacy-Policy](https://luals.github.io/privacy/#language-server)
1844
+ * `FIX` [#467](https://github.com/LuaLS/lua-language-server/issues/467)
1845
+
1846
+ ## 1.19.1
1847
+ `2021-3-22`
1848
+ * `CHG` improve performance
1849
+ * `FIX` [#457](https://github.com/LuaLS/lua-language-server/issues/457)
1850
+ * `FIX` [#458](https://github.com/LuaLS/lua-language-server/issues/458)
1851
+
1852
+ ## 1.19.0
1853
+ `2021-3-18`
1854
+ * `NEW` VSCode: new setting `Lua.misc.parameters`
1855
+ * `NEW` new setting `Lua.runtime.builtin`, used to disable some built-in libraries
1856
+ * `NEW` quick fix: disable diagnostic in line/file
1857
+ * `NEW` setting: `Lua.runtime.path` supports absolute path
1858
+ * `NEW` completion: field in table
1859
+ ```lua
1860
+ ---@class A
1861
+ ---@field x number
1862
+ ---@field y number
1863
+ ---@field z number
1864
+
1865
+ ---@type A
1866
+ local t = {
1867
+ -- provide `x`, `y` and `z` here
1868
+ }
1869
+ ```
1870
+ * `NEW` `LuaDoc`: supports multi-line comment before resume
1871
+ ```lua
1872
+ ---this is
1873
+ ---a multi line
1874
+ ---comment
1875
+ ---@alias XXXX
1876
+ ---comment 1
1877
+ ---comment 1
1878
+ ---| '1'
1879
+ ---comment 2
1880
+ ---comment 2
1881
+ ---| '2'
1882
+
1883
+ ---@param x XXXX
1884
+ local function f(x)
1885
+ end
1886
+
1887
+ f( -- view comments of `1` and `2` in completion
1888
+ ```
1889
+ * `CHG` intelli-scense: search from generic param to return
1890
+ * `CHG` intelli-scense: search across vararg
1891
+ * `CHG` text-document-synchronization: refactored
1892
+ * `CHG` diagnostic: improve `newline-call`
1893
+ * `CHG` completion: improve `then .. end`
1894
+ * `CHG` improve initialization speed
1895
+ * `CHG` improve performance
1896
+ * `FIX` missed syntax error `function m['x']() end`
1897
+ * `FIX` [#452](https://github.com/LuaLS/lua-language-server/issues/452)
1898
+
1899
+ ## 1.18.1
1900
+ `2021-3-10`
1901
+ * `CHG` semantic-tokens: improve colors of `const` and `close`
1902
+ * `CHG` type-formating: improve execution conditions
1903
+ * `FIX` [#444](https://github.com/LuaLS/lua-language-server/issues/444)
1904
+
1905
+ ## 1.18.0
1906
+ `2021-3-9`
1907
+ * `NEW` `LuaDoc`: supports `---@diagnostic disable`
1908
+ * `NEW` code-action: convert JSON to Lua
1909
+ * `NEW` completion: provide `then .. end` snippet
1910
+ * `NEW` type-formating:
1911
+ ```lua
1912
+ -- press `enter` at $
1913
+ local function f() $ end
1914
+ -- formating result:
1915
+ local function f()
1916
+ $
1917
+ end
1918
+
1919
+ -- as well as
1920
+ do $ end
1921
+ -- formating result
1922
+ do
1923
+ $
1924
+ end
1925
+ ```
1926
+ * `CHG` `Windows`: dose not provide `ucrt` any more
1927
+ * `CHG` `Lua.workspace.library`: use `path[]` instead of `<path, true>`
1928
+ * `FIX` missed syntax error `local a <const>= 1`
1929
+ * `FIX` workspace: preload blocked when hitting `Lua.workspace.maxPreload`
1930
+ * `FIX` [#443](https://github.com/LuaLS/lua-language-server/issues/443)
1931
+ * `FIX` [#445](https://github.com/LuaLS/lua-language-server/issues/445)
1932
+
1933
+ ## 1.17.4
1934
+ `2021-3-4`
1935
+ * `FIX` [#437](https://github.com/LuaLS/lua-language-server/issues/437) again
1936
+ * `FIX` [#438](https://github.com/LuaLS/lua-language-server/issues/438)
1937
+
1938
+ ## 1.17.3
1939
+ `2021-3-3`
1940
+ * `CHG` intelli-scense: treat `V[]` as `table<integer, V>` in `pairs`
1941
+ * `FIX` completion: `detail` disappears during continuous input
1942
+ * `FIX` [#435](https://github.com/LuaLS/lua-language-server/issues/435)
1943
+ * `FIX` [#436](https://github.com/LuaLS/lua-language-server/issues/436)
1944
+ * `FIX` [#437](https://github.com/LuaLS/lua-language-server/issues/437)
1945
+
1946
+ ## 1.17.2
1947
+ `2021-3-2`
1948
+ * `FIX` running in Windows
1949
+
1950
+ ## 1.17.1
1951
+ `2021-3-1`
1952
+ * `CHG` intelli-scense: improve infer across `table<K, V>` and `V[]`.
1953
+ * `CHG` intelli-scense: improve infer across `pairs` and `ipairs`
1954
+ * `FIX` hover: shows nothing when hovering unknown function
1955
+ * `FIX` [#398](https://github.com/LuaLS/lua-language-server/issues/398)
1956
+ * `FIX` [#421](https://github.com/LuaLS/lua-language-server/issues/421)
1957
+ * `FIX` [#422](https://github.com/LuaLS/lua-language-server/issues/422)
1958
+
1959
+ ## 1.17.0
1960
+ `2021-2-24`
1961
+ * `NEW` diagnostic: `duplicate-set-field`
1962
+ * `NEW` diagnostic: `no-implicit-any`, disabled by default
1963
+ * `CHG` completion: improve field and table
1964
+ * `CHG` improve infer cross `ipairs`
1965
+ * `CHG` cache globals when loading
1966
+ * `CHG` completion: remove trigger character `\n` for now, see [#401](https://github.com/LuaLS/lua-language-server/issues/401)
1967
+ * `FIX` diagnositc: may open file with wrong uri case
1968
+ * `FIX` [#406](https://github.com/LuaLS/lua-language-server/issues/406)
1969
+
1970
+ ## 1.16.1
1971
+ `2021-2-22`
1972
+ * `FIX` signature: parameters may be misplaced
1973
+ * `FIX` completion: interface in nested table
1974
+ * `FIX` completion: interface not show after `,`
1975
+ * `FIX` [#400](https://github.com/LuaLS/lua-language-server/issues/400)
1976
+ * `FIX` [#402](https://github.com/LuaLS/lua-language-server/issues/402)
1977
+ * `FIX` [#403](https://github.com/LuaLS/lua-language-server/issues/403)
1978
+ * `FIX` [#404](https://github.com/LuaLS/lua-language-server/issues/404)
1979
+ * `FIX` runtime errors
1980
+
1981
+ ## 1.16.0
1982
+ `2021-2-20`
1983
+ * `NEW` file encoding supports `ansi`
1984
+ * `NEW` completion: supports interface, see [#384](https://github.com/LuaLS/lua-language-server/issues/384)
1985
+ * `NEW` `LuaDoc`: supports multiple class inheritance: `---@class Food: Burger, Pizza, Pie, Pasta`
1986
+ * `CHG` rename `table*` to `tablelib`
1987
+ * `CHG` `LuaDoc`: revert compatible with `--@`, see [#392](https://github.com/LuaLS/lua-language-server/issues/392)
1988
+ * `CHG` improve performance
1989
+ * `FIX` missed syntax error `f() = 1`
1990
+ * `FIX` missed global `bit` in `LuaJIT`
1991
+ * `FIX` completion: may insert error text when continuous inputing
1992
+ * `FIX` completion: may insert error text after resolve
1993
+ * `FIX` [#349](https://github.com/LuaLS/lua-language-server/issues/349)
1994
+ * `FIX` [#396](https://github.com/LuaLS/lua-language-server/issues/396)
1995
+
1996
+ ## 1.15.1
1997
+ `2021-2-18`
1998
+ * `CHG` diagnostic: `unused-local` excludes `doc.param`
1999
+ * `CHG` definition: excludes values, see [#391](https://github.com/LuaLS/lua-language-server/issues/391)
2000
+ * `FIX` not works on Linux and macOS
2001
+
2002
+ ## 1.15.0
2003
+ `2021-2-9`
2004
+ * `NEW` LUNAR YEAR, BE HAPPY!
2005
+ * `CHG` diagnostic: when there are too many errors, the main errors will be displayed first
2006
+ * `CHG` main thread no longer loop sleeps, see [#329](https://github.com/LuaLS/lua-language-server/issues/329) [#386](https://github.com/LuaLS/lua-language-server/issues/386)
2007
+ * `CHG` improve performance
2008
+
2009
+ ## 1.14.3
2010
+ `2021-2-8`
2011
+ * `CHG` hint: disabled by default, see [#380](https://github.com/LuaLS/lua-language-server/issues/380)
2012
+ * `FIX` [#381](https://github.com/LuaLS/lua-language-server/issues/381)
2013
+ * `FIX` [#382](https://github.com/LuaLS/lua-language-server/issues/382)
2014
+ * `FIX` [#388](https://github.com/LuaLS/lua-language-server/issues/388)
2015
+
2016
+ ## 1.14.2
2017
+ `2021-2-4`
2018
+ * `FIX` [#356](https://github.com/LuaLS/lua-language-server/issues/356)
2019
+ * `FIX` [#375](https://github.com/LuaLS/lua-language-server/issues/375)
2020
+ * `FIX` [#376](https://github.com/LuaLS/lua-language-server/issues/376)
2021
+ * `FIX` [#377](https://github.com/LuaLS/lua-language-server/issues/377)
2022
+ * `FIX` [#378](https://github.com/LuaLS/lua-language-server/issues/378)
2023
+ * `FIX` [#379](https://github.com/LuaLS/lua-language-server/issues/379)
2024
+ * `FIX` a lot of runtime errors
2025
+
2026
+ ## 1.14.1
2027
+ `2021-2-2`
2028
+ * `FIX` [#372](https://github.com/LuaLS/lua-language-server/issues/372)
2029
+
2030
+ ## 1.14.0
2031
+ `2021-2-2`
2032
+ * `NEW` `VSCode` hint
2033
+ * `NEW` flush cache after 5 min
2034
+ * `NEW` `VSCode` help semantic color with market theme
2035
+ * `CHG` create/delete/rename files no longer reload workspace
2036
+ * `CHG` `LuaDoc`: compatible with `--@`
2037
+ * `FIX` `VSCode` settings
2038
+ * `FIX` [#368](https://github.com/LuaLS/lua-language-server/issues/368)
2039
+ * `FIX` [#371](https://github.com/LuaLS/lua-language-server/issues/371)
2040
+
2041
+ ## 1.13.0
2042
+ `2021-1-28`
2043
+ * `NEW` `VSCode` status bar
2044
+ * `NEW` `VSCode` options in some window
2045
+ * `CHG` performance optimization
2046
+ * `FIX` endless loop
2047
+
2048
+ ## 1.12.2
2049
+ `2021-1-27`
2050
+ * `CHG` performance optimization
2051
+ * `FIX` modifying the code before loading finish makes confusion
2052
+ * `FIX` signature: not works
2053
+
2054
+ ## 1.12.1
2055
+ `2021-1-27`
2056
+ * `FIX` endless loop
2057
+
2058
+ ## 1.12.0
2059
+ `2021-1-26`
2060
+ * `NEW` progress
2061
+ * `NEW` [#340](https://github.com/LuaLS/lua-language-server/pull/340): supports `---@type table<string, number>`
2062
+ * `FIX` [#355](https://github.com/LuaLS/lua-language-server/pull/355)
2063
+ * `FIX` [#359](https://github.com/LuaLS/lua-language-server/issues/359)
2064
+ * `FIX` [#361](https://github.com/LuaLS/lua-language-server/issues/361)
2065
+
2066
+ ## 1.11.2
2067
+ `2021-1-7`
2068
+ * `FIX` [#345](https://github.com/LuaLS/lua-language-server/issues/345): not works with unexpect args
2069
+ * `FIX` [#346](https://github.com/LuaLS/lua-language-server/issues/346): dont modify the cache
2070
+
2071
+ ## 1.11.1
2072
+ `2021-1-5`
2073
+ * `CHG` performance optimization
2074
+
2075
+ ## 1.11.0
2076
+ `2021-1-5`
2077
+ * `NEW` `Lua.runtime.plugin`
2078
+ * `NEW` intelli-scense: improved `m.f = function (self) end` from `self` to `m`
2079
+ * `CHG` performance optimization
2080
+ * `CHG` completion: improve performance of workspace words
2081
+ * `FIX` hover: tail comments may be cutted
2082
+ * `FIX` runtime errors
2083
+
2084
+ ## 1.10.0
2085
+ `2021-1-4`
2086
+ * `NEW` workspace: supports `.dll`(`.so`) in `require`
2087
+ * `NEW` folding: `---@class`, `--#region` and docs of function
2088
+ * `NEW` diagnostic: `count-down-loop`
2089
+ * `CHG` supports `~` in command line
2090
+ * `CHG` completion: improve workspace words
2091
+ * `CHG` completion: show words in string
2092
+ * `CHG` completion: split `for .. in` to `for .. ipairs` and `for ..pairs`
2093
+ * `CHG` diagnostic: `unused-function` checks recursive
2094
+ * `FIX` [#339](https://github.com/LuaLS/lua-language-server/issues/339)
2095
+
2096
+ ## 1.9.0
2097
+ `2020-12-31`
2098
+ * `NEW` YEAR! Peace and love!
2099
+ * `NEW` specify path of `log` and `meta` by `--logpath=xxx` and `--metapath=XXX` in command line
2100
+ * `NEW` completion: worksapce word
2101
+ * `NEW` completion: show words in comment
2102
+ * `NEW` completion: generate function documentation
2103
+ * `CHG` got arg after script name: `lua-language-server.exe main.lua --logpath=D:\log --metapath=D:\meta --develop=false`
2104
+ * `FIX` runtime errors
2105
+
2106
+ ## 1.8.2
2107
+ `2020-12-29`
2108
+ * `CHG` performance optimization
2109
+
2110
+ ## 1.8.1
2111
+ `2020-12-24`
2112
+ * `FIX` telemetry: connect failed caused not working
2113
+
2114
+ ## 1.8.0
2115
+ `2020-12-23`
2116
+ * `NEW` runtime: support nonstandard symbol
2117
+ * `NEW` diagnostic: `close-non-object`
2118
+ * `FIX` [#318](https://github.com/LuaLS/lua-language-server/issues/318)
2119
+
2120
+ ## 1.7.4
2121
+ `2020-12-20`
2122
+ * `FIX` workspace: preload may failed
2123
+
2124
+ ## 1.7.3
2125
+ `2020-12-20`
2126
+ * `FIX` luadoc: typo of `package.config`
2127
+ * `FIX` [#310](https://github.com/LuaLS/lua-language-server/issues/310)
2128
+
2129
+ ## 1.7.2
2130
+ `2020-12-17`
2131
+ * `CHG` completion: use custom tabsize
2132
+ * `FIX` [#307](https://github.com/LuaLS/lua-language-server/issues/307)
2133
+ * `FIX` a lot of runtime errors
2134
+
2135
+ ## 1.7.1
2136
+ `2020-12-16`
2137
+ * `NEW` setting: `diagnostics.neededFileStatus`
2138
+ * `FIX` scan workspace may fails
2139
+ * `FIX` quickfix: `newline-call` failed
2140
+ * `FIX` a lot of other runtime errors
2141
+
2142
+ ## 1.7.0
2143
+ `2020-12-16`
2144
+ * `NEW` diagnostic: `undefined-field`
2145
+ * `NEW` telemetry:
2146
+ + [What data will be sent](https://github.com/LuaLS/lua-language-server/blob/master/script/service/telemetry.lua)
2147
+ + [How to use this data](https://github.com/LuaLS/lua-telemetry-server/tree/master/method)
2148
+ * `CHG` diagnostic: `unused-function` ignores function with `<close>`
2149
+ * `CHG` semantic: not cover local call
2150
+ * `CHG` language client: update to [7.0.0](https://github.com/microsoft/vscode-languageserver-node/commit/20681d7632bb129def0c751be73cf76bd01f2f3a)
2151
+ * `FIX` semantic: tokens may not be updated correctly
2152
+ * `FIX` completion: require path broken
2153
+ * `FIX` hover: document uri
2154
+ * `FIX` [#291](https://github.com/LuaLS/lua-language-server/issues/291)
2155
+ * `FIX` [#294](https://github.com/LuaLS/lua-language-server/issues/294)
2156
+
2157
+ ## 1.6.0
2158
+ `2020-12-14`
2159
+ * `NEW` completion: auto require local modules
2160
+ * `NEW` completion: support delegate
2161
+ * `NEW` hover: show function by keyword `function`
2162
+ * `NEW` code action: swap params
2163
+ * `CHG` standalone: unbind the relative path between binaries and scripts
2164
+ * `CHG` hover: `LuaDoc` also catchs `--` (no need `---`)
2165
+ * `CHG` rename: support doc
2166
+ * `CHG` completion: keyword considers expression
2167
+ * `FIX` [#297](https://github.com/LuaLS/lua-language-server/issues/297)
2168
+
2169
+ ## 1.5.0
2170
+ `2020-12-5`
2171
+ * `NEW` setting `runtime.unicodeName`
2172
+ * `NEW` fully supports `---@generic T`
2173
+ * `FIX` [#274](https://github.com/LuaLS/lua-language-server/issues/274)
2174
+ * `FIX` [#276](https://github.com/LuaLS/lua-language-server/issues/276)
2175
+ * `FIX` [#279](https://github.com/LuaLS/lua-language-server/issues/279)
2176
+ * `FIX` [#280](https://github.com/LuaLS/lua-language-server/issues/280)
2177
+
2178
+ ## 1.4.0
2179
+ `2020-12-3`
2180
+ * `NEW` setting `hover.previewFields`: limit how many fields are shown in table hover
2181
+ * `NEW` fully supports `---@type Object[]`
2182
+ * `NEW` supports `---@see`
2183
+ * `NEW` diagnostic `unbalanced-assignments`
2184
+ * `CHG` resolves infer of `string|table`
2185
+ * `CHG` `unused-local` ignores local with `---@class`
2186
+ * `CHG` locale file format changes to `lua`
2187
+
2188
+ ## 1.3.0
2189
+ `2020-12-1`
2190
+
2191
+ * `NEW` provides change logs, I think it's good idea for people knowing what's new ~~(bugs)~~
2192
+ * `NEW` meta files of LuaJIT
2193
+ * `NEW` support completion of `type(o) == ?`
2194
+ * `CHG` now I think it's a bad idea as it took me nearly an hour to complete the logs started from version `1.0.0`
2195
+ * `FIX` closing ignored or library file dose not clean diagnostics
2196
+ * `FIX` searching of `t.f1` when `t.f1 = t.f2`
2197
+ * `FIX` missing signature help of global function
2198
+
2199
+ ## 1.2.1
2200
+ `2020-11-27`
2201
+
2202
+ * `FIX` syntaxes tokens: [#272](https://github.com/LuaLS/lua-language-server/issues/272)
2203
+
2204
+ ## 1.2.0
2205
+ `2020-11-27`
2206
+
2207
+ * `NEW` hover shows comments from `---@param` and `---@return`: [#135](https://github.com/LuaLS/lua-language-server/issues/135)
2208
+ * `NEW` support `LuaDoc` as tail comment
2209
+ * `FIX` `---@class` inheritance
2210
+ * `FIX` missed syntaxes token: `punctuation.definition.parameters.finish.lua`
2211
+
2212
+ ## 1.1.4
2213
+ `2020-11-25`
2214
+
2215
+ * `FIX` wiered completion suggests for require paths in `Linux` and `macOS`: [#269](https://github.com/LuaLS/lua-language-server/issues/269)
2216
+
2217
+ ## 1.1.3
2218
+ `2020-11-25`
2219
+
2220
+ * `FIX` extension not works in `Ubuntu`: [#268](https://github.com/LuaLS/lua-language-server/issues/268)
2221
+
2222
+ ## 1.1.2
2223
+ `2020-11-24`
2224
+
2225
+ * `NEW` auto completion finds globals from `Lua.diagnostics.globals`
2226
+ * `NEW` support tail `LuaDoc`
2227
+ * `CHG` no more `Lua.intelliScense.fastGlobal`, now globals always fast and accurate
2228
+ * `CHG` `LuaDoc` supports `--- @`
2229
+ * `CHG` `find reference` uses extra `Lua.intelliSense.searchDepth`
2230
+ * `CHG` diagnostics are limited by `100` in each file
2231
+ * `FIX` library files are under limit of `Lua.workspace.maxPreload`: [#266](https://github.com/LuaLS/lua-language-server/issues/266)
2232
+
2233
+ ## 1.1.1
2234
+ `2020-11-23`
2235
+
2236
+ * `NEW` auto completion special marks deprecated items
2237
+ * `FIX` diagnostics may push wrong uri in `Linux` and `macOS`
2238
+ * `FIX` diagnostics not cleaned up when closing ignored lua file
2239
+ * `FIX` reload workspace remains old caches
2240
+ * `FIX` incorrect hover of local attribute
2241
+
2242
+ ## 1.1.0
2243
+ `2020-11-20`
2244
+
2245
+ * `NEW` no longer `BETA`
2246
+ * `NEW` use `meta.lua` instead of `meta.lni`, now you can find the definition of builtin function
2247
+ * `CHG` Lua files outside of workspace no longer launch a new server
2248
+
2249
+ ## 1.0.6
2250
+ `2020-11-20`
2251
+
2252
+ * `NEW` diagnostic `code-after-break`
2253
+ * `CHG` optimize performance
2254
+ * `CHG` updated language client
2255
+ * `CHG` `unused-function` ignores global functions (may used out of Lua)
2256
+ * `CHG` checks if client supports `Lua.completion.enable`: [#259](https://github.com/LuaLS/lua-language-server/issues/259)
2257
+ * `FIX` support for single Lua file
2258
+ * `FIX` [#257](https://github.com/LuaLS/lua-language-server/issues/257)
2259
+
2260
+ ## 1.0.5
2261
+ `2020-11-14`
2262
+
2263
+ * `NEW` `LuaDoc` supports more `EmmyLua`
2264
+
2265
+ ## 1.0.4
2266
+ `2020-11-12`
2267
+
2268
+ * `FIX` extension not works
2269
+
2270
+ ## 1.0.3
2271
+ `2020-11-12`
2272
+
2273
+ * `NEW` server kills itself when disconnecting
2274
+ * `NEW` `LuaDoc` supports more `EmmyLua`
2275
+ * `FIX` `Lua.diagnostics.enable` not works: [#251](https://github.com/LuaLS/lua-language-server/issues/251)
2276
+
2277
+ ## 1.0.2
2278
+ `2020-11-11`
2279
+
2280
+ * `NEW` supports `---|` after `doc.type`
2281
+ * `CHG` `lowcase-global` ignores globals with `---@class`
2282
+ * `FIX` endless loop
2283
+ * `FIX` [#244](https://github.com/LuaLS/lua-language-server/issues/244)
2284
+
2285
+ ## 1.0.1
2286
+ `2020-11-10`
2287
+
2288
+ * `FIX` autocompletion not works.
2289
+
2290
+ ## 1.0.0
2291
+ `2020-11-9`
2292
+
2293
+ * `NEW` implementation, NEW start!
2294
+
2295
+ <!-- contributors -->
2296
+ [lizho]: (https://github.com/lizho)
2297
+ [fesily]: (https://github.com/fesily)
2298
+ [Andreas Matthias]: (https://github.com/AndreasMatthias)
2299
+ [Daniel Farrell]: (https://github.com/danpf)
2300
+ [Paul Emmerich]: (https://github.com/emmericp)
2301
+ [Artem Dzhemesiuk]: (https://github.com/zziger)
2302
+ [clay-golem]: (https://github.com/clay-golem)