Skip to content

Commit 84484bc

Browse files
committed
new setting Lua.misc.parameters
1 parent 3a6b37f commit 84484bc

File tree

11 files changed

+37
-0
lines changed

11 files changed

+37
-0
lines changed

changelog.md

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

3+
## 1.19.0
4+
* `NEW` VSCode: new setting `Lua.misc.parameters`
5+
* `CHG` text-document-synchronization: refactored
6+
* `FIX` missed syntax error `function m['x']() end`
7+
38
## 1.18.1
49
`2021-3-10`
510
* `CHG` semantic-tokens: improve colors of `const` and `close`

client/out/languageserver.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/src/languageserver.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ function start(context: ExtensionContext, documentSelector: DocumentSelector, fo
8989
let develop: boolean = config.get("Lua.develop.enable");
9090
let debuggerPort: number = config.get("Lua.develop.debuggerPort");
9191
let debuggerWait: boolean = config.get("Lua.develop.debuggerWait");
92+
let commandParam: string = config.get("Lua.misc.parameters");
9293
let command: string;
9394
let platform: string = os.platform();
9495
switch (platform) {
@@ -137,6 +138,7 @@ function start(context: ExtensionContext, documentSelector: DocumentSelector, fo
137138
`--develop=${develop}`,
138139
`--dbgport=${debuggerPort}`,
139140
`--dbgwait=${debuggerWait}`,
141+
commandParam,
140142
]
141143
};
142144

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -975,6 +975,12 @@
975975
"scope": "resource",
976976
"type": "integer"
977977
},
978+
"Lua.misc.parameters": {
979+
"default": "",
980+
"markdownDescription": "%config.misc.parameters%",
981+
"scope": "resource",
982+
"type": "string"
983+
},
978984
"Lua.runtime.fileEncoding": {
979985
"default": "utf8",
980986
"enum": [

package.nls.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"config.hover.viewStringMax": "The maximum length of a hover to view the contents of a string.",
3737
"config.intelliSense.fastGlobal": "In the global variable completion, and view `_G` suspension prompt. This will slightly reduce the accuracy of type speculation, but it will have a significant performance improvement for projects that use a lot of global variables.",
3838
"config.intelliSense.searchDepth": "Set the search depth for IntelliSense. Increasing this value increases accuracy, but decreases performance. Different workspace have different tolerance for this setting. Please adjust it to the appropriate value.",
39+
"config.misc.parameters": "[Command line parameters](https://github.com/sumneko/lua-telemetry-server/tree/master/method) when starting the language service in VSCode.",
3940
"config.runtime.fileEncoding": "File encoding. The `ansi` option is only available under the `Windows` platform.",
4041
"config.runtime.nonstandardSymbol": "Supports non-standard symbols. Make sure that your runtime environment supports these symbols.",
4142
"config.runtime.path": "`package.path`",

package.nls.zh-cn.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"config.hover.viewStringMax": "悬停提示查看字符串内容时的最大长度。",
4040
"config.intelliSense.fastGlobal": "在对全局变量进行补全,及查看 `_G` 的悬浮提示时进行优化。这会略微降低类型推测的准确度,但是对于大量使用全局变量的项目会有大幅的性能提升。",
4141
"config.intelliSense.searchDepth": "设置智能感知的搜索深度。增大该值可以增加准确度,但会降低性能。不同的项目对该设置的容忍度差异较大,请自己调整为合适的值。",
42+
"config.misc.parameters": "VSCode中启动语言服务时的[命令行参数](https://github.com/sumneko/lua-language-server/wiki/Command-line)。",
4243
"config.runtime.fileEncoding": "文件编码,`ansi` 选项只在 `Windows` 平台下有效。",
4344
"config.runtime.nonstandardSymbol": "支持非标准的符号。请务必确认你的运行环境支持这些符号。",
4445
"config.runtime.path": "`package.path`",

package/configuration.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,12 @@ local config = {
362362
default = true,
363363
markdownDescription = '%config.hint.paramName%',
364364
},
365+
['Lua.misc.parameters'] = {
366+
scope = 'resource',
367+
type = 'string',
368+
default = '',
369+
markdownDescription = '%config.misc.parameters%',
370+
},
365371
}
366372

367373
local DiagSeverity = config["Lua.diagnostics.severity"].properties

package/nls-zh-cn.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ return {
6565
* [会发送哪些数据](https://github.com/sumneko/lua-language-server/blob/master/script/service/telemetry.lua)
6666
* [如何使用这些数据](https://github.com/sumneko/lua-telemetry-server/tree/master/method)
6767
]],
68+
['config.misc.parameters'] = 'VSCode中启动语言服务时的[命令行参数](https://github.com/sumneko/lua-language-server/wiki/Command-line)。',
6869

6970
-- TODO 英文翻译
7071
['config.diagnostics.unused-local'] = '未使用的局部变量',

package/nls.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,5 @@ Enable telemetry to send your editor information and error logs over the network
6565
* [What data will be sent](https://github.com/sumneko/lua-language-server/blob/master/script/service/telemetry.lua)
6666
* [How to use this data](https://github.com/sumneko/lua-telemetry-server/tree/master/method)
6767
]],
68+
['config.misc.parameters'] = '[Command line parameters](https://github.com/sumneko/lua-telemetry-server/tree/master/method) when starting the language service in VSCode.',
6869
}

setting/schema-zh-cn.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -959,6 +959,12 @@
959959
"scope": "resource",
960960
"type": "integer"
961961
},
962+
"Lua.misc.parameters": {
963+
"default": "",
964+
"markdownDescription": "VSCode中启动语言服务时的[命令行参数](https://github.com/sumneko/lua-language-server/wiki/Command-line)。",
965+
"scope": "resource",
966+
"type": "string"
967+
},
962968
"Lua.runtime.fileEncoding": {
963969
"default": "utf8",
964970
"enum": [

0 commit comments

Comments
 (0)