---@meta

---@class _.lspconfig.settings.lua_ls.Lua.AddonManager
---Whether the addon manager is enabled or not.
---
---```lua
---default = true
---```
---@field enable? boolean
---Specifies the git branch used by the addon manager.
---
---```lua
---default = ""
---```
---@field repositoryBranch? string
---Specifies the git path used by the addon manager.
---
---```lua
---default = ""
---```
---@field repositoryPath? string

---@class _.lspconfig.settings.lua_ls.Lua.CodeLens
---Enable code lens.
---@field enable? boolean

---@class _.lspconfig.settings.lua_ls.Lua.Completion
---When the input looks like a file name, automatically `require` this file.
---
---```lua
---default = true
---```
---@field autoRequire? boolean
---Shows function call snippets.
---
---```lua
---default = "Disable"
---```
---@field callSnippet? "Disable" | "Both" | "Replace"
---Previewing the relevant code snippet of the suggestion may help you understand the usage of the suggestion. The number set indicates the number of intercepted lines in the code fragment. If it is set to `0`, this feature can be disabled.
---
---```lua
---default = 0
---```
---@field displayContext? integer
---Enable completion.
---
---```lua
---default = true
---```
---@field enable? boolean
---Shows keyword syntax snippets.
---
---```lua
---default = "Replace"
---```
---@field keywordSnippet? "Disable" | "Both" | "Replace"
---Maximum number of fields to analyze for completions. When an object has more fields than this limit, completions will require more specific input to appear.
---
---```lua
---default = 100
---```
---@field maxSuggestCount? integer
---The symbol used to trigger the postfix suggestion.
---
---```lua
---default = "@"
---```
---@field postfix? string
---The separator used when `require`.
---
---```lua
---default = "."
---```
---@field requireSeparator? string
---Display parameters in completion list. When the function has multiple definitions, they will be displayed separately.
---
---```lua
---default = true
---```
---@field showParams? boolean
---Show contextual words in suggestions.
---
---```lua
---default = "Fallback"
---```
---@field showWord? "Enable" | "Fallback" | "Disable"
---Whether the displayed context word contains the content of other files in the workspace.
---
---```lua
---default = true
---```
---@field workspaceWord? boolean

---Modify the diagnostic needed file status in a group.
---
---* Opened:  only diagnose opened files
---* Any:     diagnose all files
---* None:    disable this diagnostic
---
---`Fallback` means that diagnostics in this group are controlled by `diagnostics.neededFileStatus` separately.
---Other settings will override individual settings without end of `!`.
---
---@class _.lspconfig.settings.lua_ls.Lua.Diagnostics.GroupFileStatus
---* ambiguity-1
---* count-down-loop
---* different-requires
---* newfield-call
---* newline-call
---
---```lua
---default = "Fallback"
---```
---@field ambiguity? "Any" | "Opened" | "None" | "Fallback"
---* await-in-sync
---* not-yieldable
---
---```lua
---default = "Fallback"
---```
---@field await? "Any" | "Opened" | "None" | "Fallback"
---* codestyle-check
---* name-style-check
---* spell-check
---
---```lua
---default = "Fallback"
---```
---@field codestyle? "Any" | "Opened" | "None" | "Fallback"
---* global-element
---
---```lua
---default = "Fallback"
---```
---@field conventions? "Any" | "Opened" | "None" | "Fallback"
---* duplicate-index
---* duplicate-set-field
---
---```lua
---default = "Fallback"
---```
---@field duplicate? "Any" | "Opened" | "None" | "Fallback"
---* global-in-nil-env
---* lowercase-global
---* undefined-env-child
---* undefined-global
---
---```lua
---default = "Fallback"
---```
---@field global? "Any" | "Opened" | "None" | "Fallback"
---* circle-doc-class
---* doc-field-no-class
---* duplicate-doc-alias
---* duplicate-doc-field
---* duplicate-doc-param
---* incomplete-signature-doc
---* missing-global-doc
---* missing-local-export-doc
---* undefined-doc-class
---* undefined-doc-name
---* undefined-doc-param
---* unknown-cast-variable
---* unknown-diag-code
---* unknown-operator
---
---```lua
---default = "Fallback"
---```
---@field luadoc? "Any" | "Opened" | "None" | "Fallback"
---* redefined-local
---
---```lua
---default = "Fallback"
---```
---@field redefined? "Any" | "Opened" | "None" | "Fallback"
---* close-non-object
---* deprecated
---* discard-returns
---* invisible
---
---```lua
---default = "Fallback"
---```
---@field strict? "Any" | "Opened" | "None" | "Fallback"
---* no-unknown
---
---```lua
---default = "Fallback"
---```
---@field strong? "Any" | "Opened" | "None" | "Fallback"
---* assign-type-mismatch
---* cast-local-type
---* cast-type-mismatch
---* inject-field
---* need-check-nil
---* param-type-mismatch
---* return-type-mismatch
---* undefined-field
---
---```lua
---default = "Fallback"
---```
---@field ["type-check"]? "Any" | "Opened" | "None" | "Fallback"
---* missing-fields
---* missing-parameter
---* missing-return
---* missing-return-value
---* redundant-parameter
---* redundant-return-value
---* redundant-value
---* unbalanced-assignments
---
---```lua
---default = "Fallback"
---```
---@field unbalanced? "Any" | "Opened" | "None" | "Fallback"
---* code-after-break
---* empty-block
---* redundant-return
---* trailing-space
---* unreachable-code
---* unused-function
---* unused-label
---* unused-local
---* unused-vararg
---
---```lua
---default = "Fallback"
---```
---@field unused? "Any" | "Opened" | "None" | "Fallback"

