Skip to content

Commit 0f2c761

Browse files
committed
诊断性能的选项
1 parent 6187248 commit 0f2c761

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

package/configuration.lua

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,18 @@ local config = {
7979
title = "severity",
8080
properties = {}
8181
},
82+
["Lua.diagnostics.workspaceDelay"] = {
83+
scope = "resource",
84+
type = "integer",
85+
default = 0,
86+
markdownDescription = "%config.diagnostics.workspaceDelay%",
87+
},
88+
["Lua.diagnostics.workspaceRate"] = {
89+
scope = "resource",
90+
type = "integer",
91+
default = 100,
92+
markdownDescription = "%config.diagnostics.workspaceRate%",
93+
},
8294
["Lua.workspace.ignoreDir"] = {
8395
scope = "resource",
8496
type = "array",

package/nls-zh-cn.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ return {
1111
["config.diagnostics.disable"] = "禁用的诊断(使用浮框括号内的代码)。\n",-- .. example.disable,
1212
["config.diagnostics.globals"] = "已定义的全局变量。\n",-- .. example.globals,
1313
["config.diagnostics.severity"] = "修改诊断等级。\n",-- .. example.severity,
14+
["config.diagnostics.workspaceDelay"] = "`仅beta支持` 进行工作区诊断的延迟(毫秒)。当你启动工作区,或编辑了任意文件后,将会在后台对整个工作区进行重新诊断。设置为负数可以禁用工作区诊断。",
15+
["config.diagnostics.workspaceRate"] = "`仅beta支持` 工作区诊断的运行速率(百分比)。降低该值会减少CPU占用,但是也会降低工作区诊断的速度。你当前正在编辑的文件的诊断总是全速完成,不受该选项影响。",
1416
["config.workspace.ignoreDir"] = "忽略的目录(使用 `.gitignore` 语法)。\n",-- .. example.ignoreDir,
1517
["config.workspace.ignoreSubmodules"] = "忽略子模块。",
1618
["config.workspace.useGitIgnore"] = "忽略 `.gitignore` 中列举的文件。",

package/nls.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ return {
99
["config.diagnostics.disable"] = "Disabled diagnostic (Use code in hover brackets).\n",-- .. example.disable,
1010
["config.diagnostics.globals"] = "Defined global variables.\n",-- .. example.globals,
1111
["config.diagnostics.severity"] = "Modified diagnostic severity.\n",-- .. example.severity,
12+
["config.diagnostics.workspaceDelay"] = "`Only supported in beta` Latency (milliseconds) for workspace diagnostics. When you start the workspace, or edit any file, the entire workspace will be re-diagnosed in the background. Set to negative to disable workspace diagnostics.",
13+
["config.diagnostics.workspaceRate"] = "`Only supported in beta` Workspace diagnostics run rate (%). Decreasing this value reduces CPU usage, but also reduces the speed of workspace diagnostics. The diagnosis of the file you are currently editing is always done at full speed and is not affected by this setting.",
1214
["config.workspace.ignoreDir"] = "Ignored directories (Use `.gitignore` grammar).\n",-- .. example.ignoreDir,
1315
["config.workspace.ignoreSubmodules"] = "Ignore submodules.",
1416
["config.workspace.useGitIgnore"] = "Ignore files list in `.gitignore` .",

0 commit comments

Comments
 (0)