Skip to content

Commit e8b4cb1

Browse files
committed
更新设置
1 parent 4bd362c commit e8b4cb1

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

package/configuration.lua

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,12 @@ local config = {
219219
default = true,
220220
markdownDescription = "%config.hover.viewNumber%"
221221
},
222+
['Lua.hover.fieldInfer'] = {
223+
scope = "resource",
224+
type = "integer",
225+
default = 3000,
226+
markdownDescription = "%config.hover.fieldInfer%"
227+
},
222228
--["Lua.plugin.enable"] = {
223229
-- scope = "resource",
224230
-- type = "boolean",
@@ -255,6 +261,18 @@ local config = {
255261
default = false,
256262
markdownDescription = "%config.develop.debuggerWait%"
257263
},
264+
['Lua.intelliSense.searchDepth'] = {
265+
scope = "resource",
266+
type = "integer",
267+
default = 0,
268+
markdownDescription = "%config.intelliSense.searchDepth%"
269+
},
270+
['Lua.intelliSense.fastGlobal'] = {
271+
scope = "resource",
272+
type = "boolean",
273+
default = true,
274+
markdownDescription = "%config.intelliSense.fastGlobal%"
275+
},
258276
}
259277

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

package/nls-zh-cn.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,13 @@ return {
4141
['config.hover.viewString'] = "悬停提示查看字符串内容(仅当字面量包含转义符时)。",
4242
['config.hover.viewStringMax'] = "悬停提示查看字符串内容时的最大长度。",
4343
['config.hover.viewNumber'] = "悬停提示查看数字内容(仅当字面量不是十进制时)。",
44+
['config.hover.fieldInfer'] = "悬停提示查看表时,会对表的每个字段进行类型推测,当类型推测的用时累计达到该设定值(毫秒)时,将跳过后续字段的类型推测。",
4445
['config.zzzzzz.cat'] = 'DONT TOUCH ME, LET ME SLEEP >_<',
4546
['config.develop.enable'] = '开发者模式。请勿开启,会影响性能。',
4647
['config.develop.debuggerPort'] = '调试器监听端口。',
4748
['config.develop.debuggerWait'] = '调试器连接之前挂起。',
49+
['config.intelliSense.searchDepth'] = '设置智能感知的搜索深度。增大该值可以增加准确度,但会降低性能。不同的项目对该设置的容忍度差异较大,请自己调整为合适的值。',
50+
['config.intelliSense.fastGlobal'] = '在对全局变量进行补全,及查看 `_G` 的悬浮提示时进行优化。这会略微降低类型推测的准确度,但是对于大量使用全局变量的项目会有大幅的性能提升。',
4851

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

package/nls.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,11 @@ The following example shows loaded files in `C:/lua` and `../lib` ,exclude `../l
3939
['config.hover.viewString'] = "Hover to view the contents of a string (only if the literal contains an escape character).",
4040
['config.hover.viewStringMax'] = "The maximum length of a hover to view the contents of a string.",
4141
['config.hover.viewNumber'] = "Hover to view numeric content (only if literal is not decimal).",
42+
['config.hover.fieldInfer'] = "When hovering to view a table, type infer will be performed for each field. When the accumulated time of type infer reaches the set value (MS), the type infer of subsequent fields will be skipped.",
4243
['config.zzzzzz.cat'] = 'DONT TOUCH ME, LET ME SLEEP >_<',
4344
['config.develop.enable'] = 'Developer mode. Do not enable, performance will be affected.',
4445
['config.develop.debuggerPort'] = 'Listen port of debugger.',
4546
['config.develop.debuggerWait'] = 'Suspend before debugger connects.',
47+
['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.',
48+
['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.',
4649
}

0 commit comments

Comments
 (0)