---Modify the diagnostic severity in a group.
---`Fallback` means that diagnostics in this group are controlled by `diagnostics.severity` separately.
---Other settings will override individual settings without end of `!`.
---
---@class _.lspconfig.settings.lua_ls.Lua.Diagnostics.GroupSeverity
---* ambiguity-1
---* count-down-loop
---* different-requires
---* newfield-call
---* newline-call
---
---```lua
---default = "Fallback"
---```
---@field ambiguity? "Error" | "Warning" | "Information" | "Hint" | "Fallback"
---* await-in-sync
---* not-yieldable
---
---```lua
---default = "Fallback"
---```
---@field await? "Error" | "Warning" | "Information" | "Hint" | "Fallback"
---* codestyle-check
---* name-style-check
---* spell-check
---
---```lua
---default = "Fallback"
---```
---@field codestyle? "Error" | "Warning" | "Information" | "Hint" | "Fallback"
---* global-element
---
---```lua
---default = "Fallback"
---```
---@field conventions? "Error" | "Warning" | "Information" | "Hint" | "Fallback"
---* duplicate-index
---* duplicate-set-field
---
---```lua
---default = "Fallback"
---```
---@field duplicate? "Error" | "Warning" | "Information" | "Hint" | "Fallback"
---* global-in-nil-env
---* lowercase-global
---* undefined-env-child
---* undefined-global
---
---```lua
---default = "Fallback"
---```
---@field global? "Error" | "Warning" | "Information" | "Hint" | "Fallback"
---* circle-doc-class
---* doc-field-no-class
---* duplicate-doc-alias
---* duplicate-doc-field
---* duplicate-doc-param
---* incomplete-signature-doc
---* missing-global-doc
---* missing-local-export-doc
---* undefined-doc-class
---* undefined-doc-name
---* undefined-doc-param
---* unknown-cast-variable
---* unknown-diag-code
---* unknown-operator
---
---```lua
---default = "Fallback"
---```
---@field luadoc? "Error" | "Warning" | "Information" | "Hint" | "Fallback"
---* redefined-local
---
---```lua
---default = "Fallback"
---```
---@field redefined? "Error" | "Warning" | "Information" | "Hint" | "Fallback"
---* close-non-object
---* deprecated
---* discard-returns
---* invisible
---
---```lua
---default = "Fallback"
---```
---@field strict? "Error" | "Warning" | "Information" | "Hint" | "Fallback"
---* no-unknown
---
---```lua
---default = "Fallback"
---```
---@field strong? "Error" | "Warning" | "Information" | "Hint" | "Fallback"
---* assign-type-mismatch
---* cast-local-type
---* cast-type-mismatch
---* inject-field
---* need-check-nil
---* param-type-mismatch
---* return-type-mismatch
---* undefined-field
---
---```lua
---default = "Fallback"
---```
---@field ["type-check"]? "Error" | "Warning" | "Information" | "Hint" | "Fallback"
---* missing-fields
---* missing-parameter
---* missing-return
---* missing-return-value
---* redundant-parameter
---* redundant-return-value
---* redundant-value
---* unbalanced-assignments
---
---```lua
---default = "Fallback"
---```
---@field unbalanced? "Error" | "Warning" | "Information" | "Hint" | "Fallback"
---* code-after-break
---* empty-block
---* redundant-return
---* trailing-space
---* unreachable-code
---* unused-function
---* unused-label
---* unused-local
---* unused-vararg
---
---```lua
---default = "Fallback"
---```
---@field unused? "Error" | "Warning" | "Information" | "Hint" | "Fallback"

