Skip to content

Commit 5879833

Browse files
committed
2.4.11
1 parent a1d6237 commit 5879833

File tree

9 files changed

+265
-10
lines changed

9 files changed

+265
-10
lines changed

README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,22 +87,25 @@ If you find any mistakes, please [tell me][issues] or use [Pull Requests][@meta]
8787

8888
## Locale
8989

90-
- [x] en-US
91-
- [x] zh-CN
90+
- [x] en-us
91+
- [x] zh-cn
92+
- [x] pt-br (thanks [Jeferson Ferreira](https://github.com/jefersonf))
9293

9394
Please [help me][en-US] improve the quality of `en-US`.
9495

9596
[en-US]: https://github.com/sumneko/lua-language-server/tree/master/locale/en-us
9697

9798
## Build
99+
The extensions in the VSCode market already come with pre-compiled binary files, usually you don't need to compile them.
98100

99-
* [Build and Run (In VSCode)](https://github.com/sumneko/lua-language-server/wiki/Build-and-Run-(In-VSCode))
100-
* [Build and Run (Standalone)](https://github.com/sumneko/lua-language-server/wiki/Build-and-Run-(Standalone))
101+
Other clients can first try to download and use [pre-compiled binary files](https://github.com/sumneko/lua-language-server/wiki/PreCompiled-Binaries).
102+
103+
If you need to compile by yourself, please refer to [here](https://github.com/sumneko/lua-language-server/wiki/Build-and-Run)
101104

102105
## Setting
103106

104107
* In VSCode: Just use the setting of VSCode.
105-
* Standalone: See https://github.com/sumneko/lua-language-server/wiki/Setting-without-VSCode
108+
* Standalone: See https://github.com/sumneko/lua-language-server/wiki/Setting
106109

107110
## Credit
108111

changelog.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,42 @@
11
# changelog
22

3+
## 2.5.0
4+
* `NEW` settings:
5+
+ `Lua.runtime.pathStrict`: not check subdirectories when using `runtime.path`
6+
+ `Lua.hint.await`: display `await` when calling a function marked as async
7+
+ `Lua.completion.postfix`: the symbol that triggers postfix, default is `@`
8+
* `NEW` add supports for `lovr`
9+
* `NEW` file encoding supports `utf16le` and `utf16be`
10+
* `NEW` full IntelliSense supports for literal tables, see [#720](https://github.com/sumneko/lua-language-server/issues/720) and [#727](https://github.com/sumneko/lua-language-server/issues/727)
11+
* `NEW` `LuaDoc` annotations:
12+
+ `---@async`: mark a function as async
13+
+ `---@nodiscard`: the return value of the marking function cannot be discarded
14+
* `NEW` diagnostics:
15+
+ `await-in-sync`: check whether calls async function in sync function. disabled by default.
16+
+ `not-yieldable`: check whether the function supports async functions as parameters. disabled by default.
17+
+ `discard-returns`: check whether the return value is discarded.
18+
* `NEW` locale `pt-br`, thanks [Jeferson Ferreira](https://github.com/jefersonf)
19+
* `NEW` supports [utf-8-offsets](https://clangd.llvm.org/extensions#utf-8-offsets)
20+
* `NEW` supports quickfix for `.luarc.json`
21+
* `NEW` completion postifx: `@function`, `@method`, `@pcall`, `@xpcall`, `@insert`, `@remove`, `@concat`, `++`, `++?`
22+
* `CHG` `LuaDoc`:
23+
+ `---@class` can be re-declared
24+
+ supports unicode
25+
+ supports `---@param ... number`, equivalent to `---@vararg number`
26+
+ supports `fun(...: string)`
27+
+ supports `fun(x, y, ...)`, equivalent to `fun(x: any, y: any, ...: any)`
28+
* `CHG` settings from `--configpath`, `.luarc.json`, `client` no longer prevent subsequent settings, instead they are merged in order
29+
* `CHG` no longer asks to trust plugin in VSCode, because VSCode already provides the workspace trust feature
30+
* `CHG` skip huge files (>= 10 MB)
31+
* `CHG` after using `Lua.runtime.nonstandardSymbol` to treat `//` as a comment, `//` is no longer parsed as an operator
32+
33+
## 2.4.11
34+
`2021-11-25`
35+
* `FIX` [#816](https://github.com/sumneko/lua-language-server/issues/816)
36+
* `FIX` [#817](https://github.com/sumneko/lua-language-server/issues/817)
37+
* `FIX` [#818](https://github.com/sumneko/lua-language-server/issues/818)
38+
* `FIX` [#820](https://github.com/sumneko/lua-language-server/issues/820)
39+
340
## 2.4.10
441
`2021-11-23`
542
* `FIX` [#790](https://github.com/sumneko/lua-language-server/issues/790)

package.json

Lines changed: 70 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,12 @@
118118
"scope": "window",
119119
"type": "string"
120120
},
121+
"Lua.completion.postfix": {
122+
"default": "@",
123+
"markdownDescription": "%config.completion.postfix%",
124+
"scope": "window",
125+
"type": "string"
126+
},
121127
"Lua.completion.requireSeparator": {
122128
"default": ".",
123129
"markdownDescription": "%config.completion.requireSeparator%",
@@ -220,6 +226,16 @@
220226
],
221227
"type": "string"
222228
},
229+
"await-in-sync": {
230+
"default": "None",
231+
"description": "%config.diagnostics.await-in-sync%",
232+
"enum": [
233+
"Any",
234+
"Opened",
235+
"None"
236+
],
237+
"type": "string"
238+
},
223239
"circle-doc-class": {
224240
"default": "Any",
225241
"description": "%config.diagnostics.circle-doc-class%",
@@ -280,6 +296,16 @@
280296
],
281297
"type": "string"
282298
},
299+
"discard-returns": {
300+
"default": "Opened",
301+
"description": "%config.diagnostics.discard-returns%",
302+
"enum": [
303+
"Any",
304+
"Opened",
305+
"None"
306+
],
307+
"type": "string"
308+
},
283309
"doc-field-no-class": {
284310
"default": "Any",
285311
"description": "%config.diagnostics.doc-field-no-class%",
@@ -400,6 +426,16 @@
400426
],
401427
"type": "string"
402428
},
429+
"not-yieldable": {
430+
"default": "None",
431+
"description": "%config.diagnostics.not-yieldable%",
432+
"enum": [
433+
"Any",
434+
"Opened",
435+
"None"
436+
],
437+
"type": "string"
438+
},
403439
"redefined-local": {
404440
"default": "Opened",
405441
"description": "%config.diagnostics.redefined-local%",
@@ -600,6 +636,17 @@
600636
],
601637
"type": "string"
602638
},
639+
"await-in-sync": {
640+
"default": "Warning",
641+
"description": "%config.diagnostics.await-in-sync%",
642+
"enum": [
643+
"Error",
644+
"Warning",
645+
"Information",
646+
"Hint"
647+
],
648+
"type": "string"
649+
},
603650
"circle-doc-class": {
604651
"default": "Warning",
605652
"description": "%config.diagnostics.circle-doc-class%",
@@ -666,6 +713,17 @@
666713
],
667714
"type": "string"
668715
},
716+
"discard-returns": {
717+
"default": "Warning",
718+
"description": "%config.diagnostics.discard-returns%",
719+
"enum": [
720+
"Error",
721+
"Warning",
722+
"Information",
723+
"Hint"
724+
],
725+
"type": "string"
726+
},
669727
"doc-field-no-class": {
670728
"default": "Warning",
671729
"description": "%config.diagnostics.doc-field-no-class%",
@@ -798,6 +856,17 @@
798856
],
799857
"type": "string"
800858
},
859+
"not-yieldable": {
860+
"default": "Warning",
861+
"description": "%config.diagnostics.not-yieldable%",
862+
"enum": [
863+
"Error",
864+
"Warning",
865+
"Information",
866+
"Hint"
867+
],
868+
"type": "string"
869+
},
801870
"redefined-local": {
802871
"default": "Hint",
803872
"description": "%config.diagnostics.redefined-local%",
@@ -1519,5 +1588,5 @@
15191588
"type": "git",
15201589
"url": "https://github.com/sumneko/lua-language-server"
15211590
},
1522-
"version": "2.4.10"
1591+
"version": "2.4.11"
15231592
}

package.nls.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"config.completion.keywordSnippet.Both": "Shows `keyword` and `syntax snippet`.",
2020
"config.completion.keywordSnippet.Disable": "Only shows `keyword`.",
2121
"config.completion.keywordSnippet.Replace": "Only shows `syntax snippet`.",
22+
"config.completion.postfix": "The symbol used to trigger the postfix suggestion.",
2223
"config.completion.requireSeparator": "The separator used when `require`.",
2324
"config.completion.showParams": "Display parameters in completion list. When the function has multiple definitions, they will be displayed separately.",
2425
"config.completion.showWord": "Show contextual words in suggestions.",

package.nls.zh-cn.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@
2020
"config.completion.keywordSnippet.Both": "显示 `关键字` 与 `语法片段`。",
2121
"config.completion.keywordSnippet.Disable": "只显示 `关键字`。",
2222
"config.completion.keywordSnippet.Replace": "只显示 `语法片段`。",
23+
"config.completion.postfix": "用于触发后缀建议的符号。",
2324
"config.completion.requireSeparator": "`require` 时使用的分隔符。",
24-
"config.completion.showParams": "在自动完成列表中显示函数的参数信息,函数拥有多个定义时会分开显示。",
25+
"config.completion.showParams": "在建议列表中显示函数的参数信息,函数拥有多个定义时会分开显示。",
2526
"config.completion.showWord": "在建议中显示上下文单词。",
2627
"config.completion.showWord.Disable": "不显示上下文单词。",
2728
"config.completion.showWord.Enable": "总是在建议中显示上下文单词。",

package/build.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
local json = require 'json-beautify'
22

3-
local VERSION = "2.4.10"
3+
local VERSION = "2.4.11"
44

55
local package = require 'package.package'
66
local fsu = require 'fs-utility'

server

setting/schema-zh-cn.json

Lines changed: 73 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@
8282
"keywordSnippet": {
8383
"$ref": "#/properties/completion.keywordSnippet"
8484
},
85+
"postfix": {
86+
"$ref": "#/properties/completion.postfix"
87+
},
8588
"requireSeparator": {
8689
"$ref": "#/properties/completion.requireSeparator"
8790
},
@@ -146,6 +149,12 @@
146149
"scope": "window",
147150
"type": "string"
148151
},
152+
"completion.postfix": {
153+
"default": "@",
154+
"markdownDescription": "用于触发后缀建议的符号。",
155+
"scope": "window",
156+
"type": "string"
157+
},
149158
"completion.requireSeparator": {
150159
"default": ".",
151160
"markdownDescription": "`require` 时使用的分隔符。",
@@ -154,7 +163,7 @@
154163
},
155164
"completion.showParams": {
156165
"default": true,
157-
"markdownDescription": "在自动完成列表中显示函数的参数信息,函数拥有多个定义时会分开显示。",
166+
"markdownDescription": "在建议列表中显示函数的参数信息,函数拥有多个定义时会分开显示。",
158167
"scope": "window",
159168
"type": "boolean"
160169
},
@@ -279,6 +288,16 @@
279288
],
280289
"type": "string"
281290
},
291+
"await-in-sync": {
292+
"default": "None",
293+
"description": "%config.diagnostics.await-in-sync%",
294+
"enum": [
295+
"Any",
296+
"Opened",
297+
"None"
298+
],
299+
"type": "string"
300+
},
282301
"circle-doc-class": {
283302
"default": "Any",
284303
"description": "%config.diagnostics.circle-doc-class%",
@@ -339,6 +358,16 @@
339358
],
340359
"type": "string"
341360
},
361+
"discard-returns": {
362+
"default": "Opened",
363+
"description": "%config.diagnostics.discard-returns%",
364+
"enum": [
365+
"Any",
366+
"Opened",
367+
"None"
368+
],
369+
"type": "string"
370+
},
342371
"doc-field-no-class": {
343372
"default": "Any",
344373
"description": "%config.diagnostics.doc-field-no-class%",
@@ -459,6 +488,16 @@
459488
],
460489
"type": "string"
461490
},
491+
"not-yieldable": {
492+
"default": "None",
493+
"description": "%config.diagnostics.not-yieldable%",
494+
"enum": [
495+
"Any",
496+
"Opened",
497+
"None"
498+
],
499+
"type": "string"
500+
},
462501
"redefined-local": {
463502
"default": "Opened",
464503
"description": "%config.diagnostics.redefined-local%",
@@ -659,6 +698,17 @@
659698
],
660699
"type": "string"
661700
},
701+
"await-in-sync": {
702+
"default": "Warning",
703+
"description": "%config.diagnostics.await-in-sync%",
704+
"enum": [
705+
"Error",
706+
"Warning",
707+
"Information",
708+
"Hint"
709+
],
710+
"type": "string"
711+
},
662712
"circle-doc-class": {
663713
"default": "Warning",
664714
"description": "%config.diagnostics.circle-doc-class%",
@@ -725,6 +775,17 @@
725775
],
726776
"type": "string"
727777
},
778+
"discard-returns": {
779+
"default": "Warning",
780+
"description": "%config.diagnostics.discard-returns%",
781+
"enum": [
782+
"Error",
783+
"Warning",
784+
"Information",
785+
"Hint"
786+
],
787+
"type": "string"
788+
},
728789
"doc-field-no-class": {
729790
"default": "Warning",
730791
"description": "%config.diagnostics.doc-field-no-class%",
@@ -857,6 +918,17 @@
857918
],
858919
"type": "string"
859920
},
921+
"not-yieldable": {
922+
"default": "Warning",
923+
"description": "%config.diagnostics.not-yieldable%",
924+
"enum": [
925+
"Error",
926+
"Warning",
927+
"Information",
928+
"Hint"
929+
],
930+
"type": "string"
931+
},
860932
"redefined-local": {
861933
"default": "Hint",
862934
"description": "%config.diagnostics.redefined-local%",

0 commit comments

Comments
 (0)