Skip to content

Commit bedb6aa

Browse files
committed
Rename configuration option Lua.diagnostics.disableScheme to Lua.diagnostics.validScheme
1 parent c2b2826 commit bedb6aa

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

changelog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Unreleased
44
<!-- Add all new changes here. They will be moved under a version at release -->
55
* `FIX` Incorrect inject-field message for extra table field in exact class
6-
6+
* `CHG` Rename configuration option `Lua.diagnostics.disableScheme` to `Lua.diagnostics.validScheme` and improve its description. Now it enables diagnostics for Lua files that use the specified scheme.
77
* `FIX` adds the `|lambda|` operator to the `Lua.runtime.nonstandardSymbol` configuration template, which allows the use of that option. Previously, support for it existed in the parser, but we could not actually use the option because it is not recognised in the configuration.
88
* `FIX` Typed `@field` (eg `---@field [string] boolean`) should not override other defined field [#2171](https://github.com/LuaLS/lua-language-server/issues/2171), [#2711](https://github.com/LuaLS/lua-language-server/issues/2711)
99

locale/en-us/setting.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ config.diagnostics.ignoredFiles.Opened =
115115
"Only when these files are opened will it be diagnosed."
116116
config.diagnostics.ignoredFiles.Disable =
117117
"These files are not diagnosed."
118-
config.diagnostics.disableScheme =
119-
'Do not diagnose Lua files that use the following scheme.'
118+
config.diagnostics.validScheme =
119+
'Enable diagnostics for Lua files that use the following scheme.'
120120
config.diagnostics.unusedLocalExclude =
121121
'Do not diagnose `unused-local` when the variable name matches the following pattern.'
122122
config.workspace.ignoreDir =

locale/zh-cn/setting.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ config.diagnostics.ignoredFiles.Opened =
114114
"只有打开这些文件时才会诊断。"
115115
config.diagnostics.ignoredFiles.Disable =
116116
"不诊断这些文件。"
117-
config.diagnostics.disableScheme =
118-
'不诊断使用以下 scheme 的lua文件'
117+
config.diagnostics.validScheme =
118+
'对使用以下 scheme 的lua文件启用诊断'
119119
config.diagnostics.unusedLocalExclude =
120120
'如果变量名匹配以下规则,则不对其进行 `unused-local` 诊断。'
121121
config.workspace.ignoreDir =

locale/zh-tw/setting.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,10 @@ config.diagnostics.ignoredFiles.Opened =
114114
"只有打開這些檔案時才會診斷。"
115115
config.diagnostics.ignoredFiles.Disable =
116116
"不診斷這些檔案。"
117-
config.diagnostics.disableScheme =
118-
'不診斷使用以下 scheme 的lua檔案。'
119117
config.diagnostics.unusedLocalExclude =
120118
'如果變數名符合以下規則,則不對其進行 `unused-local` 診斷。'
119+
config.diagnostics.validScheme =
120+
'對使用以下 scheme 的lua檔案啟用診斷。'
121121
config.workspace.ignoreDir =
122122
"忽略的檔案與目錄(使用 `.gitignore` 語法)。"
123123
config.workspace.ignoreSubmodules =

script/config/template.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ local template = {
294294
}
295295
)
296296
>> util.deepCopy(define.DiagnosticDefaultGroupFileStatus),
297-
['Lua.diagnostics.disableScheme'] = Type.Array(Type.String) >> { 'git' },
297+
['Lua.diagnostics.enableScheme'] = Type.Array(Type.String) >> { 'file' },
298298
['Lua.diagnostics.workspaceEvent'] = Type.String >> 'OnSave' << {
299299
'OnChange',
300300
'OnSave',

script/provider/diagnostic.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,8 @@ local function isValid(uri)
270270
end
271271
end
272272
local scheme = furi.split(uri)
273-
local disableScheme = config.get(uri, 'Lua.diagnostics.disableScheme')
274-
if util.arrayHas(disableScheme, scheme) then
273+
local enableScheme = config.get(uri, 'Lua.diagnostics.enableScheme')
274+
if not util.arrayHas(enableScheme, scheme) then
275275
return false
276276
end
277277
return true

0 commit comments

Comments
 (0)