---* Opened:  only diagnose opened files
---* Any:     diagnose all files
---* None:    disable this diagnostic
---
---End with `!` means override the group setting `diagnostics.groupFileStatus`.
---
---@class _.lspconfig.settings.lua_ls.Lua.Diagnostics.NeededFileStatus
---Enable ambiguous operator precedence diagnostics. For example, the `num or 0 + 1` expression will be suggested `(num or 0) + 1` instead.
---
---```lua
---default = "Any"
---```
---@field ["ambiguity-1"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable diagnostics for assignments in which the value's type does not match the type of the assigned variable.
---
---```lua
---default = "Opened"
---```
---@field ["assign-type-mismatch"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable diagnostics for calls of asynchronous functions within a synchronous function.
---
---```lua
---default = "None"
---```
---@field ["await-in-sync"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable diagnostics for casts of local variables where the target type does not match the defined type.
---
---```lua
---default = "Opened"
---```
---@field ["cast-local-type"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable diagnostics for casts where the target type does not match the initial type.
---
---```lua
---default = "Opened"
---```
---@field ["cast-type-mismatch"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---TODO: Needs documentation
---
---```lua
---default = "Any"
---```
---@field ["circle-doc-class"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable diagnostics for attempts to close a variable with a non-object.
---
---```lua
---default = "Any"
---```
---@field ["close-non-object"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable diagnostics for code placed after a break statement in a loop.
---
---```lua
---default = "Opened"
---```
---@field ["code-after-break"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable diagnostics for incorrectly styled lines.
---
---```lua
---default = "None"
---```
---@field ["codestyle-check"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable diagnostics for `for` loops which will never reach their max/limit because the loop is incrementing instead of decrementing.
---
---```lua
---default = "Any"
---```
---@field ["count-down-loop"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable diagnostics to highlight deprecated API.
---
---```lua
---default = "Any"
---```
---@field deprecated? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable diagnostics for files which are required by two different paths.
---
---```lua
---default = "Any"
---```
---@field ["different-requires"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable diagnostics for calls of functions annotated with `---@nodiscard` where the return values are ignored.
---
---```lua
---default = "Any"
---```
---@field ["discard-returns"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable diagnostics to highlight a field annotation without a defining class annotation.
---
---```lua
---default = "Any"
---```
---@field ["doc-field-no-class"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable diagnostics for a duplicated alias annotation name.
---
---```lua
---default = "Any"
---```
---@field ["duplicate-doc-alias"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable diagnostics for a duplicated field annotation name.
---
---```lua
---default = "Any"
---```
---@field ["duplicate-doc-field"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable diagnostics for a duplicated param annotation name.
---
---```lua
---default = "Any"
---```
---@field ["duplicate-doc-param"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable duplicate table index diagnostics.
---
---```lua
---default = "Any"
---```
---@field ["duplicate-index"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable diagnostics for setting the same field in a class more than once.
---
---```lua
---default = "Opened"
---```
---@field ["duplicate-set-field"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable empty code block diagnostics.
---
---```lua
---default = "Opened"
---```
---@field ["empty-block"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable diagnostics to warn about global elements.
---
---```lua
---default = "None"
---```
---@field ["global-element"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable cannot use global variables （ `_ENV` is set to `nil`） diagnostics.
---
---```lua
---default = "Any"
---```
---@field ["global-in-nil-env"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Incomplete @param or @return annotations for functions.
---
---```lua
---default = "None"
---```
---@field ["incomplete-signature-doc"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---TODO: Needs documentation
---
---```lua
---default = "Opened"
---```
---@field ["inject-field"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable diagnostics for accesses to fields which are invisible.
---
---```lua
---default = "Any"
---```
---@field invisible? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable lowercase global variable definition diagnostics.
---
---```lua
---default = "Any"
---```
---@field ["lowercase-global"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---TODO: Needs documentation
---
---```lua
---default = "Any"
---```
---@field ["missing-fields"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Missing annotations for globals! Global functions must have a comment and annotations for all parameters and return values.
---
---```lua
---default = "None"
---```
---@field ["missing-global-doc"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Missing annotations for exported locals! Exported local functions must have a comment and annotations for all parameters and return values.
---
---```lua
---default = "None"
---```
---@field ["missing-local-export-doc"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable diagnostics for function calls where the number of arguments is less than the number of annotated function parameters.
---
---```lua
---default = "Any"
---```
---@field ["missing-parameter"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable diagnostics for functions with return annotations which have no return statement.
---
---```lua
---default = "Any"
---```
---@field ["missing-return"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable diagnostics for return statements without values although the containing function declares returns.
---
---```lua
---default = "Any"
---```
---@field ["missing-return-value"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable diagnostics for name style.
---
---```lua
---default = "None"
---```
---@field ["name-style-check"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable diagnostics for variable usages if `nil` or an optional (potentially `nil`) value was assigned to the variable before.
---
---```lua
---default = "Opened"
---```
---@field ["need-check-nil"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable newfield call diagnostics. It is raised when the parenthesis of a function call appear on the following line when defining a field in a table.
---
---```lua
---default = "Any"
---```
---@field ["newfield-call"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable newline call diagnostics. It's raised when a line starting with `(` is encountered, which is syntactically parsed as a function call on the previous line.
---
---```lua
---default = "Any"
---```
---@field ["newline-call"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable diagnostics for cases in which the type cannot be inferred.
---
---```lua
---default = "None"
---```
---@field ["no-unknown"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable diagnostics for calls to `coroutine.yield()` when it is not permitted.
---
---```lua
---default = "None"
---```
---@field ["not-yieldable"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable diagnostics for function calls where the type of a provided parameter does not match the type of the annotated function definition.
---
---```lua
---default = "Opened"
---```
---@field ["param-type-mismatch"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable redefined local variable diagnostics.
---
---```lua
---default = "Opened"
---```
---@field ["redefined-local"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable redundant function parameter diagnostics.
---
---```lua
---default = "Any"
---```
---@field ["redundant-parameter"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable diagnostics for return statements which are not needed because the function would exit on its own.
---
---```lua
---default = "Opened"
---```
---@field ["redundant-return"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable diagnostics for return statements which return an extra value which is not specified by a return annotation.
---
---```lua
---default = "Any"
---```
---@field ["redundant-return-value"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable the redundant values assigned diagnostics. It's raised during assignment operation, when the number of values is higher than the number of objects being assigned.
---
---```lua
---default = "Any"
---```
---@field ["redundant-value"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable diagnostics for return values whose type does not match the type declared in the corresponding return annotation.
---
---```lua
---default = "Opened"
---```
---@field ["return-type-mismatch"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable diagnostics for typos in strings.
---
---```lua
---default = "None"
---```
---@field ["spell-check"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable trailing space diagnostics.
---
---```lua
---default = "Opened"
---```
---@field ["trailing-space"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable diagnostics on multiple assignments if not all variables obtain a value (e.g., `local x,y = 1`).
---
---```lua
---default = "Any"
---```
---@field ["unbalanced-assignments"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable diagnostics for class annotations in which an undefined class is referenced.
---
---```lua
---default = "Any"
---```
---@field ["undefined-doc-class"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable diagnostics for type annotations referencing an undefined type or alias.
---
---```lua
---default = "Any"
---```
---@field ["undefined-doc-name"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable diagnostics for cases in which a parameter annotation is given without declaring the parameter in the function definition.
---
---```lua
---default = "Any"
---```
---@field ["undefined-doc-param"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable undefined environment variable diagnostics. It's raised when `_ENV` table is set to a new literal table, but the used global variable is no longer present in the global environment.
---
---```lua
---default = "Any"
---```
---@field ["undefined-env-child"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable diagnostics for cases in which an undefined field of a variable is read.
---
---```lua
---default = "Opened"
---```
---@field ["undefined-field"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable undefined global variable diagnostics.
---
---```lua
---default = "Any"
---```
---@field ["undefined-global"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable diagnostics for casts of undefined variables.
---
---```lua
---default = "Any"
---```
---@field ["unknown-cast-variable"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable diagnostics in cases in which an unknown diagnostics code is entered.
---
---```lua
---default = "Any"
---```
---@field ["unknown-diag-code"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable diagnostics for unknown operators.
---
---```lua
---default = "Any"
---```
---@field ["unknown-operator"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable diagnostics for unreachable code.
---
---```lua
---default = "Opened"
---```
---@field ["unreachable-code"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable unused function diagnostics.
---
---```lua
---default = "Opened"
---```
---@field ["unused-function"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable unused label diagnostics.
---
---```lua
---default = "Opened"
---```
---@field ["unused-label"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable unused local variable diagnostics.
---
---```lua
---default = "Opened"
---```
---@field ["unused-local"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"
---Enable unused vararg diagnostics.
---
---```lua
---default = "Opened"
---```
---@field ["unused-vararg"]? "Any" | "Opened" | "None" | "Any!" | "Opened!" | "None!"

---Modify the diagnostic severity.
---
---End with `!` means override the group setting `diagnostics.groupSeverity`.
---
---@class _.lspconfig.settings.lua_ls.Lua.Diagnostics.Severity
---Enable ambiguous operator precedence diagnostics. For example, the `num or 0 + 1` expression will be suggested `(num or 0) + 1` instead.
---
---```lua
---default = "Warning"
---```
---@field ["ambiguity-1"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable diagnostics for assignments in which the value's type does not match the type of the assigned variable.
---
---```lua
---default = "Warning"
---```
---@field ["assign-type-mismatch"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable diagnostics for calls of asynchronous functions within a synchronous function.
---
---```lua
---default = "Warning"
---```
---@field ["await-in-sync"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable diagnostics for casts of local variables where the target type does not match the defined type.
---
---```lua
---default = "Warning"
---```
---@field ["cast-local-type"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable diagnostics for casts where the target type does not match the initial type.
---
---```lua
---default = "Warning"
---```
---@field ["cast-type-mismatch"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---TODO: Needs documentation
---
---```lua
---default = "Warning"
---```
---@field ["circle-doc-class"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable diagnostics for attempts to close a variable with a non-object.
---
---```lua
---default = "Warning"
---```
---@field ["close-non-object"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable diagnostics for code placed after a break statement in a loop.
---
---```lua
---default = "Hint"
---```
---@field ["code-after-break"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable diagnostics for incorrectly styled lines.
---
---```lua
---default = "Warning"
---```
---@field ["codestyle-check"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable diagnostics for `for` loops which will never reach their max/limit because the loop is incrementing instead of decrementing.
---
---```lua
---default = "Warning"
---```
---@field ["count-down-loop"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable diagnostics to highlight deprecated API.
---
---```lua
---default = "Warning"
---```
---@field deprecated? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable diagnostics for files which are required by two different paths.
---
---```lua
---default = "Warning"
---```
---@field ["different-requires"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable diagnostics for calls of functions annotated with `---@nodiscard` where the return values are ignored.
---
---```lua
---default = "Warning"
---```
---@field ["discard-returns"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable diagnostics to highlight a field annotation without a defining class annotation.
---
---```lua
---default = "Warning"
---```
---@field ["doc-field-no-class"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable diagnostics for a duplicated alias annotation name.
---
---```lua
---default = "Warning"
---```
---@field ["duplicate-doc-alias"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable diagnostics for a duplicated field annotation name.
---
---```lua
---default = "Warning"
---```
---@field ["duplicate-doc-field"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable diagnostics for a duplicated param annotation name.
---
---```lua
---default = "Warning"
---```
---@field ["duplicate-doc-param"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable duplicate table index diagnostics.
---
---```lua
---default = "Warning"
---```
---@field ["duplicate-index"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable diagnostics for setting the same field in a class more than once.
---
---```lua
---default = "Warning"
---```
---@field ["duplicate-set-field"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable empty code block diagnostics.
---
---```lua
---default = "Hint"
---```
---@field ["empty-block"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable diagnostics to warn about global elements.
---
---```lua
---default = "Warning"
---```
---@field ["global-element"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable cannot use global variables （ `_ENV` is set to `nil`） diagnostics.
---
---```lua
---default = "Warning"
---```
---@field ["global-in-nil-env"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Incomplete @param or @return annotations for functions.
---
---```lua
---default = "Warning"
---```
---@field ["incomplete-signature-doc"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---TODO: Needs documentation
---
---```lua
---default = "Warning"
---```
---@field ["inject-field"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable diagnostics for accesses to fields which are invisible.
---
---```lua
---default = "Warning"
---```
---@field invisible? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable lowercase global variable definition diagnostics.
---
---```lua
---default = "Information"
---```
---@field ["lowercase-global"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---TODO: Needs documentation
---
---```lua
---default = "Warning"
---```
---@field ["missing-fields"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Missing annotations for globals! Global functions must have a comment and annotations for all parameters and return values.
---
---```lua
---default = "Warning"
---```
---@field ["missing-global-doc"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Missing annotations for exported locals! Exported local functions must have a comment and annotations for all parameters and return values.
---
---```lua
---default = "Warning"
---```
---@field ["missing-local-export-doc"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable diagnostics for function calls where the number of arguments is less than the number of annotated function parameters.
---
---```lua
---default = "Warning"
---```
---@field ["missing-parameter"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable diagnostics for functions with return annotations which have no return statement.
---
---```lua
---default = "Warning"
---```
---@field ["missing-return"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable diagnostics for return statements without values although the containing function declares returns.
---
---```lua
---default = "Warning"
---```
---@field ["missing-return-value"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable diagnostics for name style.
---
---```lua
---default = "Warning"
---```
---@field ["name-style-check"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable diagnostics for variable usages if `nil` or an optional (potentially `nil`) value was assigned to the variable before.
---
---```lua
---default = "Warning"
---```
---@field ["need-check-nil"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable newfield call diagnostics. It is raised when the parenthesis of a function call appear on the following line when defining a field in a table.
---
---```lua
---default = "Warning"
---```
---@field ["newfield-call"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable newline call diagnostics. It's raised when a line starting with `(` is encountered, which is syntactically parsed as a function call on the previous line.
---
---```lua
---default = "Warning"
---```
---@field ["newline-call"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable diagnostics for cases in which the type cannot be inferred.
---
---```lua
---default = "Warning"
---```
---@field ["no-unknown"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable diagnostics for calls to `coroutine.yield()` when it is not permitted.
---
---```lua
---default = "Warning"
---```
---@field ["not-yieldable"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable diagnostics for function calls where the type of a provided parameter does not match the type of the annotated function definition.
---
---```lua
---default = "Warning"
---```
---@field ["param-type-mismatch"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable redefined local variable diagnostics.
---
---```lua
---default = "Hint"
---```
---@field ["redefined-local"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable redundant function parameter diagnostics.
---
---```lua
---default = "Warning"
---```
---@field ["redundant-parameter"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable diagnostics for return statements which are not needed because the function would exit on its own.
---
---```lua
---default = "Hint"
---```
---@field ["redundant-return"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable diagnostics for return statements which return an extra value which is not specified by a return annotation.
---
---```lua
---default = "Warning"
---```
---@field ["redundant-return-value"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable the redundant values assigned diagnostics. It's raised during assignment operation, when the number of values is higher than the number of objects being assigned.
---
---```lua
---default = "Warning"
---```
---@field ["redundant-value"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable diagnostics for return values whose type does not match the type declared in the corresponding return annotation.
---
---```lua
---default = "Warning"
---```
---@field ["return-type-mismatch"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable diagnostics for typos in strings.
---
---```lua
---default = "Information"
---```
---@field ["spell-check"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable trailing space diagnostics.
---
---```lua
---default = "Hint"
---```
---@field ["trailing-space"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable diagnostics on multiple assignments if not all variables obtain a value (e.g., `local x,y = 1`).
---
---```lua
---default = "Warning"
---```
---@field ["unbalanced-assignments"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable diagnostics for class annotations in which an undefined class is referenced.
---
---```lua
---default = "Warning"
---```
---@field ["undefined-doc-class"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable diagnostics for type annotations referencing an undefined type or alias.
---
---```lua
---default = "Warning"
---```
---@field ["undefined-doc-name"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable diagnostics for cases in which a parameter annotation is given without declaring the parameter in the function definition.
---
---```lua
---default = "Warning"
---```
---@field ["undefined-doc-param"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable undefined environment variable diagnostics. It's raised when `_ENV` table is set to a new literal table, but the used global variable is no longer present in the global environment.
---
---```lua
---default = "Information"
---```
---@field ["undefined-env-child"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable diagnostics for cases in which an undefined field of a variable is read.
---
---```lua
---default = "Warning"
---```
---@field ["undefined-field"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable undefined global variable diagnostics.
---
---```lua
---default = "Warning"
---```
---@field ["undefined-global"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable diagnostics for casts of undefined variables.
---
---```lua
---default = "Warning"
---```
---@field ["unknown-cast-variable"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable diagnostics in cases in which an unknown diagnostics code is entered.
---
---```lua
---default = "Warning"
---```
---@field ["unknown-diag-code"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable diagnostics for unknown operators.
---
---```lua
---default = "Warning"
---```
---@field ["unknown-operator"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable diagnostics for unreachable code.
---
---```lua
---default = "Hint"
---```
---@field ["unreachable-code"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable unused function diagnostics.
---
---```lua
---default = "Hint"
---```
---@field ["unused-function"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable unused label diagnostics.
---
---```lua
---default = "Hint"
---```
---@field ["unused-label"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable unused local variable diagnostics.
---
---```lua
---default = "Hint"
---```
---@field ["unused-local"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"
---Enable unused vararg diagnostics.
---
---```lua
---default = "Hint"
---```
---@field ["unused-vararg"]? "Error" | "Warning" | "Information" | "Hint" | "Error!" | "Warning!" | "Information!" | "Hint!"

---@class _.lspconfig.settings.lua_ls.Lua.Diagnostics
---Disabled diagnostic (Use code in hover brackets).
---
---```lua
---default = {}
---```
---@field disable? string[]
---Enable diagnostics.
---
---```lua
---default = true
---```
---@field enable? boolean
---TODO: Needs documentation
---
---```lua
---default = { "file" }
---```
---@field enableScheme? string[]
---Defined global variables.
---
---```lua
---default = {}
---```
---@field globals? string[]
---Find defined global variables using regex.
---
---```lua
---default = {}
---```
---@field globalsRegex? string[]
---Modify the diagnostic needed file status in a group.
---
---* Opened:  only diagnose opened files
---* Any:     diagnose all files
---* None:    disable this diagnostic
---
---`Fallback` means that diagnostics in this group are controlled by `diagnostics.neededFileStatus` separately.
---Other settings will override individual settings without end of `!`.
---
---@field groupFileStatus? _.lspconfig.settings.lua_ls.Lua.Diagnostics.GroupFileStatus
---Modify the diagnostic severity in a group.
---`Fallback` means that diagnostics in this group are controlled by `diagnostics.severity` separately.
---Other settings will override individual settings without end of `!`.
---
---@field groupSeverity? _.lspconfig.settings.lua_ls.Lua.Diagnostics.GroupSeverity
---How to diagnose ignored files.
---
---```lua
---default = "Opened"
---```
---@field ignoredFiles? "Enable" | "Opened" | "Disable"
---How to diagnose files loaded via `Lua.workspace.library`.
---
---```lua
---default = "Opened"
---```
---@field libraryFiles? "Enable" | "Opened" | "Disable"
---* Opened:  only diagnose opened files
---* Any:     diagnose all files
---* None:    disable this diagnostic
---
---End with `!` means override the group setting `diagnostics.groupFileStatus`.
---
---@field neededFileStatus? _.lspconfig.settings.lua_ls.Lua.Diagnostics.NeededFileStatus
---Modify the diagnostic severity.
---
---End with `!` means override the group setting `diagnostics.groupSeverity`.
---
---@field severity? _.lspconfig.settings.lua_ls.Lua.Diagnostics.Severity
---Do not diagnose `unused-local` when the variable name matches the following pattern.
---
---```lua
---default = {}
---```
---@field unusedLocalExclude? string[]
---Latency (milliseconds) for workspace diagnostics.
---
---```lua
---default = 3000
---```
---@field workspaceDelay? integer
---Set the time to trigger workspace diagnostics.
---
---```lua
---default = "OnSave"
---```
---@field workspaceEvent? "OnChange" | "OnSave" | "None"
---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.
---
---```lua
---default = 100
---```
---@field workspaceRate? integer

---@class _.lspconfig.settings.lua_ls.Lua.Doc
---Treat specific field names as package, e.g. `m_*` means `XXX.m_id` and `XXX.m_type` are package, witch can only be accessed in the file where the definition is located.
---
---```lua
---default = {}
---```
---@field packageName? string[]
---Treat specific field names as private, e.g. `m_*` means `XXX.m_id` and `XXX.m_type` are private, witch can only be accessed in the class where the definition is located.
---
---```lua
---default = {}
---```
---@field privateName? string[]
---Treat specific field names as protected, e.g. `m_*` means `XXX.m_id` and `XXX.m_type` are protected, witch can only be accessed in the class where the definition is located and its subclasses.
---
---```lua
---default = {}
---```
---@field protectedName? string[]
---The regular expression engine used for matching documentation scope names.
---
---```lua
---default = "glob"
---```
---@field regengine? "glob" | "lua"

---@class _.lspconfig.settings.lua_ls.Lua.Format
---The default format configuration. Has a lower priority than `.editorconfig` file in the workspace.
---Read [formatter docs](https://github.com/CppCXY/EmmyLuaCodeStyle/tree/master/docs) to learn usage.
---
---
---```lua
---default = {}
---```
---@field defaultConfig? table
---Enable code formatter.
---
---```lua
---default = true
---```
---@field enable? boolean

---@class _.lspconfig.settings.lua_ls.Lua.Hint
---Show hints of array index when constructing a table.
---
---```lua
---default = "Auto"
---```
---@field arrayIndex? "Enable" | "Auto" | "Disable"
---If the called function is marked `---@async`, prompt `await` at the call.
---
---```lua
---default = true
---```
---@field await? boolean
---Enable the propagation of `await`. When a function calls a function marked `---@async`,it will be automatically marked as `---@async`.
---@field awaitPropagate? boolean
---Enable inlay hint.
---@field enable? boolean
---Show hints of parameter name at the function call.
---
---```lua
---default = "All"
---```
---@field paramName? "All" | "Literal" | "Disable"
---Show type hints at the parameter of the function.
---
---```lua
---default = true
---```
---@field paramType? boolean
---If there is no semicolon at the end of the statement, display a virtual semicolon.
---
---```lua
---default = "SameLine"
---```
---@field semicolon? "All" | "SameLine" | "Disable"
---Show hints of type at assignment operation.
---@field setType? boolean

---@class _.lspconfig.settings.lua_ls.Lua.Hover
---Enable hover.
---
---```lua
---default = true
---```
---@field enable? boolean
---When the value corresponds to multiple types, limit the number of types displaying.
---
---```lua
---default = 5
---```
---@field enumsLimit? integer
---Whether to expand the alias. For example, expands `---@alias myType boolean|number` appears as `boolean|number`, otherwise it appears as `myType'.
---
---
---```lua
---default = true
---```
---@field expandAlias? boolean
---When hovering to view a table, limits the maximum number of previews for fields.
---
---```lua
---default = 10
---```
---@field previewFields? integer
---Hover to view numeric content (only if literal is not decimal).
---
---```lua
---default = true
---```
---@field viewNumber? boolean
---Hover to view the contents of a string (only if the literal contains an escape character).
---
---```lua
---default = true
---```
---@field viewString? boolean
---The maximum length of a hover to view the contents of a string.
---
---```lua
---default = 1000
---```
---@field viewStringMax? integer

---@class _.lspconfig.settings.lua_ls.Lua.Language
---(VSCode only) Automatically insert "---@ " after a line break following a annotation.
---
---```lua
---default = true
---```
---@field completeAnnotation? boolean
---(VSCode only) Fix incorrect auto-indentation, such as incorrect indentation when line breaks occur within a string containing the word "function".
---
---```lua
---default = true
---```
---@field fixIndent? boolean

---@class _.lspconfig.settings.lua_ls.Lua.Misc
---Specify the executable path in VSCode.
---
---```lua
---default = ""
---```
---@field executablePath? string
---[Command line parameters](https://github.com/LuaLS/lua-telemetry-server/tree/master/method) when starting the language server in VSCode.
---
---```lua
---default = {}
---```
---@field parameters? string[]

---@class _.lspconfig.settings.lua_ls.Lua.NameStyle
---Set name style config.
---Read [formatter docs](https://github.com/CppCXY/EmmyLuaCodeStyle/tree/master/docs) to learn usage.
---
---
---```lua
---default = {}
---```
---@field config? table

---Adjust the enabled state of the built-in library. You can disable (or redefine) the non-existent library according to the actual runtime environment.
---
---* `default`: Indicates that the library will be enabled or disabled according to the runtime version
---* `enable`: always enable
---* `disable`: always disable
---
---@class _.lspconfig.settings.lua_ls.Lua.Runtime.Builtin
---TODO: Needs documentation
---
---```lua
---default = "default"
---```
---@field basic? "default" | "enable" | "disable"
---TODO: Needs documentation
---
---```lua
---default = "default"
---```
---@field bit? "default" | "enable" | "disable"
---TODO: Needs documentation
---
---```lua
---default = "default"
---```
---@field bit32? "default" | "enable" | "disable"
---TODO: Needs documentation
---
---```lua
---default = "default"
---```
---@field builtin? "default" | "enable" | "disable"
---TODO: Needs documentation
---
---```lua
---default = "default"
---```
---@field coroutine? "default" | "enable" | "disable"
---TODO: Needs documentation
---
---```lua
---default = "default"
---```
---@field debug? "default" | "enable" | "disable"
---TODO: Needs documentation
---
---```lua
---default = "default"
---```
---@field ffi? "default" | "enable" | "disable"
---TODO: Needs documentation
---
---```lua
---default = "default"
---```
---@field io? "default" | "enable" | "disable"
---TODO: Needs documentation
---
---```lua
---default = "default"
---```
---@field jit? "default" | "enable" | "disable"
---TODO: Needs documentation
---
---```lua
---default = "default"
---```
---@field ["jit.profile"]? "default" | "enable" | "disable"
---TODO: Needs documentation
---
---```lua
---default = "default"
---```
---@field ["jit.util"]? "default" | "enable" | "disable"
---TODO: Needs documentation
---
---```lua
---default = "default"
---```
---@field math? "default" | "enable" | "disable"
---TODO: Needs documentation
---
---```lua
---default = "default"
---```
---@field os? "default" | "enable" | "disable"
---TODO: Needs documentation
---
---```lua
---default = "default"
---```
---@field ["package"]? "default" | "enable" | "disable"
---TODO: Needs documentation
---
---```lua
---default = "default"
---```
---@field string? "default" | "enable" | "disable"
---TODO: Needs documentation
---
---```lua
---default = "default"
---```
---@field ["string.buffer"]? "default" | "enable" | "disable"
---TODO: Needs documentation
---
---```lua
---default = "default"
---```
---@field table? "default" | "enable" | "disable"
---TODO: Needs documentation
---
---```lua
---default = "default"
---```
---@field ["table.clear"]? "default" | "enable" | "disable"
---TODO: Needs documentation
---
---```lua
---default = "default"
---```
---@field ["table.new"]? "default" | "enable" | "disable"
---TODO: Needs documentation
---
---```lua
---default = "default"
---```
---@field utf8? "default" | "enable" | "disable"

---@class _.lspconfig.settings.lua_ls.Lua.Runtime
---Adjust the enabled state of the built-in library. You can disable (or redefine) the non-existent library according to the actual runtime environment.
---
---* `default`: Indicates that the library will be enabled or disabled according to the runtime version
---* `enable`: always enable
---* `disable`: always disable
---
---@field builtin? _.lspconfig.settings.lua_ls.Lua.Runtime.Builtin
---File encoding. The `ansi` option is only available under the `Windows` platform.
---
---```lua
---default = "utf8"
---```
---@field fileEncoding? "utf8" | "ansi" | "utf16le" | "utf16be"
---Format of the directory name of the meta files.
---
---```lua
---default = "${version} ${language} ${encoding}"
---```
---@field meta? string
---Supports non-standard symbols. Make sure that your runtime environment supports these symbols.
---
---```lua
---default = {}
---```
---@field nonstandardSymbol? string[]
---When using `require`, how to find the file based on the input name.
---Setting this config to `?/init.lua` means that when you enter `require 'myfile'`, `${workspace}/myfile/init.lua` will be searched from the loaded files.
---if `runtime.pathStrict` is `false`, `${workspace}/**/myfile/init.lua` will also be searched.
---If you want to load files outside the workspace, you need to set `Lua.workspace.library` first.
---
---
---```lua
---default = { "?.lua", "?/init.lua" }
---```
---@field path? string[]
---When enabled, `runtime.path` will only search the first level of directories, see the description of `runtime.path`.
---@field pathStrict? boolean
---Plugin path. Please read [wiki](https://luals.github.io/wiki/plugins) to learn more.
---@field plugin? string|any[]
---Additional arguments for the plugin.
---@field pluginArgs? any[]|table
---The custom global variables are regarded as some special built-in variables, and the language server will provide special support
---The following example shows that 'include' is treated as' require '.
---```json
---"Lua.runtime.special" : {
---    "include" : "require"
---}
---```
---
---
---```lua
---default = {}
---```
---@field special? table
---Allows Unicode characters in name.
---@field unicodeName? boolean
---Lua runtime version.
---
---```lua
---default = "Lua 5.4"
---```
---@field version? "Lua 5.1" | "Lua 5.2" | "Lua 5.3" | "Lua 5.4" | "Lua 5.5" | "LuaJIT"

---@class _.lspconfig.settings.lua_ls.Lua.Semantic
---Semantic coloring of type annotations.
---
---```lua
---default = true
---```
---@field annotation? boolean
---Enable semantic color. You may need to set `editor.semanticHighlighting.enabled` to `true` to take effect.
---
---```lua
---default = true
---```
---@field enable? boolean
---Semantic coloring of keywords/literals/operators. You only need to enable this feature if your editor cannot do syntax coloring.
---@field keyword? boolean
---Semantic coloring of variables/fields/parameters.
---
---```lua
---default = true
---```
---@field variable? boolean

---@class _.lspconfig.settings.lua_ls.Lua.SignatureHelp
---Enable signature help.
---
---```lua
---default = true
---```
---@field enable? boolean

---@class _.lspconfig.settings.lua_ls.Lua.Spell
---Custom words for spell checking.
---
---```lua
---default = {}
---```
---@field dict? string[]

---@class _.lspconfig.settings.lua_ls.Lua.Type
---Allowed to assign the `number` type to the `integer` type.
---
---```lua
---default = true
---```
---@field castNumberToInteger? boolean
---Strictly check the shape of the table.
---
---@field checkTableShape? boolean
---When a parameter type is not annotated, it is inferred from the function's call sites.
---
---When this setting is `false`, the type of the parameter is `any` when it is not annotated.
---
---@field inferParamType? boolean
---Maximum number of table fields analyzed during type inference.
---
---```lua
---default = 10
---```
---@field inferTableSize? integer
---TODO: Needs documentation
---
---```lua
---default = 0
---```
---@field maxUnionVariants? integer
---When checking the type of union type, ignore the `nil` in it.
---
---When this setting is `false`, the `number|nil` type cannot be assigned to the `number` type. It can be with `true`.
---
---@field weakNilCheck? boolean
---Once one subtype of a union type meets the condition, the union type also meets the condition.
---
---When this setting is `false`, the `number|boolean` type cannot be assigned to the `number` type. It can be with `true`.
---
---@field weakUnionCheck? boolean

---Configures the formatting behavior while typing Lua code.
---@class _.lspconfig.settings.lua_ls.Lua.TypeFormat.Config
---Controls if `end` is automatically completed at suitable positions.
---
---```lua
---default = "true"
---```
---@field auto_complete_end? string
---Controls if a separator is automatically appended at the end of a table declaration.
---
---```lua
---default = "true"
---```
---@field auto_complete_table_sep? string
---Controls if a line is formatted at all.
---
---```lua
---default = "true"
---```
---@field format_line? string

---@class _.lspconfig.settings.lua_ls.Lua.TypeFormat
---Configures the formatting behavior while typing Lua code.
---@field config? _.lspconfig.settings.lua_ls.Lua.TypeFormat.Config

---@class _.lspconfig.settings.lua_ls.Lua.Window
---Show progress bar in status bar.
---
---```lua
---default = true
---```
---@field progressBar? boolean
---Show extension status in status bar.
---
---```lua
---default = true
---```
---@field statusBar? boolean

---@class _.lspconfig.settings.lua_ls.Lua.Workspace
---Automatic detection and adaptation of third-party libraries, currently supported libraries are:
---
---* OpenResty
---* Cocos4.0
---* LÖVE
---* LÖVR
---* skynet
---* Jass
---
---@field checkThirdParty? string|boolean
---Ignored files and directories (Use `.gitignore` grammar).
---
---```lua
---default = { ".vscode" }
---```
---@field ignoreDir? string[]
---Ignore submodules.
---
---```lua
---default = true
---```
---@field ignoreSubmodules? boolean
---In addition to the current workspace, which directories will load files from. The files in these directories will be treated as externally provided code libraries, and some features (such as renaming fields) will not modify these files.
---
---```lua
---default = {}
---```
---@field library? string[]
---Max preloaded files.
---
---```lua
---default = 5000
---```
---@field maxPreload? integer
---Skip files larger than this value (KB) when preloading.
---
---```lua
---default = 500
---```
---@field preloadFileSize? integer
---Ignore files list in `.gitignore` .
---
---```lua
---default = true
---```
---@field useGitIgnore? boolean
---Add private third-party library configuration file paths here, please refer to the built-in [configuration file path](https://github.com/LuaLS/lua-language-server/tree/master/meta/3rd)
---
---```lua
---default = {}
---```
---@field userThirdParty? string[]

---@class _.lspconfig.settings.lua_ls.Lua
---@field addonManager? _.lspconfig.settings.lua_ls.Lua.AddonManager
---Specifies the addon repository path (not related to the addon manager).
---
---```lua
---default = ""
---```
---@field addonRepositoryPath? string
---@field codeLens? _.lspconfig.settings.lua_ls.Lua.CodeLens
---@field completion? _.lspconfig.settings.lua_ls.Lua.Completion
---@field diagnostics? _.lspconfig.settings.lua_ls.Lua.Diagnostics
---@field doc? _.lspconfig.settings.lua_ls.Lua.Doc
---The regular expression engine used for matching documentation scope names.
---
---```lua
---default = ""
---```
---@field docScriptPath? string
---@field format? _.lspconfig.settings.lua_ls.Lua.Format
---@field hint? _.lspconfig.settings.lua_ls.Lua.Hint
---@field hover? _.lspconfig.settings.lua_ls.Lua.Hover
---@field language? _.lspconfig.settings.lua_ls.Lua.Language
---@field misc? _.lspconfig.settings.lua_ls.Lua.Misc
---@field nameStyle? _.lspconfig.settings.lua_ls.Lua.NameStyle
---@field runtime? _.lspconfig.settings.lua_ls.Lua.Runtime
---@field semantic? _.lspconfig.settings.lua_ls.Lua.Semantic
---@field signatureHelp? _.lspconfig.settings.lua_ls.Lua.SignatureHelp
---@field spell? _.lspconfig.settings.lua_ls.Lua.Spell
---@field type? _.lspconfig.settings.lua_ls.Lua.Type
---@field typeFormat? _.lspconfig.settings.lua_ls.Lua.TypeFormat
---@field window? _.lspconfig.settings.lua_ls.Lua.Window
---@field workspace? _.lspconfig.settings.lua_ls.Lua.Workspace

---@class lspconfig.settings.lua_ls
---@field Lua? _.lspconfig.settings.lua_ls.Lua
