Back to Extensions Directory
Read the complete README
coc-lua
Josa Geselllua extension for coc
Installation CommandVim prompt
:CocInstall coc-lua
GitHub owner
Josa GesellVersion
v2.0.6npm package
coc-luaRequirements
coc ^0.0.82
License
MIT
Repository
GitHubnpm latest published 2023-12-08Registry checked 2026-08-23Node >=16Registry summary
Published Package Summary
coc-lua
Lua language server extension using LuaLS/lua-language-server
for coc.nvim.
Install
In your vim/neovim, run command:
:CocInstall coc-lua
Features
See
Development
- Run
npm run buildornpm run build:watch - Link extension:
npm run link/npm run unlink
Credit
License
- lua extension for coc
Activation Events
- onLanguage:lua
- onCommand:lua.version
- onCommand:lua.update
Developer Resources
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-lua@2.0.6.
| Command (:CocCommand) | Description |
|---|---|
| lua.version | Print extension version |
| lua.update | Update lua-lsp |
Configuration Schema
All contributes.configuration entries from the published package manifest, including each raw property schema for coc-settings.json.
lua.enableboolean
Default: true
Raw JSON Schema
{
"type": "boolean",
"default": true
}Lua.hint.awaitboolean
If the called function is marked `---@async`, prompt `await` at the call.
Default: true
Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"markdownDescription": "If the called function is marked `---@async`, prompt `await` at the call."
}Lua.spell.dictarray
Custom words for spell checking.
Default: []
Raw JSON Schema
{
"type": "array",
"items": {
"type": "string"
},
"scope": "resource",
"default": [],
"markdownDescription": "Custom words for spell checking."
}Lua.hint.enableboolean
Enable inlay hint.
Default: false
Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": false,
"markdownDescription": "Enable inlay hint."
}Lua.hint.setTypeboolean
Show hints of type at assignment operation.
Default: false
Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": false,
"markdownDescription": "Show hints of type at assignment operation."
}Lua.hover.enableboolean
Enable hover.
Default: true
Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"markdownDescription": "Enable hover."
}Lua.runtime.metastring
Format of the directory name of the meta files.
Default: "${version} ${language} ${encoding}"
Raw JSON Schema
{
"type": "string",
"scope": "resource",
"default": "${version} ${language} ${encoding}",
"markdownDescription": "Format of the directory name of the meta files."
}Lua.runtime.patharray
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.
Default: ["?.lua","?/init.lua"]
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"
}lua.trace.serverstring
Default: "off"
Raw JSON Schema
{
"enum": [
"off",
"messages",
"verbose"
],
"type": "string",
"default": "off"
}Lua.format.enableboolean
Enable code formatter.
Default: true
Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"markdownDescription": "Enable code formatter."
}Lua.hint.paramNamestring
Show hints of parameter name at the function call.
Default: "All"
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."
]
}Lua.hint.paramTypeboolean
Show type hints at the parameter of the function.
Default: true
Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"markdownDescription": "Show type hints at the parameter of the function."
}Lua.hint.semicolonstring
If there is no semicolon at the end of the statement, display a virtual semicolon.
Default: "SameLine"
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."
]
}Lua.runtime.pluginstring
Plugin path. Please read [wiki](https://github.com/LuaLS/lua-language-server/wiki/Plugins) to learn more.
Default: ""
Raw JSON Schema
{
"type": "string",
"scope": "resource",
"default": "",
"markdownDescription": "Plugin path. Please read [wiki](https://github.com/LuaLS/lua-language-server/wiki/Plugins) to learn more."
}Lua.codeLens.enableboolean
Enable code lens.
Default: false
Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": false,
"markdownDescription": "Enable code lens."
}Lua.doc.packageNamearray
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.
Default: []
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."
}Lua.doc.privateNamearray
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.
Default: []
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."
}Lua.hint.arrayIndexstring
Show hints of array index when constructing a table.
Default: "Auto"
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."
]
}Lua.misc.parametersarray
[Command line parameters](https://github.com/LuaLS/lua-telemetry-server/tree/master/method) when starting the language server in VSCode.
Default: []
Raw JSON Schema
{
"type": "array",
"items": {
"type": "string"
},
"scope": "resource",
"default": [],
"markdownDescription": "[Command line parameters](https://github.com/LuaLS/lua-telemetry-server/tree/master/method) when starting the language server in VSCode."
}Lua.runtime.specialobject
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"
}
```
Default: {}
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
}Lua.runtime.versionstring
Lua runtime version.
Default: "Lua 5.4"
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": [
"",
"",
"",
"",
""
]
}Lua.semantic.enableboolean
Enable semantic color. You may need to set `editor.semanticHighlighting.enabled` to `true` to take effect.
Default: true
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."
}lua.checkForUpdatesstring
Check for LuaLS/lua-language-server updates on start.
Default: "inform"
Raw JSON Schema
{
"enum": [
"disabled",
"inform",
"ask",
"install"
],
"type": "string",
"default": "inform",
"description": "Check for LuaLS/lua-language-server updates on start."
}Lua.hover.enumsLimitinteger
When the value corresponds to multiple types, limit the number of types displaying.
Default: 5
Raw JSON Schema
{
"type": "integer",
"scope": "resource",
"default": 5,
"markdownDescription": "When the value corresponds to multiple types, limit the number of types displaying."
}Lua.hover.viewNumberboolean
Hover to view numeric content (only if literal is not decimal).
Default: true
Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"markdownDescription": "Hover to view numeric content (only if literal is not decimal)."
}Lua.hover.viewStringboolean
Hover to view the contents of a string (only if the literal contains an escape character).
Default: true
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)."
}Lua.semantic.keywordboolean
Semantic coloring of keywords/literals/operators. You only need to enable this feature if your editor cannot do syntax coloring.
Default: 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."
}Lua.window.statusBarboolean
Show extension status in status bar.
Default: true
Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"markdownDescription": "Show extension status in status bar."
}Lua.completion.enableboolean
Enable completion.
Default: true
Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"markdownDescription": "Enable completion."
}Lua.doc.protectedNamearray
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.
Default: []
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."
}Lua.hover.expandAliasboolean
Whether to expand the alias. For example, expands `---@alias myType boolean|number` appears as `boolean|number`, otherwise it appears as `myType'.
Default: true
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"
}Lua.semantic.variableboolean
Semantic coloring of variables/fields/parameters.
Default: true
Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"markdownDescription": "Semantic coloring of variables/fields/parameters."
}Lua.type.weakNilCheckboolean
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`.
Default: false
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"
}Lua.workspace.libraryarray
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.
Default: []
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."
}Lua.completion.postfixstring
The symbol used to trigger the postfix suggestion.
Default: "@"
Raw JSON Schema
{
"type": "string",
"scope": "resource",
"default": "@",
"markdownDescription": "The symbol used to trigger the postfix suggestion."
}Lua.diagnostics.enableboolean
Enable diagnostics.
Default: true
Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"markdownDescription": "Enable diagnostics."
}Lua.runtime.pathStrictboolean
When enabled, `runtime.path` will only search the first level of directories, see the description of `runtime.path`.
Default: false
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`."
}Lua.runtime.pluginArgsarray
Additional arguments for the plugin.
Default: []
Raw JSON Schema
{
"type": "array",
"items": {
"type": "string"
},
"scope": "resource",
"default": [],
"markdownDescription": "Additional arguments for the plugin."
}Lua.window.progressBarboolean
Show progress bar in status bar.
Default: true
Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"markdownDescription": "Show progress bar in status bar."
}lua.installPreReleasesboolean
Install latest pre-release of LuaLS/lua-language-server.
Default: false
Raw JSON Schema
{
"type": "boolean",
"default": false,
"description": "Install latest pre-release of LuaLS/lua-language-server."
}Lua.addonManager.enableboolean
Set the on/off state for the addon manager.
Default: true
Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"markdownDescription": "Set the on/off state for the addon manager."
}Lua.completion.showWordstring
Show contextual words in suggestions.
Default: "Fallback"
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."
]
}Lua.diagnostics.disablearray
Disabled diagnostic (Use code in hover brackets).
Default: []
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-in-nil-env",
"index-in-func-name",
"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-parameter",
"missing-return",
"missing-return-value",
"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)."
}Lua.diagnostics.globalsarray
Defined global variables.
Default: []
Raw JSON Schema
{
"type": "array",
"items": {
"type": "string"
},
"scope": "resource",
"default": [],
"markdownDescription": "Defined global variables."
}Lua.hover.previewFieldsinteger
When hovering to view a table, limits the maximum number of previews for fields.
Default: 50
Raw JSON Schema
{
"type": "integer",
"scope": "resource",
"default": 50,
"markdownDescription": "When hovering to view a table, limits the maximum number of previews for fields."
}Lua.hover.viewStringMaxinteger
The maximum length of a hover to view the contents of a string.
Default: 1000
Raw JSON Schema
{
"type": "integer",
"scope": "resource",
"default": 1000,
"markdownDescription": "The maximum length of a hover to view the contents of a string."
}Lua.misc.executablePathstring
Specify the executable path in VSCode.
Default: ""
Raw JSON Schema
{
"type": "string",
"scope": "resource",
"default": "",
"markdownDescription": "Specify the executable path in VSCode."
}Lua.runtime.unicodeNameboolean
Allows Unicode characters in name.
Default: false
Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": false,
"markdownDescription": "Allows Unicode characters in name."
}Lua.semantic.annotationboolean
Semantic coloring of type annotations.
Default: true
Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"markdownDescription": "Semantic coloring of type annotations."
}Lua.type.weakUnionCheckboolean
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`.
Default: false
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"
}Lua.workspace.ignoreDirarray
Ignored files and directories (Use `.gitignore` grammar).
Default: [".vscode"]
Raw JSON Schema
{
"type": "array",
"items": {
"type": "string"
},
"scope": "resource",
"default": [
".vscode"
],
"markdownDescription": "Ignored files and directories (Use `.gitignore` grammar)."
}Lua.format.defaultConfigobject
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.
Default: {}
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
}Lua.runtime.fileEncodingstring
File encoding. The `ansi` option is only available under the `Windows` platform.
Default: "utf8"
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": [
"",
"",
"",
""
]
}Lua.signatureHelp.enableboolean
Enable signature help.
Default: true
Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"markdownDescription": "Enable signature help."
}Lua.workspace.maxPreloadinteger
Max preloaded files.
Default: 5000
Raw JSON Schema
{
"type": "integer",
"scope": "resource",
"default": 5000,
"markdownDescription": "Max preloaded files."
}Lua.completion.showParamsboolean
Display parameters in completion list. When the function has multiple definitions, they will be displayed separately.
Default: true
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."
}Lua.completion.autoRequireboolean
When the input looks like a file name, automatically `require` this file.
Default: true
Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"markdownDescription": "When the input looks like a file name, automatically `require` this file."
}Lua.completion.callSnippetstring
Shows function call snippets.
Default: "Disable"
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.`"
]
}Lua.workspace.useGitIgnoreboolean
Ignore files list in `.gitignore` .
Default: true
Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"markdownDescription": "Ignore files list in `.gitignore` ."
}Lua.completion.workspaceWordboolean
Whether the displayed context word contains the content of other files in the workspace.
Default: true
Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"markdownDescription": "Whether the displayed context word contains the content of other files in the workspace."
}Lua.diagnostics.ignoredFilesstring
How to diagnose ignored files.
Default: "Opened"
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."
]
}Lua.diagnostics.libraryFilesstring
How to diagnose files loaded via `Lua.workspace.library`.
Default: "Opened"
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."
]
}Lua.type.castNumberToIntegerboolean
Allowed to assign the `number` type to the `integer` type.
Default: true
Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"markdownDescription": "Allowed to assign the `number` type to the `integer` type."
}Lua.workspace.userThirdPartyarray
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)
Default: []
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)"
}Lua.completion.displayContextinteger
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.
Default: 0
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."
}Lua.completion.keywordSnippetstring
Shows keyword syntax snippets.
Default: "Replace"
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`."
]
}Lua.diagnostics.disableSchemearray
Do not diagnose Lua files that use the following scheme.
Default: ["git"]
Raw JSON Schema
{
"type": "array",
"items": {
"type": "string"
},
"scope": "resource",
"default": [
"git"
],
"markdownDescription": "Do not diagnose Lua files that use the following scheme."
}Lua.diagnostics.workspaceRateinteger
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.
Default: 100
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."
}Lua.runtime.nonstandardSymbolarray
Supports non-standard symbols. Make sure that your runtime environment supports these symbols.
Default: []
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."
}Lua.workspace.checkThirdPartyboolean
Automatic detection and adaptation of third-party libraries, currently supported libraries are:
* OpenResty
* Cocos4.0
* LÖVE
* LÖVR
* skynet
* Jass
Default: true
Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"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"
}Lua.workspace.preloadFileSizeinteger
Skip files larger than this value (KB) when preloading.
Default: 500
Raw JSON Schema
{
"type": "integer",
"scope": "resource",
"default": 500,
"markdownDescription": "Skip files larger than this value (KB) when preloading."
}Lua.diagnostics.workspaceDelayinteger
Latency (milliseconds) for workspace diagnostics.
Default: 3000
Raw JSON Schema
{
"type": "integer",
"scope": "resource",
"default": 3000,
"markdownDescription": "Latency (milliseconds) for workspace diagnostics."
}Lua.diagnostics.workspaceEventstring
Set the time to trigger workspace diagnostics.
Default: "OnSave"
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."
]
}Lua.workspace.ignoreSubmodulesboolean
Ignore submodules.
Default: true
Raw JSON Schema
{
"type": "boolean",
"scope": "resource",
"default": true,
"markdownDescription": "Ignore submodules."
}Lua.completion.requireSeparatorstring
The separator used when `require`.
Default: "."
Raw JSON Schema
{
"type": "string",
"scope": "resource",
"default": ".",
"markdownDescription": "The separator used when `require`."
}Lua.diagnostics.unusedLocalExcludearray
Do not diagnose `unused-local` when the variable name matches the following pattern.
Default: []
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."
}