coc-sumneko-lua
xiyaowongLua extension using sumneko lua-language-server for coc.nvim
Published Package Summary
coc-sumneko-lua
Lua extension using sumneko lua-language-server for coc.nvim
This extension uses server binaries extracted from sumneko/vscode-lua.
You can also custom the server path(sumneko-lua.serverDir).
Features
-
Supported features by the server

-
Nvim lua development(check setting
sumneko-lua.enableNvimLuaDev). Credit: folke/neodev.nvim
-
Inlay-hints provided by coc.nvim.
Install
:CocInstall coc-sumneko-lua
Config Examples for Distributions (Currently only NixOS)
Credit
License
MIT
This extension is built with create-coc-extension
- Lua extension using sumneko lua-language-server for coc.nvim
- onLanguage:lua
Want to build, test, or contribute to coc.nvim extensions? Explore our official SDK and testing toolkits.
Open Developer GuideVersion History
This published npm package does not include a history.md or changelog.md file. Browse its npm versions or repository releases for available release information.
Contributed Commands
All contributes.commands entries from the published package manifest for coc-sumneko-lua@0.0.43.
| Command (:CocCommand) | Description |
|---|---|
| sumneko-lua.install | Install or update sumneko lua-language-server |
| sumneko-lua.restart | Restart server |
| sumneko-lua.version | Echo server version |
| sumneko-lua.checkUpdate | Check update |
| sumneko-lua.showTooltip | Show tooltips |
| sumneko-lua.insertNvimLuaPluginLibrary | Insert nvim lua plugin to current workspace library |
| sumneko-lua.downloadNvimLuaTypes | Download/Update nvim lua types(Clone https://github.com/folke/neodev.nvim) |
Configuration Schema
All contributes.configuration entries from the published package manifest, including each raw property schema for coc-settings.json.
Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"markdownDescription": "If the called function is marked `---@async`, prompt `await` at the call."
}Raw JSON Schema
{
"type": "array",
"items": {
"type": "string"
},
"scope": "resource",
"default": [],
"markdownDescription": "Custom words for spell checking."
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"markdownDescription": "Enable inlay hint."
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": false,
"markdownDescription": "Show hints of type at assignment operation."
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"markdownDescription": "Enable hover."
}Raw JSON Schema
{
"type": "string",
"scope": "resource",
"default": "${version} ${language} ${encoding}",
"markdownDescription": "Format of the directory name of the meta files."
}Raw JSON Schema
{
"type": "array",
"items": {
"type": "string"
},
"scope": "resource",
"default": [
"?.lua",
"?/init.lua"
],
"markdownDescription": "When using `require`, how to find the file based on the input name.\nSetting this config to `?/init.lua` means that when you enter `require 'myfile'`, `${workspace}/myfile/init.lua` will be searched from the loaded files.\nif `runtime.pathStrict` is `false`, `${workspace}/**/myfile/init.lua` will also be searched.\nIf you want to load files outside the workspace, you need to set `Lua.workspace.library` first.\n"
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"markdownDescription": "Enable code formatter."
}Raw JSON Schema
{
"enum": [
"All",
"Literal",
"Disable"
],
"type": "string",
"scope": "resource",
"default": "All",
"markdownDescription": "Show hints of parameter name at the function call.",
"markdownEnumDescriptions": [
"All types of parameters are shown.",
"Only literal type parameters are shown.",
"Disable parameter hints."
]
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"markdownDescription": "Show type hints at the parameter of the function."
}Raw JSON Schema
{
"enum": [
"All",
"SameLine",
"Disable"
],
"type": "string",
"scope": "resource",
"default": "SameLine",
"markdownDescription": "If there is no semicolon at the end of the statement, display a virtual semicolon.",
"markdownEnumDescriptions": [
"All statements display virtual semicolons.",
"When two statements are on the same line, display a semicolon between them.",
"Disable virtual semicolons."
]
}Raw JSON Schema
{
"type": "string",
"scope": "resource",
"default": "",
"markdownDescription": "Plugin path. Please read [wiki](https://luals.github.io/wiki/plugins) to learn more."
}Raw JSON Schema
{
"type": "boolean",
"default": true,
"description": "Enable coc-sumneko-lua extension"
}Raw JSON Schema
{
"enum": [
"en-us",
"zh-cn",
"zh-tw",
"pt-br"
],
"type": "string",
"default": "en-us",
"description": "The localized language used",
"enumDescriptions": [
"`\"en-us\"` English",
"`\"zh-cn\"` 简体中文",
"`\"zh-tw\"` 繁體中文",
"`\"pt-br\"` Português"
]
}Raw JSON Schema
{
"type": "boolean",
"default": true,
"description": "Prompt when server is not found or when server can be updated"
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": false,
"markdownDescription": "Enable code lens."
}Raw JSON Schema
{
"type": "array",
"items": {
"type": "string"
},
"scope": "resource",
"default": [],
"markdownDescription": "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."
}Raw JSON Schema
{
"type": "array",
"items": {
"type": "string"
},
"scope": "resource",
"default": [],
"markdownDescription": "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."
}Raw JSON Schema
{
"enum": [
"Enable",
"Auto",
"Disable"
],
"type": "string",
"scope": "resource",
"default": "Auto",
"markdownDescription": "Show hints of array index when constructing a table.",
"markdownEnumDescriptions": [
"Show hints in all tables.",
"Show hints only when the table is greater than 3 items, or the table is a mixed table.",
"Disable hints of array index."
]
}Raw JSON Schema
{
"type": "array",
"items": {
"type": "string"
},
"scope": "resource",
"default": [],
"markdownDescription": "Additional command line parameters when starting the language service."
}Raw JSON Schema
{
"type": "object",
"scope": "resource",
"title": "builtin",
"properties": {
"io": {
"enum": [
"default",
"enable",
"disable"
],
"type": "string",
"default": "default",
"description": "TODO: Needs documentation"
},
"os": {
"enum": [
"default",
"enable",
"disable"
],
"type": "string",
"default": "default",
"description": "TODO: Needs documentation"
},
"bit": {
"enum": [
"default",
"enable",
"disable"
],
"type": "string",
"default": "default",
"description": "TODO: Needs documentation"
},
"ffi": {
"enum": [
"default",
"enable",
"disable"
],
"type": "string",
"default": "default",
"description": "TODO: Needs documentation"
},
"jit": {
"enum": [
"default",
"enable",
"disable"
],
"type": "string",
"default": "default",
"description": "TODO: Needs documentation"
},
"math": {
"enum": [
"default",
"enable",
"disable"
],
"type": "string",
"default": "default",
"description": "TODO: Needs documentation"
},
"utf8": {
"enum": [
"default",
"enable",
"disable"
],
"type": "string",
"default": "default",
"description": "TODO: Needs documentation"
},
"basic": {
"enum": [
"default",
"enable",
"disable"
],
"type": "string",
"default": "default",
"description": "TODO: Needs documentation"
},
"bit32": {
"enum": [
"default",
"enable",
"disable"
],
"type": "string",
"default": "default",
"description": "TODO: Needs documentation"
},
"debug": {
"enum": [
"default",
"enable",
"disable"
],
"type": "string",
"default": "default",
"description": "TODO: Needs documentation"
},
"table": {
"enum": [
"default",
"enable",
"disable"
],
"type": "string",
"default": "default",
"description": "TODO: Needs documentation"
},
"string": {
"enum": [
"default",
"enable",
"disable"
],
"type": "string",
"default": "default",
"description": "TODO: Needs documentation"
},
"builtin": {
"enum": [
"default",
"enable",
"disable"
],
"type": "string",
"default": "default",
"description": "TODO: Needs documentation"
},
"package": {
"enum": [
"default",
"enable",
"disable"
],
"type": "string",
"default": "default",
"description": "TODO: Needs documentation"
},
"jit.util": {
"enum": [
"default",
"enable",
"disable"
],
"type": "string",
"default": "default",
"description": "TODO: Needs documentation"
},
"coroutine": {
"enum": [
"default",
"enable",
"disable"
],
"type": "string",
"default": "default",
"description": "TODO: Needs documentation"
},
"table.new": {
"enum": [
"default",
"enable",
"disable"
],
"type": "string",
"default": "default",
"description": "TODO: Needs documentation"
},
"jit.profile": {
"enum": [
"default",
"enable",
"disable"
],
"type": "string",
"default": "default",
"description": "TODO: Needs documentation"
},
"table.clear": {
"enum": [
"default",
"enable",
"disable"
],
"type": "string",
"default": "default",
"description": "TODO: Needs documentation"
},
"string.buffer": {
"enum": [
"default",
"enable",
"disable"
],
"type": "string",
"default": "default",
"description": "TODO: Needs documentation"
}
},
"markdownDescription": "Adjust the enabled state of the built-in library. You can disable (or redefine) the non-existent library according to the actual runtime environment.\n\n* `default`: Indicates that the library will be enabled or disabled according to the runtime version\n* `enable`: always enable\n* `disable`: always disable\n",
"additionalProperties": false
}Raw JSON Schema
{
"type": "object",
"scope": "resource",
"title": "special",
"default": {},
"patternProperties": {
".*": {
"enum": [
"_G",
"rawset",
"rawget",
"setmetatable",
"require",
"dofile",
"loadfile",
"pcall",
"xpcall",
"assert",
"error",
"type",
"os.exit"
],
"type": "string",
"default": "require"
}
},
"markdownDescription": "The custom global variables are regarded as some special built-in variables, and the language server will provide special support\nThe following example shows that 'include' is treated as' require '.\n```json\n\"Lua.runtime.special\" : {\n \"include\" : \"require\"\n}\n```\n",
"additionalProperties": false
}Raw JSON Schema
{
"enum": [
"Lua 5.1",
"Lua 5.2",
"Lua 5.3",
"Lua 5.4",
"LuaJIT"
],
"type": "string",
"scope": "resource",
"default": "Lua 5.4",
"markdownDescription": "Lua runtime version.",
"markdownEnumDescriptions": [
"TODO: Needs documentation",
"TODO: Needs documentation",
"TODO: Needs documentation",
"TODO: Needs documentation",
"TODO: Needs documentation"
]
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"markdownDescription": "Enable semantic color. You may need to set `editor.semanticHighlighting.enabled` to `true` to take effect."
}Raw JSON Schema
{
"type": "string",
"default": "",
"description": "The log path"
}Raw JSON Schema
{
"type": "integer",
"scope": "resource",
"default": 5,
"markdownDescription": "When the value corresponds to multiple types, limit the number of types displaying."
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"markdownDescription": "Hover to view numeric content (only if literal is not decimal)."
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"markdownDescription": "Hover to view the contents of a string (only if the literal contains an escape character)."
}Raw JSON Schema
{
"type": "object",
"scope": "resource",
"title": "config",
"default": {},
"patternProperties": {
".*": {
"type": [
"string",
"array"
]
}
},
"markdownDescription": "Set name style config",
"additionalProperties": false
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": false,
"markdownDescription": "Semantic coloring of keywords/literals/operators. You only need to enable this feature if your editor cannot do syntax coloring."
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"markdownDescription": "Show extension status in status bar."
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"markdownDescription": "Enable completion."
}Raw JSON Schema
{
"type": "array",
"items": {
"type": "string"
},
"scope": "resource",
"default": [],
"markdownDescription": "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."
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"markdownDescription": "Whether to expand the alias. For example, expands `---@alias myType boolean|number` appears as `boolean|number`, otherwise it appears as `myType'.\n"
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"markdownDescription": "Semantic coloring of variables/fields/parameters."
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": false,
"markdownDescription": "When checking the type of union type, ignore the `nil` in it.\n\nWhen this setting is `false`, the `number|nil` type cannot be assigned to the `number` type. It can be with `true`.\n"
}Raw JSON Schema
{
"type": "object",
"scope": "resource",
"title": "config",
"properties": {
"format_line": {
"type": "string",
"default": "true",
"description": "Controls if a line is formatted at all."
},
"auto_complete_end": {
"type": "string",
"default": "true",
"description": "Controls if `end` is automatically completed at suitable positions."
},
"auto_complete_table_sep": {
"type": "string",
"default": "true",
"description": "Controls if a separator is automatically appended at the end of a table declaration."
}
},
"markdownDescription": "Configures the formatting behavior while typing Lua code.",
"additionalProperties": false
}Raw JSON Schema
{
"type": "array",
"items": {
"type": "string"
},
"scope": "resource",
"default": [],
"markdownDescription": "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."
}Raw JSON Schema
{
"type": "string",
"default": null,
"description": "The server directory which contains: bin/, changelog.md, debugger.lua, locale/, main.lua, meta/, script/. Download and set by default"
}Raw JSON Schema
{
"type": "string",
"scope": "resource",
"default": "@",
"markdownDescription": "The symbol used to trigger the postfix suggestion."
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"markdownDescription": "Enable diagnostics."
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": false,
"markdownDescription": "When enabled, `runtime.path` will only search the first level of directories, see the description of `runtime.path`."
}Raw JSON Schema
{
"type": "array",
"items": {
"type": "string"
},
"scope": "resource",
"default": [],
"markdownDescription": "Additional arguments for the plugin."
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"markdownDescription": "Show progress bar in status bar."
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"markdownDescription": "Whether the addon manager is enabled or not."
}Raw JSON Schema
{
"enum": [
"Enable",
"Fallback",
"Disable"
],
"type": "string",
"scope": "resource",
"default": "Fallback",
"markdownDescription": "Show contextual words in suggestions.",
"markdownEnumDescriptions": [
"Always show context words in suggestions.",
"Contextual words are only displayed when suggestions based on semantics cannot be provided.",
"Do not display context words."
]
}Raw JSON Schema
{
"type": "array",
"items": {
"enum": [
"action-after-return",
"ambiguity-1",
"ambiguous-syntax",
"args-after-dots",
"assign-type-mismatch",
"await-in-sync",
"block-after-else",
"break-outside",
"cast-local-type",
"cast-type-mismatch",
"circle-doc-class",
"close-non-object",
"code-after-break",
"codestyle-check",
"count-down-loop",
"deprecated",
"different-requires",
"discard-returns",
"doc-field-no-class",
"duplicate-doc-alias",
"duplicate-doc-field",
"duplicate-doc-param",
"duplicate-index",
"duplicate-set-field",
"empty-block",
"err-assign-as-eq",
"err-c-long-comment",
"err-comment-prefix",
"err-do-as-then",
"err-eq-as-assign",
"err-esc",
"err-nonstandard-symbol",
"err-then-as-do",
"exp-in-action",
"global-element",
"global-in-nil-env",
"incomplete-signature-doc",
"index-in-func-name",
"inject-field",
"invisible",
"jump-local-scope",
"keyword",
"local-limit",
"lowercase-global",
"lua-doc-miss-sign",
"luadoc-error-diag-mode",
"luadoc-miss-alias-extends",
"luadoc-miss-alias-name",
"luadoc-miss-arg-name",
"luadoc-miss-cate-name",
"luadoc-miss-class-extends-name",
"luadoc-miss-class-name",
"luadoc-miss-diag-mode",
"luadoc-miss-diag-name",
"luadoc-miss-field-extends",
"luadoc-miss-field-name",
"luadoc-miss-fun-after-overload",
"luadoc-miss-generic-name",
"luadoc-miss-local-name",
"luadoc-miss-module-name",
"luadoc-miss-operator-name",
"luadoc-miss-param-extends",
"luadoc-miss-param-name",
"luadoc-miss-see-name",
"luadoc-miss-sign-name",
"luadoc-miss-symbol",
"luadoc-miss-type-name",
"luadoc-miss-vararg-type",
"luadoc-miss-version",
"malformed-number",
"miss-end",
"miss-esc-x",
"miss-exp",
"miss-exponent",
"miss-field",
"miss-loop-max",
"miss-loop-min",
"miss-method",
"miss-name",
"miss-sep-in-table",
"miss-space-between",
"miss-symbol",
"missing-fields",
"missing-global-doc",
"missing-local-export-doc",
"missing-parameter",
"missing-return",
"missing-return-value",
"name-style-check",
"need-check-nil",
"need-paren",
"nesting-long-mark",
"newfield-call",
"newline-call",
"no-unknown",
"no-visible-label",
"not-yieldable",
"param-type-mismatch",
"redefined-label",
"redefined-local",
"redundant-parameter",
"redundant-return",
"redundant-return-value",
"redundant-value",
"return-type-mismatch",
"set-const",
"spell-check",
"trailing-space",
"unbalanced-assignments",
"undefined-doc-class",
"undefined-doc-name",
"undefined-doc-param",
"undefined-env-child",
"undefined-field",
"undefined-global",
"unexpect-dots",
"unexpect-efunc-name",
"unexpect-lfunc-name",
"unexpect-symbol",
"unicode-name",
"unknown-attribute",
"unknown-cast-variable",
"unknown-diag-code",
"unknown-operator",
"unknown-symbol",
"unreachable-code",
"unsupport-symbol",
"unused-function",
"unused-label",
"unused-local",
"unused-vararg"
],
"type": "string"
},
"scope": "resource",
"default": [],
"markdownDescription": "Disabled diagnostic (Use code in hover brackets)."
}Raw JSON Schema
{
"type": "array",
"items": {
"type": "string"
},
"scope": "resource",
"default": [],
"markdownDescription": "Defined global variables."
}Raw JSON Schema
{
"type": "integer",
"scope": "resource",
"default": 50,
"markdownDescription": "When hovering to view a table, limits the maximum number of previews for fields."
}Raw JSON Schema
{
"type": "integer",
"scope": "resource",
"default": 1000,
"markdownDescription": "The maximum length of a hover to view the contents of a string."
}Raw JSON Schema
{
"type": "string",
"scope": "resource",
"default": "",
"markdownDescription": "Specify the executable path."
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": false,
"markdownDescription": "Allows Unicode characters in name."
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"markdownDescription": "Semantic coloring of type annotations."
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": false,
"markdownDescription": "Once one subtype of a union type meets the condition, the union type also meets the condition.\n\nWhen this setting is `false`, the `number|boolean` type cannot be assigned to the `number` type. It can be with `true`.\n"
}Raw JSON Schema
{
"type": "array",
"items": {
"type": "string"
},
"scope": "resource",
"default": [
".vscode"
],
"markdownDescription": "Ignored files and directories (Use `.gitignore` grammar)."
}Raw JSON Schema
{
"type": "boolean",
"default": true,
"description": "Automatically check for updates after startup(Only one check within 4 hours)"
}Raw JSON Schema
{
"type": "object",
"scope": "resource",
"title": "severity",
"properties": {
"invisible": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "Enable diagnostics for accesses to fields which are invisible."
},
"deprecated": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "Enable diagnostics to highlight deprecated API."
},
"no-unknown": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "Enable diagnostics for cases in which the type cannot be inferred."
},
"ambiguity-1": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "Enable ambiguous operator precedence diagnostics. For example, the `num or 0 + 1` expression will be suggested `(num or 0) + 1` instead."
},
"empty-block": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Hint",
"description": "Enable empty code block diagnostics."
},
"spell-check": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Information",
"description": "Enable diagnostics for typos in strings."
},
"inject-field": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "TODO: Needs documentation"
},
"newline-call": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "Enable newline call diagnostics. Is's raised when a line starting with `(` is encountered, which is syntactically parsed as a function call on the previous line."
},
"unused-label": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Hint",
"description": "Enable unused label diagnostics."
},
"unused-local": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Hint",
"description": "Enable unused local variable diagnostics."
},
"await-in-sync": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "Enable diagnostics for calls of asynchronous functions within a synchronous function."
},
"newfield-call": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "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."
},
"not-yieldable": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "Enable diagnostics for calls to `coroutine.yield()` when it is not permitted."
},
"unused-vararg": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Hint",
"description": "Enable unused vararg diagnostics."
},
"global-element": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "Enable diagnostics to warn about global elements."
},
"missing-fields": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "TODO: Needs documentation"
},
"missing-return": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "Enable diagnostics for functions with return annotations which have no return statement."
},
"need-check-nil": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "Enable diagnostics for variable usages if `nil` or an optional (potentially `nil`) value was assigned to the variable before."
},
"trailing-space": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Hint",
"description": "Enable trailing space diagnostics."
},
"cast-local-type": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "Enable diagnostics for casts of local variables where the target type does not match the defined type."
},
"codestyle-check": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "Enable diagnostics for incorrectly styled lines."
},
"count-down-loop": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "Enable diagnostics for `for` loops which will never reach their max/limit because the loop is incrementing instead of decrementing."
},
"discard-returns": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "Enable diagnostics for calls of functions annotated with `---@nodiscard` where the return values are ignored."
},
"duplicate-index": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "Enable duplicate table index diagnostics."
},
"redefined-local": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Hint",
"description": "Enable redefined local variable diagnostics."
},
"redundant-value": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "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."
},
"undefined-field": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "Enable diagnostics for cases in which an undefined field of a variable is read."
},
"unused-function": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Hint",
"description": "Enable unused function diagnostics."
},
"circle-doc-class": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "TODO: Needs documentation"
},
"close-non-object": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "Enable diagnostics for attempts to close a variable with a non-object."
},
"code-after-break": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Hint",
"description": "Enable diagnostics for code placed after a break statement in a loop."
},
"lowercase-global": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Information",
"description": "Enable lowercase global variable definition diagnostics."
},
"name-style-check": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "Enable diagnostics for name style."
},
"redundant-return": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Hint",
"description": "Enable diagnostics for return statements which are not needed because the function would exit on its own."
},
"undefined-global": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "Enable undefined global variable diagnostics."
},
"unknown-operator": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "Enable diagnostics for unknown operators."
},
"unreachable-code": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Hint",
"description": "Enable diagnostics for unreachable code."
},
"global-in-nil-env": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "Enable cannot use global variables ( `_ENV` is set to `nil`) diagnostics."
},
"missing-parameter": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "Enable diagnostics for function calls where the number of arguments is less than the number of annotated function parameters."
},
"unknown-diag-code": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "Enable diagnostics in cases in which an unknown diagnostics code is entered."
},
"cast-type-mismatch": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "Enable diagnostics for casts where the target type does not match the initial type."
},
"different-requires": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "Enable diagnostics for files which are required by two different paths."
},
"doc-field-no-class": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "Enable diagnostics to highlight a field annotation without a defining class annotation."
},
"missing-global-doc": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "Missing annotations for globals! Global functions must have a comment and annotations for all parameters and return values."
},
"undefined-doc-name": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "Enable diagnostics for type annotations referencing an undefined type or alias."
},
"duplicate-doc-alias": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "Enable diagnostics for a duplicated alias annotation name."
},
"duplicate-doc-field": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "Enable diagnostics for a duplicated field annotation name."
},
"duplicate-doc-param": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "Enable diagnostics for a duplicated param annotation name."
},
"duplicate-set-field": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "Enable diagnostics for setting the same field in a class more than once."
},
"param-type-mismatch": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "Enable diagnostics for function calls where the type of a provided parameter does not match the type of the annotated function definition."
},
"redundant-parameter": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "Enable redundant function parameter diagnostics."
},
"undefined-doc-class": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "Enable diagnostics for class annotations in which an undefined class is referenced."
},
"undefined-doc-param": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "Enable diagnostics for cases in which a parameter annotation is given without declaring the parameter in the function definition."
},
"undefined-env-child": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Information",
"description": "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."
},
"assign-type-mismatch": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "Enable diagnostics for assignments in which the value's type does not match the type of the assigned variable."
},
"missing-return-value": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "Enable diagnostics for return statements without values although the containing function declares returns."
},
"return-type-mismatch": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "Enable diagnostics for return values whose type does not match the type declared in the corresponding return annotation."
},
"unknown-cast-variable": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "Enable diagnostics for casts of undefined variables."
},
"redundant-return-value": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "Enable diagnostics for return statements which return an extra value which is not specified by a return annotation."
},
"unbalanced-assignments": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "Enable diagnostics on multiple assignments if not all variables obtain a value (e.g., `local x,y = 1`)."
},
"incomplete-signature-doc": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "Incomplete @param or @return annotations for functions."
},
"missing-local-export-doc": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Error!",
"Warning!",
"Information!",
"Hint!"
],
"type": "string",
"default": "Warning",
"description": "Missing annotations for exported locals! Exported local functions must have a comment and annotations for all parameters and return values."
}
},
"markdownDescription": "Modify the diagnostic severity.\n\nEnd with `!` means override the group setting `diagnostics.groupSeverity`.\n",
"additionalProperties": false
}Raw JSON Schema
{
"type": "object",
"scope": "resource",
"title": "defaultConfig",
"default": {},
"patternProperties": {
".*": {
"type": "string",
"default": ""
}
},
"markdownDescription": "The default format configuration. Has a lower priority than `.editorconfig` file in the workspace.\nRead [formatter docs](https://github.com/CppCXY/EmmyLuaCodeStyle/tree/master/docs) to learn usage.\n",
"additionalProperties": false
}Raw JSON Schema
{
"enum": [
"utf8",
"ansi",
"utf16le",
"utf16be"
],
"type": "string",
"scope": "resource",
"default": "utf8",
"markdownDescription": "File encoding. The `ansi` option is only available under the `Windows` platform.",
"markdownEnumDescriptions": [
"TODO: Needs documentation",
"TODO: Needs documentation",
"TODO: Needs documentation",
"TODO: Needs documentation"
]
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"markdownDescription": "Enable signature help."
}Raw JSON Schema
{
"type": "integer",
"scope": "resource",
"default": 5000,
"markdownDescription": "Max preloaded files."
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"markdownDescription": "Display parameters in completion list. When the function has multiple definitions, they will be displayed separately."
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"markdownDescription": "When the input looks like a file name, automatically `require` this file."
}Raw JSON Schema
{
"enum": [
"Disable",
"Both",
"Replace"
],
"type": "string",
"scope": "resource",
"default": "Disable",
"markdownDescription": "Shows function call snippets.",
"markdownEnumDescriptions": [
"Only shows `function name`.",
"Shows `function name` and `call snippet`.",
"Only shows `call snippet.`"
]
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"markdownDescription": "Ignore files list in `.gitignore` ."
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"markdownDescription": "Whether the displayed context word contains the content of other files in the workspace."
}Raw JSON Schema
{
"enum": [
"Enable",
"Opened",
"Disable"
],
"type": "string",
"scope": "resource",
"default": "Opened",
"markdownDescription": "How to diagnose ignored files.",
"markdownEnumDescriptions": [
"Always diagnose these files.",
"Only when these files are opened will it be diagnosed.",
"These files are not diagnosed."
]
}Raw JSON Schema
{
"enum": [
"Enable",
"Opened",
"Disable"
],
"type": "string",
"scope": "resource",
"default": "Opened",
"markdownDescription": "How to diagnose files loaded via `Lua.workspace.library`.",
"markdownEnumDescriptions": [
"Always diagnose these files.",
"Only when these files are opened will it be diagnosed.",
"These files are not diagnosed."
]
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"markdownDescription": "Allowed to assign the `number` type to the `integer` type."
}Raw JSON Schema
{
"type": "array",
"items": {
"type": "string"
},
"scope": "resource",
"default": [],
"markdownDescription": "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)"
}Raw JSON Schema
{
"type": "boolean",
"default": false,
"description": "Enable the nvim lua development"
}Raw JSON Schema
{
"type": "integer",
"scope": "resource",
"default": 0,
"markdownDescription": "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."
}Raw JSON Schema
{
"enum": [
"Disable",
"Both",
"Replace"
],
"type": "string",
"scope": "resource",
"default": "Replace",
"markdownDescription": "Shows keyword syntax snippets.",
"markdownEnumDescriptions": [
"Only shows `keyword`.",
"Shows `keyword` and `syntax snippet`.",
"Only shows `syntax snippet`."
]
}Raw JSON Schema
{
"type": "array",
"items": {
"type": "string"
},
"scope": "resource",
"default": [
"git"
],
"markdownDescription": "Do not diagnose Lua files that use the following scheme."
}Raw JSON Schema
{
"type": "object",
"scope": "resource",
"title": "groupSeverity",
"properties": {
"await": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Fallback"
],
"type": "string",
"default": "Fallback",
"description": "* await-in-sync\n* not-yieldable"
},
"global": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Fallback"
],
"type": "string",
"default": "Fallback",
"description": "* global-in-nil-env\n* lowercase-global\n* undefined-env-child\n* undefined-global"
},
"luadoc": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Fallback"
],
"type": "string",
"default": "Fallback",
"description": "* circle-doc-class\n* doc-field-no-class\n* duplicate-doc-alias\n* duplicate-doc-field\n* duplicate-doc-param\n* incomplete-signature-doc\n* missing-global-doc\n* missing-local-export-doc\n* undefined-doc-class\n* undefined-doc-name\n* undefined-doc-param\n* unknown-cast-variable\n* unknown-diag-code\n* unknown-operator"
},
"strict": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Fallback"
],
"type": "string",
"default": "Fallback",
"description": "* close-non-object\n* deprecated\n* discard-returns\n* invisible"
},
"strong": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Fallback"
],
"type": "string",
"default": "Fallback",
"description": "* no-unknown"
},
"unused": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Fallback"
],
"type": "string",
"default": "Fallback",
"description": "* code-after-break\n* empty-block\n* redundant-return\n* trailing-space\n* unreachable-code\n* unused-function\n* unused-label\n* unused-local\n* unused-vararg"
},
"ambiguity": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Fallback"
],
"type": "string",
"default": "Fallback",
"description": "* ambiguity-1\n* count-down-loop\n* different-requires\n* newfield-call\n* newline-call"
},
"codestyle": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Fallback"
],
"type": "string",
"default": "Fallback",
"description": "* codestyle-check\n* name-style-check\n* spell-check"
},
"duplicate": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Fallback"
],
"type": "string",
"default": "Fallback",
"description": "* duplicate-index\n* duplicate-set-field"
},
"redefined": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Fallback"
],
"type": "string",
"default": "Fallback",
"description": "* redefined-local"
},
"type-check": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Fallback"
],
"type": "string",
"default": "Fallback",
"description": "* assign-type-mismatch\n* cast-local-type\n* cast-type-mismatch\n* inject-field\n* need-check-nil\n* param-type-mismatch\n* return-type-mismatch\n* undefined-field"
},
"unbalanced": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Fallback"
],
"type": "string",
"default": "Fallback",
"description": "* missing-fields\n* missing-parameter\n* missing-return\n* missing-return-value\n* redundant-parameter\n* redundant-return-value\n* redundant-value\n* unbalanced-assignments"
},
"conventions": {
"enum": [
"Error",
"Warning",
"Information",
"Hint",
"Fallback"
],
"type": "string",
"default": "Fallback",
"description": "* global-element"
}
},
"markdownDescription": "Modify the diagnostic severity in a group.\n`Fallback` means that diagnostics in this group are controlled by `diagnostics.severity` separately.\nOther settings will override individual settings without end of `!`.\n",
"additionalProperties": false
}Raw JSON Schema
{
"type": "integer",
"scope": "resource",
"default": 100,
"markdownDescription": "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."
}Raw JSON Schema
{
"type": "array",
"items": {
"enum": [
"//",
"/**/",
"`",
"+=",
"-=",
"*=",
"/=",
"%=",
"^=",
"//=",
"|=",
"&=",
"<<=",
">>=",
"||",
"&&",
"!",
"!=",
"continue"
],
"type": "string"
},
"scope": "resource",
"default": [],
"markdownDescription": "Supports non-standard symbols. Make sure that your runtime environment supports these symbols."
}Raw JSON Schema
{
"type": [
"string",
"boolean"
],
"scope": "resource",
"markdownDescription": "Automatic detection and adaptation of third-party libraries, currently supported libraries are:\n\n* OpenResty\n* Cocos4.0\n* LÖVE\n* LÖVR\n* skynet\n* Jass\n"
}Raw JSON Schema
{
"type": "integer",
"scope": "resource",
"default": 500,
"markdownDescription": "Skip files larger than this value (KB) when preloading."
}Raw JSON Schema
{
"type": "integer",
"scope": "resource",
"default": 3000,
"markdownDescription": "Latency (milliseconds) for workspace diagnostics."
}Raw JSON Schema
{
"enum": [
"OnChange",
"OnSave",
"None"
],
"type": "string",
"scope": "resource",
"default": "OnSave",
"markdownDescription": "Set the time to trigger workspace diagnostics.",
"markdownEnumDescriptions": [
"Trigger workspace diagnostics when the file is changed.",
"Trigger workspace diagnostics when the file is saved.",
"Disable workspace diagnostics."
]
}Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"markdownDescription": "Ignore submodules."
}Raw JSON Schema
{
"type": "string",
"scope": "resource",
"default": ".",
"markdownDescription": "The separator used when `require`."
}Raw JSON Schema
{
"type": "object",
"scope": "resource",
"title": "groupFileStatus",
"properties": {
"await": {
"enum": [
"Any",
"Opened",
"None",
"Fallback"
],
"type": "string",
"default": "Fallback",
"description": "* await-in-sync\n* not-yieldable"
},
"global": {
"enum": [
"Any",
"Opened",
"None",
"Fallback"
],
"type": "string",
"default": "Fallback",
"description": "* global-in-nil-env\n* lowercase-global\n* undefined-env-child\n* undefined-global"
},
"luadoc": {
"enum": [
"Any",
"Opened",
"None",
"Fallback"
],
"type": "string",
"default": "Fallback",
"description": "* circle-doc-class\n* doc-field-no-class\n* duplicate-doc-alias\n* duplicate-doc-field\n* duplicate-doc-param\n* incomplete-signature-doc\n* missing-global-doc\n* missing-local-export-doc\n* undefined-doc-class\n* undefined-doc-name\n* undefined-doc-param\n* unknown-cast-variable\n* unknown-diag-code\n* unknown-operator"
},
"strict": {
"enum": [
"Any",
"Opened",
"None",
"Fallback"
],
"type": "string",
"default": "Fallback",
"description": "* close-non-object\n* deprecated\n* discard-returns\n* invisible"
},
"strong": {
"enum": [
"Any",
"Opened",
"None",
"Fallback"
],
"type": "string",
"default": "Fallback",
"description": "* no-unknown"
},
"unused": {
"enum": [
"Any",
"Opened",
"None",
"Fallback"
],
"type": "string",
"default": "Fallback",
"description": "* code-after-break\n* empty-block\n* redundant-return\n* trailing-space\n* unreachable-code\n* unused-function\n* unused-label\n* unused-local\n* unused-vararg"
},
"ambiguity": {
"enum": [
"Any",
"Opened",
"None",
"Fallback"
],
"type": "string",
"default": "Fallback",
"description": "* ambiguity-1\n* count-down-loop\n* different-requires\n* newfield-call\n* newline-call"
},
"codestyle": {
"enum": [
"Any",
"Opened",
"None",
"Fallback"
],
"type": "string",
"default": "Fallback",
"description": "* codestyle-check\n* name-style-check\n* spell-check"
},
"duplicate": {
"enum": [
"Any",
"Opened",
"None",
"Fallback"
],
"type": "string",
"default": "Fallback",
"description": "* duplicate-index\n* duplicate-set-field"
},
"redefined": {
"enum": [
"Any",
"Opened",
"None",
"Fallback"
],
"type": "string",
"default": "Fallback",
"description": "* redefined-local"
},
"type-check": {
"enum": [
"Any",
"Opened",
"None",
"Fallback"
],
"type": "string",
"default": "Fallback",
"description": "* assign-type-mismatch\n* cast-local-type\n* cast-type-mismatch\n* inject-field\n* need-check-nil\n* param-type-mismatch\n* return-type-mismatch\n* undefined-field"
},
"unbalanced": {
"enum": [
"Any",
"Opened",
"None",
"Fallback"
],
"type": "string",
"default": "Fallback",
"description": "* missing-fields\n* missing-parameter\n* missing-return\n* missing-return-value\n* redundant-parameter\n* redundant-return-value\n* redundant-value\n* unbalanced-assignments"
},
"conventions": {
"enum": [
"Any",
"Opened",
"None",
"Fallback"
],
"type": "string",
"default": "Fallback",
"description": "* global-element"
}
},
"markdownDescription": "Modify the diagnostic needed file status in a group.\n\n* Opened: only diagnose opened files\n* Any: diagnose all files\n* None: disable this diagnostic\n\n`Fallback` means that diagnostics in this group are controlled by `diagnostics.neededFileStatus` separately.\nOther settings will override individual settings without end of `!`.\n",
"additionalProperties": false
}Raw JSON Schema
{
"type": "object",
"scope": "resource",
"title": "neededFileStatus",
"properties": {
"invisible": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Any",
"description": "Enable diagnostics for accesses to fields which are invisible."
},
"deprecated": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Any",
"description": "Enable diagnostics to highlight deprecated API."
},
"no-unknown": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "None",
"description": "Enable diagnostics for cases in which the type cannot be inferred."
},
"ambiguity-1": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Any",
"description": "Enable ambiguous operator precedence diagnostics. For example, the `num or 0 + 1` expression will be suggested `(num or 0) + 1` instead."
},
"empty-block": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Opened",
"description": "Enable empty code block diagnostics."
},
"spell-check": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "None",
"description": "Enable diagnostics for typos in strings."
},
"inject-field": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Opened",
"description": "TODO: Needs documentation"
},
"newline-call": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Any",
"description": "Enable newline call diagnostics. Is's raised when a line starting with `(` is encountered, which is syntactically parsed as a function call on the previous line."
},
"unused-label": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Opened",
"description": "Enable unused label diagnostics."
},
"unused-local": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Opened",
"description": "Enable unused local variable diagnostics."
},
"await-in-sync": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "None",
"description": "Enable diagnostics for calls of asynchronous functions within a synchronous function."
},
"newfield-call": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Any",
"description": "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."
},
"not-yieldable": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "None",
"description": "Enable diagnostics for calls to `coroutine.yield()` when it is not permitted."
},
"unused-vararg": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Opened",
"description": "Enable unused vararg diagnostics."
},
"global-element": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "None",
"description": "Enable diagnostics to warn about global elements."
},
"missing-fields": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Any",
"description": "TODO: Needs documentation"
},
"missing-return": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Any",
"description": "Enable diagnostics for functions with return annotations which have no return statement."
},
"need-check-nil": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Opened",
"description": "Enable diagnostics for variable usages if `nil` or an optional (potentially `nil`) value was assigned to the variable before."
},
"trailing-space": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Opened",
"description": "Enable trailing space diagnostics."
},
"cast-local-type": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Opened",
"description": "Enable diagnostics for casts of local variables where the target type does not match the defined type."
},
"codestyle-check": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "None",
"description": "Enable diagnostics for incorrectly styled lines."
},
"count-down-loop": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Any",
"description": "Enable diagnostics for `for` loops which will never reach their max/limit because the loop is incrementing instead of decrementing."
},
"discard-returns": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Any",
"description": "Enable diagnostics for calls of functions annotated with `---@nodiscard` where the return values are ignored."
},
"duplicate-index": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Any",
"description": "Enable duplicate table index diagnostics."
},
"redefined-local": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Opened",
"description": "Enable redefined local variable diagnostics."
},
"redundant-value": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Any",
"description": "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."
},
"undefined-field": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Opened",
"description": "Enable diagnostics for cases in which an undefined field of a variable is read."
},
"unused-function": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Opened",
"description": "Enable unused function diagnostics."
},
"circle-doc-class": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Any",
"description": "TODO: Needs documentation"
},
"close-non-object": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Any",
"description": "Enable diagnostics for attempts to close a variable with a non-object."
},
"code-after-break": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Opened",
"description": "Enable diagnostics for code placed after a break statement in a loop."
},
"lowercase-global": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Any",
"description": "Enable lowercase global variable definition diagnostics."
},
"name-style-check": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "None",
"description": "Enable diagnostics for name style."
},
"redundant-return": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Opened",
"description": "Enable diagnostics for return statements which are not needed because the function would exit on its own."
},
"undefined-global": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Any",
"description": "Enable undefined global variable diagnostics."
},
"unknown-operator": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Any",
"description": "Enable diagnostics for unknown operators."
},
"unreachable-code": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Opened",
"description": "Enable diagnostics for unreachable code."
},
"global-in-nil-env": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Any",
"description": "Enable cannot use global variables ( `_ENV` is set to `nil`) diagnostics."
},
"missing-parameter": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Any",
"description": "Enable diagnostics for function calls where the number of arguments is less than the number of annotated function parameters."
},
"unknown-diag-code": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Any",
"description": "Enable diagnostics in cases in which an unknown diagnostics code is entered."
},
"cast-type-mismatch": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Opened",
"description": "Enable diagnostics for casts where the target type does not match the initial type."
},
"different-requires": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Any",
"description": "Enable diagnostics for files which are required by two different paths."
},
"doc-field-no-class": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Any",
"description": "Enable diagnostics to highlight a field annotation without a defining class annotation."
},
"missing-global-doc": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "None",
"description": "Missing annotations for globals! Global functions must have a comment and annotations for all parameters and return values."
},
"undefined-doc-name": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Any",
"description": "Enable diagnostics for type annotations referencing an undefined type or alias."
},
"duplicate-doc-alias": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Any",
"description": "Enable diagnostics for a duplicated alias annotation name."
},
"duplicate-doc-field": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Any",
"description": "Enable diagnostics for a duplicated field annotation name."
},
"duplicate-doc-param": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Any",
"description": "Enable diagnostics for a duplicated param annotation name."
},
"duplicate-set-field": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Opened",
"description": "Enable diagnostics for setting the same field in a class more than once."
},
"param-type-mismatch": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Opened",
"description": "Enable diagnostics for function calls where the type of a provided parameter does not match the type of the annotated function definition."
},
"redundant-parameter": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Any",
"description": "Enable redundant function parameter diagnostics."
},
"undefined-doc-class": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Any",
"description": "Enable diagnostics for class annotations in which an undefined class is referenced."
},
"undefined-doc-param": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Any",
"description": "Enable diagnostics for cases in which a parameter annotation is given without declaring the parameter in the function definition."
},
"undefined-env-child": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Any",
"description": "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."
},
"assign-type-mismatch": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Opened",
"description": "Enable diagnostics for assignments in which the value's type does not match the type of the assigned variable."
},
"missing-return-value": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Any",
"description": "Enable diagnostics for return statements without values although the containing function declares returns."
},
"return-type-mismatch": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Opened",
"description": "Enable diagnostics for return values whose type does not match the type declared in the corresponding return annotation."
},
"unknown-cast-variable": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Any",
"description": "Enable diagnostics for casts of undefined variables."
},
"redundant-return-value": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Any",
"description": "Enable diagnostics for return statements which return an extra value which is not specified by a return annotation."
},
"unbalanced-assignments": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "Any",
"description": "Enable diagnostics on multiple assignments if not all variables obtain a value (e.g., `local x,y = 1`)."
},
"incomplete-signature-doc": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "None",
"description": "Incomplete @param or @return annotations for functions."
},
"missing-local-export-doc": {
"enum": [
"Any",
"Opened",
"None",
"Any!",
"Opened!",
"None!"
],
"type": "string",
"default": "None",
"description": "Missing annotations for exported locals! Exported local functions must have a comment and annotations for all parameters and return values."
}
},
"markdownDescription": "* Opened: only diagnose opened files\n* Any: diagnose all files\n* None: disable this diagnostic\n\nEnd with `!` means override the group setting `diagnostics.groupFileStatus`.\n",
"additionalProperties": false
}Raw JSON Schema
{
"type": "array",
"items": {
"type": "string"
},
"scope": "resource",
"default": [],
"markdownDescription": "Do not diagnose `unused-local` when the variable name matches the following pattern."
}