plugins.lsp.servers.lua-ls.settings.diagnostics.enable
Whether all diagnostics should be enabled or not.
Plugin default: true
Type: null or boolean or raw lua code
Default:
null
Declared by:
plugins.lsp.servers.lua-ls.settings.diagnostics.disable
Disable certain diagnostics globally.
For example, if you want all warnings for lowercase-global
to be disabled, the value for
diagnostics.disable
would be ["lowercase-global"]
.
Plugin default: [ ]
Type: null or (list of (string or raw lua code))
Default:
null
Declared by:
plugins.lsp.servers.lua-ls.settings.diagnostics.disableScheme
Disable diagnosis of Lua files that have the set schemes.
Plugin default:
[
"git"
]
Type: null or (list of (string or raw lua code))
Default:
null
Declared by:
plugins.lsp.servers.lua-ls.settings.diagnostics.globals
An array of variable names that will be declared as global.
Plugin default: [ ]
Type: null or (list of (string or raw lua code))
Default:
null
Declared by:
plugins.lsp.servers.lua-ls.settings.diagnostics.groupFileStatus
Set the file status required for each diagnostic group.
This setting is an Object
of key
-value
pairs where the key
is the name of the
diagnostic group and the value
is the state that a file must be in in order for the
diagnostic group to apply.
Valid state values:
"Any"
- Any loaded file (workspace, library, etc.) will use this diagnostic group"Opened"
- Only opened files will use this diagnostic group"None"
- This diagnostic group will be disabled"Fallback"
- The diagnostics in this group are controlled individually bydiagnostics.neededFileStatus
Plugin default:
{
ambiguity = "Fallback";
await = "Fallback";
codestyle = "Fallback";
duplicate = "Fallback";
global = "Fallback";
luadoc = "Fallback";
redefined = "Fallback";
strict = "Fallback";
strong = "Fallback";
type-check = "Fallback";
unbalanced = "Fallback";
unused = "Fallback";
}
Type: null or (attribute set of (one of “Any”, “Opened”, “None”, “Fallback” or raw lua code))
Default:
null
Declared by:
plugins.lsp.servers.lua-ls.settings.diagnostics.groupSeverity
Maps diagnostic groups to severity levels.
Valid severity values:
"Error"
- An error will be raised"Warning"
- A warning will be raised"Information"
- An information or note will be raised"Hint"
- The affected code will be “hinted” at"Fallback"
- The diagnostics in this group will be controlled individually bydiagnostics.severity
Plugin default:
{
ambiguity = "Fallback";
await = "Fallback";
codestyle = "Fallback";
duplicate = "Fallback";
global = "Fallback";
luadoc = "Fallback";
redefined = "Fallback";
strict = "Fallback";
strong = "Fallback";
type-check = "Fallback";
unbalanced = "Fallback";
unused = "Fallback";
}
Type: null or (attribute set of (one of “Error”, “Warning”, “Information”, “Hint”, “Fallback” or raw lua code))
Default:
null
Declared by:
plugins.lsp.servers.lua-ls.settings.diagnostics.ignoredFiles
Set how files that have been ignored should be diagnosed.
"Enable"
- Always diagnose ignored files… kind of defeats the purpose of ignoring them."Opened"
- Only diagnose ignored files when they are open"Disable"
- Ignored files are fully ignored
Plugin default: "Opened"
Type: null or one of “Enable”, “Opened”, “Disable” or raw lua code
Default:
null
Declared by:
plugins.lsp.servers.lua-ls.settings.diagnostics.libraryFiles
Set how files loaded with workspace.library
are diagnosed.
"Enable"
- Always diagnose library files"Opened"
- Only diagnose library files when they are open"Disable"
- Never diagnose library files
Plugin default: "Opened"
Type: null or one of “Enable”, “Opened”, “Disable” or raw lua code
Default:
null
Declared by:
plugins.lsp.servers.lua-ls.settings.diagnostics.neededFileStatus
Maps diagnostic groups to file states.
Valid states:
"Any"
- Any loaded file (workspace, library, etc.) will use this diagnostic group"Opened"
- Only opened files will use this diagnostic group"None"
- This diagnostic group will be disabled"Any!"
- Like"Any"
but overridesdiagnostics.groupFileStatus
"Opened!"
- Like"Opened"
but overridesdiagnostics.groupFileStatus
"None!"
- Like"None"
but overridesdiagnostics.groupFileStatus
Plugin default:
{
ambiguity-1 = "Any";
assign-type-mismatch = "Opened";
await-in-sync = "None";
cast-local-type = "Opened";
cast-type-mismatch = "Any";
circle-doc-class = "Any";
close-non-object = "Any";
code-after-break = "Opened";
codestyle-check = "None";
count-down-loop = "Any";
deprecated = "Any";
different-requires = "Any";
discard-returns = "Any";
doc-field-no-class = "Any";
duplicate-doc-alias = "Any";
duplicate-doc-field = "Any";
duplicate-doc-param = "Any";
duplicate-index = "Any";
duplicate-set-field = "Any";
empty-block = "Opened";
global-in-nil-env = "Any";
lowercase-global = "Any";
missing-parameter = "Any";
missing-return = "Any";
missing-return-value = "Any";
need-check-nil = "Opened";
newfield-call = "Any";
newline-call = "Any";
no-unknown = "None";
not-yieldable = "None";
param-type-mismatch = "Opened";
redefined-local = "Opened";
redundant-parameter = "Any";
redundant-return = "Opened";
redundant-return-value = "Any";
redundant-value = "Any";
return-type-mismatch = "Opened";
spell-check = "None";
trailing-space = "Opened";
unbalanced-assignments = "Any";
undefined-doc-class = "Any";
undefined-doc-name = "Any";
undefined-doc-param = "Any";
undefined-env-child = "Any";
undefined-field = "Opened";
undefined-global = "Any";
unknown-cast-variable = "Any";
unknown-diag-code = "Any";
unknown-operator = "Any";
unreachable-code = "Opened";
unused-function = "Opened";
unused-label = "Opened";
unused-local = "Opened";
unused-vararg = "Opened";
}
Type: null or (attribute set of (one of “Any”, “Opened”, “None”, “Any!”, “Opened!”, “None!” or raw lua code))
Default:
null
Declared by:
plugins.lsp.servers.lua-ls.settings.diagnostics.severity
Maps diagnostic groups to severity levels.
"Error"
- An error will be raised"Warning"
- A warning will be raised"Information"
- An information or note will be raised"Hint"
- The affected code will be “hinted” at"Error!"
- Like"Error"
but overridesdiagnostics.groupSeverity
"Warning!"
-Like"Warning"
but overridesdiagnostics.groupSeverity
"Information!"
- Like"Information"
but overridesdiagnostics.groupSeverity
"Hint!"
- Like"Hint"
but overridesdiagnostics.groupSeverity
Plugin default:
{
ambiguity-1 = "Warning";
assign-type-mismatch = "Warning";
await-in-sync = "Warning";
cast-local-type = "Warning";
cast-type-mismatch = "Warning";
circle-doc-class = "Warning";
close-non-object = "Warning";
code-after-break = "Hint";
codestyle-check = "Warning";
count-down-loop = "Warning";
deprecated = "Warning";
different-requires = "Warning";
discard-returns = "Warning";
doc-field-no-class = "Warning";
duplicate-doc-alias = "Warning";
duplicate-doc-field = "Warning";
duplicate-doc-param = "Warning";
duplicate-index = "Warning";
duplicate-set-field = "Warning";
empty-block = "Hint";
global-in-nil-env = "Warning";
lowercase-global = "Information";
missing-parameter = "Warning";
missing-return = "Warning";
missing-return-value = "Warning";
need-check-nil = "Warning";
newfield-call = "Warning";
newline-call = "Warning";
no-unknown = "Warning";
not-yieldable = "Warning";
param-type-mismatch = "Warning";
redefined-local = "Hint";
redundant-parameter = "Warning";
redundant-return = "Hint";
redundant-return-value = "Warning";
redundant-value = "Warning";
return-type-mismatch = "Warning";
spell-check = "Information";
trailing-space = "Hint";
unbalanced-assignments = "Warning";
undefined-doc-class = "Warning";
undefined-doc-name = "Warning";
undefined-doc-param = "Warning";
undefined-env-child = "Information";
undefined-field = "Warning";
undefined-global = "Warning";
unknown-cast-variable = "Warning";
unknown-diag-code = "Warning";
unknown-operator = "Warning";
unreachable-code = "Hint";
unused-function = "Hint";
unused-label = "Hint";
unused-local = "Hint";
unused-vararg = "Hint";
}
Type: null or (attribute set of (one of “Error”, “Warning”, “Information”, “Hint”, “Error!”, “Warning!”, “Information!”, “Hint!” or raw lua code))
Default:
null
Declared by:
plugins.lsp.servers.lua-ls.settings.diagnostics.unusedLocalExclude
Define variable names that will not be reported as an unused local by
unused-local
.
Plugin default: [ ]
Type: null or (list of (string or raw lua code))
Default:
null
Declared by:
plugins.lsp.servers.lua-ls.settings.diagnostics.workspaceDelay
Define the delay between diagnoses of the workspace in milliseconds. Every time a file is edited, created, deleted, etc. the workspace will be re-diagnosed in the background after this delay. Setting to a negative number will disable workspace diagnostics.
Plugin default: 3000
Type: null or unsigned integer, meaning >=0, or raw lua code
Default:
null
Declared by:
plugins.lsp.servers.lua-ls.settings.diagnostics.workspaceEvent
Set when the workspace diagnostics should be analyzed. It can be performed after each change, after a save, or never automatically triggered.
Valid events:
"OnChange"
"OnSave"
"None"
Plugin default: "OnSave"
Type: null or one of “OnChange”, “OnSave”, “None” or raw lua code
Default:
null
Declared by:
plugins.lsp.servers.lua-ls.settings.diagnostics.workspaceRate
Define the rate at which the workspace will be diagnosed as a percentage.
100
is 100% speed so the workspace will be diagnosed as fast as possible.
The rate can be lowered to reduce CPU usage, but the diagnosis speed will also become slower.
The currently opened file will always be diagnosed at 100
% speed, regardless of this setting.
Plugin default: 100
Type: null or unsigned integer, meaning >=0, or raw lua code
Default:
null
Declared by: