Technical Documentation: LuaLS/lua-language-server
ℹ️ Provenance: Multi-Tier Ingestion · CodeWiki Reference
Overview (`README.md`)
lua-language-server
Lua development just got a whole lot better 🧠
The Lua language server provides various language features for Lua to make development easier and faster. With nearly a million installs in Visual Studio Code, it is the most popular extension for Lua language support.
See our website for more info.
Features
- ⚙️ Supports
Lua 5.5,Lua 5.4,Lua 5.3,Lua 5.2,Lua 5.1, andLuaJIT - 📄 Over 20 supported annotations for documenting your code
- ↪ Go to definition
- 🦺 Dynamic type checking
- 🔍 Find references
- ⚠️ Diagnostics/Warnings
- 🕵️ Syntax checking
- 📝 Element renaming
- 🗨️ Hover to view details on variables, functions, and more
- 🖊️ Autocompletion
- 📚 Support for libraries
- 💅 Code formatting
- 💬 Spell checking
- 🛠️ Custom plugins
- 📖 Documentation Generation
Install
The language server can be installed for use in Visual Studio Code, NeoVim, and any other clients that support the Language Server Protocol.
See installation instructions on our website.
Community Install Methods
The install methods below are maintained by community members.
Links
If you find any mistakes, please report it or open a pull request if you have a fix of your own ❤️
如果你发现了任何错误,请告诉我或使用Pull Requests来直接修复。❤️
Available Languages
en-us🇺🇸zh-cn🇨🇳zh-tw🇹🇼pt-br🇧🇷ja-jp🇯🇵es-419🇪🇸
Note
All translations are provided and collaborated on by the community. If you find an inappropriate or harmful translation, please report it immediately.
Are you able to provide a translation? It would be greatly appreciated!
Thank you to all contributors of translations!
Privacy
The language server had opt-in telemetry that collected usage data and sent it to the development team to help improve the extension. Read our privacy policy to learn more. Telemetry was removed in v3.6.5 and is no longer part of the language server.
Contributors
Credit
Software that the language server (or the development of it) uses:
- bee.lua
- luamake
- LPegLabel
- LuaParser
- ScreenToGif
- vscode-languageclient
- lua.tmbundle
- EmmyLua
- lua-glob
- utility
- vscode-lua-doc
- json.lua
- EmmyLuaCodeStyle
- inspect.lua
Doc En Us Config (`doc/en-us/config.md`)
addonManager.enable
Whether the addon manager is enabled or not.
type
booleandefault
trueaddonManager.repositoryBranch
Specifies the git branch used by the addon manager.
type
stringdefault
""addonManager.repositoryPath
Specifies the git path used by the addon manager.
type
stringdefault
""addonRepositoryPath
Specifies the addon repository path (not related to the addon manager).
type
stringdefault
""codeLens.enable
Enable code lens.
type
booleandefault
falsecompletion.autoRequire
When the input looks like a file name, automatically require this file.
type
booleandefault
truecompletion.callSnippet
Shows function call snippets.
type
stringenum
"Disable": Only showsfunction name."Both": Showsfunction nameandcall snippet."Replace": Only showscall snippet.
default
"Disable"completion.displayContext
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.
type
integerdefault
0completion.enable
Enable completion.
type
booleandefault
truecompletion.keywordSnippet
Shows keyword syntax snippets.
type
stringenum
"Disable": Only showskeyword."Both": Showskeywordandsyntax snippet."Replace": Only showssyntax snippet.
default
"Replace"completion.maxSuggestCount
Maximum number of fields to analyze for completions. When an object has more fields than this limit, completions will require more specific input to appear.
type
integerdefault
100completion.postfix
The symbol used to trigger the postfix suggestion.
type
stringdefault
"@"completion.requireFunction
The function to insert when an auto-require is triggered.
type
stringdefault
"require"completion.requireSeparator
The separator used when require.
type
stringdefault
"."completion.showParams
Display parameters in completion list. When the function has multiple definitions, they will be displayed separately.
type
booleandefault
truecompletion.showWord
Show contextual words in suggestions.
type
stringenum
"Enable": Always show context words in suggestions."Fallback": Contextual words are only displayed when suggestions based on semantics cannot be provided."Disable": Do not display context words.
default
"Fallback"completion.workspaceWord
Whether the displayed context word contains the content of other files in the workspace.
type
booleandefault
truediagnostics.disable
Disabled diagnostic (Use code in hover brackets).
type
Array<string>enum
"action-after-return": Code after areturnstatement"ambiguity-1": Enable ambiguous operator precedence diagnostics. For example, thenum or 0 + 1expression will be suggested(num or 0) + 1instead."ambiguous-syntax": Ambiguous syntax"args-after-dots": Arguments after..."assign-const-global": Assigning to a const global variable"assign-type-mismatch": Enable diagnostics for assignments in which the value's type does not match the type of the assigned variable."await-in-sync": Enable diagnostics for calls of asynchronous functions within a synchronous function."block-after-else": Block afterelse"break-outside": Usingbreakoutside a loop"cast-local-type": Enable diagnostics for casts of local variables where the target type does not match the defined type."cast-type-mismatch": Enable diagnostics for casts where the target type does not match the initial type."circle-doc-class": Circular@classinheritance"close-non-object": Enable diagnostics for attempts to close a variable with a non-object."code-after-break": Enable diagnostics for code placed after a break statement in a loop."codestyle-check": Enable diagnostics for incorrectly styled lines."count-down-loop": Enable diagnostics forforloops which will never reach their max/limit because the loop is incrementing instead of decrementing."declare-const": Redeclaring a const constant"deprecated": Enable diagnostics to highlight deprecated API."different-requires": Enable diagnostics for files which are required by two different paths."discard-returns": Enable diagnostics for calls of functions annotated with---@nodiscardwhere the return values are ignored."doc-field-no-class": Enable diagnostics to highlight a field annotation without a defining class annotation."duplicate-doc-alias": Enable diagnostics for a duplicated alias annotation name."duplicate-doc-field": Enable diagnostics for a duplicated field annotation name."duplicate-doc-param": Enable diagnostics for a duplicated param annotation name."duplicate-index": Enable duplicate table index diagnostics."duplicate-set-field": Enable diagnostics for setting the same field in a class more than once."empty-block": Enable empty code block diagnostics."env-is-global":_ENVused as a global variable"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": Expression used in statement position"global-close-attribute": Close attribute on a global variable"global-element": Enable diagnostics to warn about global elements."global-in-nil-env": Enable cannot use global variables (_ENVis set tonil) diagnostics."incomplete-signature-doc": Incomplete @param or @return annotations for functions."index-in-func-name": Index in a function name"inject-field": Injecting a field into an object"invisible": Enable diagnostics for accesses to fields which are invisible."jump-local-scope": Jumping into a local variable scope"keyword": Improper use of a keyword"local-limit": Too many local variables"lowercase-global": Enable lowercase global variable definition diagnostics."lua-doc-miss-sign": LuaDoc comment missing a 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": Malformed number literal"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 fields"missing-global-doc": Missing annotations for globals! Global functions must have a comment and annotations for all parameters and return values."missing-local-export-doc": Missing annotations for exported locals! Exported local functions must have a comment and annotations for all parameters and return values."missing-parameter": Enable diagnostics for function calls where the number of arguments is less than the number of annotated function parameters."missing-return": Enable diagnostics for functions with return annotations which have no return statement."missing-return-value": Enable diagnostics for return statements without values although the containing function declares returns."multi-close": Multiple close operations"name-style-check": Enable diagnostics for name style."need-check-nil": Enable diagnostics for variable usages ifnilor an optional (potentiallynil) value was assigned to the variable before."need-paren": Parentheses required"nesting-long-mark": Nested long comment markers"newfield-call": 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."newline-call": Enable newline call diagnostics. It's raised when a line starting with(is encountered, which is syntactically parsed as a function call on the previous line."no-unknown": Enable diagnostics for cases in which the type cannot be inferred."no-visible-label": Invisible label"not-yieldable": Enable diagnostics for calls tocoroutine.yield()when it is not permitted."param-type-mismatch": Enable diagnostics for function calls where the type of a provided parameter does not match the type of the annotated function definition."redefined-label": Redefined label"redefined-local": Enable redefined local variable diagnostics."redundant-parameter": Enable redundant function parameter diagnostics."redundant-return": Enable diagnostics for return statements which are not needed because the function would exit on its own."redundant-return-value": Enable diagnostics for return statements which return an extra value which is not specified by a return annotation."redundant-value": 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."return-type-mismatch": Enable diagnostics for return values whose type does not match the type declared in the corresponding return annotation."set-const": Assigning to a const constant"spell-check": Enable diagnostics for typos in strings."trailing-space": Enable trailing space diagnostics."unbalanced-assignments": Enable diagnostics on multiple assignments if not all variables obtain a value (e.g.,local x,y = 1)."undefined-doc-class": Enable diagnostics for class annotations in which an undefined class is referenced."undefined-doc-name": Enable diagnostics for type annotations referencing an undefined type or alias."undefined-doc-param": Enable diagnostics for cases in which a parameter annotation is given without declaring the parameter in the function definition."undefined-env-child": Enable undefined environment variable diagnostics. It's raised when_ENVtable is set to a new literal table, but the used global variable is no longer present in the global environment."undefined-field": Enable diagnostics for cases in which an undefined field of a variable is read."undefined-global": Enable undefined global variable diagnostics."unexpect-dots""unexpect-efunc-name""unexpect-gfunc-name""unexpect-lfunc-name""unexpect-symbol""unicode-name": Unicode name"unknown-attribute": Unknown attribute"unknown-cast-variable": Enable diagnostics for casts of undefined variables."unknown-diag-code": Enable diagnostics in cases in which an unknown diagnostics code is entered."unknown-operator": Enable diagnostics for unknown operators."unknown-symbol": Unknown symbol"unreachable-code": Enable diagnostics for unreachable code."unsupport-named-vararg": Unsupported named vararg"unsupport-symbol""unused-function": Enable unused function diagnostics."unused-label": Enable unused label diagnostics."unused-local": Enable unused local variable diagnostics."unused-vararg": Enable unused vararg diagnostics."variable-not-declared": Using an undeclared variable
default
[]diagnostics.enable
Enable diagnostics.
type
booleandefault
truediagnostics.enableScheme
Missing description!!
type
Array<string>default
["file"]diagnostics.globals
Defined global variables.
type
Array<string>default
[]diagnostics.globalsRegex
Find defined global variables using regex.
type
Array<string>default
[]diagnostics.groupFileStatus
Modify the diagnostic needed file status in a group.
- Opened: only diagnose opened files
- Any: diagnose all files
- None: disable this diagnostic
Fallback means that diagnostics in this group are controlled by diagnostics.neededFileStatus separately.
Other settings will override individual settings without end of !.
type
object<string, string>enum
"Any""Opened""None""Fallback"
default
/* Detailed source-code truncated for AI context efficiency. */diagnostics.groupSeverity
Modify the diagnostic severity in a group.Fallback means that diagnostics in this group are controlled by diagnostics.severity separately.
Other settings will override individual settings without end of !.
type
object<string, string>enum
"Error""Warning""Information""Hint""Fallback"
default
/* Detailed source-code truncated for AI context efficiency. */diagnostics.ignoredFiles
How to diagnose ignored files.
type
stringenum
"Enable": Always diagnose these files."Opened": Only when these files are opened will it be diagnosed."Disable": These files are not diagnosed.
default
"Opened"diagnostics.libraryFiles
How to diagnose files loaded via Lua.workspace.library.
type
stringenum
"Enable": Always diagnose these files."Opened": Only when these files are opened will it be diagnosed."Disable": These files are not diagnosed.
default
"Opened"diagnostics.neededFileStatus
- Opened: only diagnose opened files
- Any: diagnose all files
- None: disable this diagnostic
End with ! means override the group setting diagnostics.groupFileStatus.
type
object<string, string>enum
"Any""Opened""None""Any!""Opened!""None!"
default
/* Detailed source-code truncated for AI context efficiency. */diagnostics.severity
Modify the diagnostic severity.
End with ! means override the group setting diagnostics.groupSeverity.
type
object<string, string>enum
"Error""Warning""Information""Hint""Error!""Warning!""Information!""Hint!"
default
/* Detailed source-code truncated for AI context efficiency. */diagnostics.unusedLocalExclude
Do not diagnose unused-local when the variable name matches the following pattern.
type
Array<string>default
[]diagnostics.workspaceDelay
Latency (milliseconds) for workspace diagnostics.
type
integerdefault
3000diagnostics.workspaceEvent
Set the time to trigger workspace diagnostics.
type
stringenum
"OnChange": Trigger workspace diagnostics when the file is changed."OnSave": Trigger workspace diagnostics when the file is saved."None": Disable workspace diagnostics.
default
"OnSave"diagnostics.workspaceRate
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.
type
integerdefault
100doc.packageName
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.
type
Array<string>default
[]doc.privateName
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.
type
Array<string>default
[]doc.protectedName
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.
type
Array<string>default
[]doc.regengine
The regular expression engine used for matching documentation scope names.
type
stringenum
"glob": The default lightweight pattern syntax."lua": Full Lua-style regular expressions.
default
"glob"docScriptPath
The regular expression engine used for matching documentation scope names.
type
stringdefault
""format.defaultConfig
The default format configuration. Has a lower priority than .editorconfig file in the workspace.
Read formatter docs to learn usage.
type
Object<string, string>default
{}format.enable
Enable code formatter.
type
booleandefault
truehint.arrayIndex
Show hints of array index when constructing a table.
type
stringenum
"Enable": Show hints in all tables."Auto": Show hints only when the table is greater than 3 items, or the table is a mixed table."Disable": Disable hints of array index.
default
"Auto"hint.await
If the called function is marked ---@async, prompt await at the call.
type
booleandefault
truehint.awaitPropagate
Enable the propagation of await. When a function calls a function marked ---@async,it will be automatically marked as ---@async.
type
booleandefault
falsehint.enable
Enable inlay hint.
type
booleandefault
falsehint.paramName
Show hints of parameter name at the function call.
type
stringenum
"All": All types of parameters are shown."Literal": Only literal type parameters are shown."Disable": Disable parameter hints.
default
"All"hint.paramType
Show type hints at the parameter of the function.
type
booleandefault
truehint.semicolon
If there is no semicolon at the end of the statement, display a virtual semicolon.
type
stringenum
"All": All statements display virtual semicolons."SameLine": When two statements are on the same line, display a semicolon between them."Disable": Disable virtual semicolons.
default
"SameLine"hint.setType
Show hints of type at assignment operation.
type
booleandefault
falsehover.enable
Enable hover.
type
booleandefault
truehover.enumsLimit
When the value corresponds to multiple types, limit the number of types displaying.
type
integerdefault
5hover.expandAlias
Whether to expand the alias. For example, expands ---@alias myType boolean|number appears as boolean|number, otherwise it appears as `myType'.
type
booleandefault
truehover.previewFields
When hovering to view a table, limits the maximum number of previews for fields.
type
integerdefault
10hover.viewNumber
Hover to view numeric content (only if literal is not decimal).
type
booleandefault
truehover.viewString
Hover to view the contents of a string (only if the literal contains an escape character).
type
booleandefault
truehover.viewStringMax
The maximum length of a hover to view the contents of a string.
type
integerdefault
1000language.completeAnnotation
(VSCode only) Automatically insert "---@ " after a line break following a annotation.
type
booleandefault
truelanguage.fixIndent
(VSCode only) Fix incorrect auto-indentation, such as incorrect indentation when line breaks occur within a string containing the word "function".
type
booleandefault
truemisc.executablePath
Specify the executable path in VSCode.
type
stringdefault
""misc.parameters
Command line parameters when starting the language server in VSCode.
type
Array<string>default
[]nameStyle.config
Set name style config.
Read formatter docs to learn usage.
type
Object<string, string | array>default
{}runtime.builtin
Adjust the enabled state of the built-in library. You can disable (or redefine) the non-existent library according to the actual runtime environment.
default: Indicates that the library will be enabled or disabled according to the runtime versionenable: always enabledisable: always disable
type
object<string, string>enum
"default""enable""disable"
default
{
"basic": "default",
"bit": "default",
"bit32": "default",
"builtin": "default",
"coroutine": "default",
"debug": "default",
"ffi": "default",
"io": "default",
"jit": "default",
"jit.profile": "default",
"jit.util": "default",
"math": "default",
"os": "default",
"package": "default",
"string": "default",
"string.buffer": "default",
"table": "default",
"table.clear": "default",
"table.new": "default",
"utf8": "default"
}runtime.enableLuaJITExtensions
Enable LuaJIT extension syntax (requires Lua.runtime.version to be set to LuaJIT).
Each extension can also be enabled individually via Lua.runtime.nonstandardSymbol.
type
booleandefault
falseruntime.fileEncoding
File encoding. The ansi option is only available under the Windows platform.
type
stringenum
"utf8""ansi""utf16le""utf16be"
default
"utf8"runtime.meta
Format of the directory name of the meta files.
type
stringdefault
"${version} ${language} ${encoding}"runtime.nonstandardSymbol
Supports non-standard symbols. Make sure that your runtime environment supports these symbols.
type
Array<string>enum
"//": Line comment (C style)."/**/": Block comment (C style)."`": Backtick string literal."+=": Add compound assignment."-=": Subtract compound assignment."*=": Multiply compound assignment."/=": Divide compound assignment."%=": Modulo compound assignment."^=": Power compound assignment."//=": Floor-divide compound assignment."|=": Bitwise-or compound assignment."&=": Bitwise-and compound assignment."<<=": Left shift compound assignment.">>=": Right shift compound assignment."||": Logical or (equivalent toor)."&&": Logical and (equivalent toand)."!": Logical not (equivalent tonot)."!=": Not equal (equivalent to~=)."continue":continuestatement."|lambda|": Pipe-parameter short function (|x| expr)."?.": Safe navigation (field/method:a?.b/obj?.:method()/obj:method?.())."?.(": Safe navigation call (f?.()/f?."str"/f?.{...}/f?.[[...]])."?.[": Safe navigation index (t?.[key])."??": Nil-coalescing (a ?? b; takes the right side only when the left side is nil)."ternary": Ternary operator (cond ? x : y, right-associative; method calls forbidden in thexpart)."~>>": Arithmetic right shift (a ~>> b, LuaJIT-specific; plain>>is logical)."~>>=": Arithmetic right shift compound assignment (a ~>>= b)."..=": String concatenation compound assignment (a ..= b)."~=": Bitwise-xor compound assignment: only in statement context (e.g.a ~= bon its own line); in expressions it remains the not-equal operator."const":constdeclaration (block-scoped local constant, cannot be reassigned or redeclared)."->": Short function arrow (x -> expr/|x| -> expr/|| -> expr/-> do ... end)."number_underscore": Underscores in number literals (e.g.1_000,0x1_2,0b1_0)."?(": No-dot optional call (f?()equalsf?.(); conflicts with ternary (ternary) parsing, not recommended together)."?[": No-dot optional index (t?[1]equalst?.[1]; conflicts with ternary (ternary) parsing, not recommended together)."?:": No-dot safe method (obj?:get()equalsobj?.:get()).
default
[]runtime.path
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.
type
Array<string>default
["?.lua","?/init.lua"]runtime.pathStrict
When enabled, runtime.path will only search the first level of directories, see the description of runtime.path.
type
booleandefault
falseruntime.plugin
Plugin path. Please read wiki to learn more.
type
string | arraydefault
nullruntime.pluginArgs
Additional arguments for the plugin.
type
array | objectdefault
nullruntime.special
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 '.
"Lua.runtime.special" : {
"include" : "require"
}type
Object<string, string>default
{}runtime.unicodeName
Allows Unicode characters in name.
type
booleandefault
falseruntime.version
Lua runtime version.
type
stringenum
"Lua 5.1""Lua 5.2""Lua 5.3""Lua 5.4""Lua 5.5""LuaJIT"
default
"Lua 5.4"semantic.annotation
Semantic coloring of type annotations.
type
booleandefault
truesemantic.enable
Enable semantic color. You may need to set editor.semanticHighlighting.enabled to true to take effect.
type
booleandefault
truesemantic.keyword
Semantic coloring of keywords/literals/operators. You only need to enable this feature if your editor cannot do syntax coloring.
type
booleandefault
falsesemantic.variable
Semantic coloring of variables/fields/parameters.
type
booleandefault
truesignatureHelp.enable
Enable signature help.
type
booleandefault
truespell.dict
Custom words for spell checking.
type
Array<string>default
[]type.castNumberToInteger
Allowed to assign the number type to the integer type.
type
booleandefault
truetype.checkTableShape
Strictly check the shape of the table.
type
booleandefault
falsetype.inferParamType
When a parameter type is not annotated, it is inferred from the function's call sites.
When this setting is false, the type of the parameter is any when it is not annotated.
type
booleandefault
falsetype.inferTableSize
Maximum number of table fields analyzed during type inference.
type
integerdefault
10type.maxUnionVariants
Missing description!!
type
integerdefault
0type.weakNilCheck
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.
type
booleandefault
falsetype.weakUnionCheck
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.
type
booleandefault
falsetypeFormat.config
Configures the formatting behavior while typing Lua code.
type
object<string, string>default
{
/*
Controls if `end` is automatically completed at suitable positions.
*/
"auto_complete_end": "true",
/*
Controls if a separator is automatically appended at the end of a table declaration.
*/
"auto_complete_table_sep": "true",
/*
Controls if a line is formatted at all.
*/
"format_line": "true"
}window.progressBar
Show progress bar in status bar.
type
booleandefault
truewindow.statusBar
Show extension status in status bar.
type
booleandefault
trueworkspace.checkThirdParty
Automatic detection and adaptation of third-party libraries, currently supported libraries are:
- OpenResty
- Cocos4.0
- LÖVE
- LÖVR
- skynet
- Jass
type
string | booleandefault
nullworkspace.ignoreDir
Ignored files and directories (Use .gitignore grammar).
type
Array<string>default
[".vscode"]workspace.ignoreSubmodules
Ignore submodules.
type
booleandefault
trueworkspace.library
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.
type
Array<string>default
[]workspace.maxPreload
Max preloaded files.
type
integerdefault
5000workspace.preloadFileSize
Skip files larger than this value (KB) when preloading.
type
integerdefault
500workspace.useGitIgnore
Ignore files list in .gitignore .
type
booleandefault
trueworkspace.userThirdParty
Add private third-party library configuration file paths here, please refer to the built-in configuration file path
type
Array<string>default
[]Doc Es 419 Config (`doc/es-419/config.md`)
addonManager.enable
Si el manejador de extensiones está habilitado.
type
booleandefault
trueaddonManager.repositoryBranch
Especifica la rama de git usada por el manejador de extensiones.
type
stringdefault
""addonManager.repositoryPath
Especifica la ruta git usada por el manejador de extensiones.
type
stringdefault
""addonRepositoryPath
Especifica la ruta del repositorio de complementos (no relacionada con el gestor de complementos).
type
stringdefault
""codeLens.enable
Habilita el lente para código.
type
booleandefault
falsecompletion.autoRequire
Agrega automáticamente el require correspondiente cuando la entrada se parece a un nombre de archivo.
type
booleandefault
truecompletion.callSnippet
Muestra snippets para llamadas de funciones.
type
stringenum
"Disable": Solo muestrafunción nombre."Both": Muestrafunción nombreyllamar al snippet."Replace": Solo muestrallamar al snippet.
default
"Disable"completion.displayContext
La prevista de la sugerencia del snippet de código relevante ayuda a entender el uso de la sugerenecia. El número fijado indica el número de líneas interceptadas en el fragmento de código. Fijando en 0 se deshabilita esta característica.
type
integerdefault
0completion.enable
Habilita la completación.
type
booleandefault
truecompletion.keywordSnippet
Muestra snippets con sintaxis de palabras clave.
type
stringenum
"Disable": Solo muestrapalabra clave."Both": Muestrapalabra claveysnippet de sintaxis."Replace": Solo muestrasnippet de sintaxis.
default
"Replace"completion.maxSuggestCount
Número máximo de campos a analizar para autocompletar. Cuando un objeto tiene más campos que este límite, las sugerencias requerirán una entrada más específica para aparecer.
type
integerdefault
100completion.postfix
El símbolo usado para lanzar la sugerencia posfija.
type
stringdefault
"@"completion.requireSeparator
Separador usado en require.
type
stringdefault
"."completion.showParams
Muestra los parámetros en la lista de completado. Cuando la función tiene múltiples definiciones, se mostrarán por separado.
type
booleandefault
truecompletion.showWord
Muestra palabras contextuales en las sugerencias.
type
stringenum
"Enable": Siempre muestra palabras contextuales en las sugerencias."Fallback": Las palabras contextuales solo se muestran si las sugerencias basadas en la semántica no están provistas."Disable": Sin presentar las palabras contextuales.
default
"Fallback"completion.workspaceWord
Si es que el la palabra contextual presentada contiene contenido de otros archivos en el espacio de trabajo.
type
booleandefault
truediagnostics.disable
Deshabilita los diagnósticos (Usa código en corchetes bajo el cursor).
type
Array<string>enum
"action-after-return": Código después de una sentenciareturn"ambiguity-1": Habilita el diagnóstico de precedencia de operadores ambiguos. Por ejemplo, ante la expresiónnum or 0 + 1se sugerirrá(num or 0) + 1."ambiguous-syntax": Sintaxis ambigua"args-after-dots": Argumentos después de..."assign-const-global": Asignando a una variable global const"assign-type-mismatch": Habilita el diagnóstico para asignaciones en las cuales el valor del tipo no calza con el tipo de la variable siendo asignada."await-in-sync": Habilita el diagnóstico para llamadas a funciones asíncronas dentro de una función síncrona."block-after-else": Bloque después deelse"break-outside": Usandobreakfuera de un bucle"cast-local-type": Habilita el diagnóstico para conversión de tipos de variables locales donde el tipo objetivo no calza con el tipo definido."cast-type-mismatch": Habilita el diagnóstico para conversiones de tipos donde el tipo objetivo no calza con el tipo inicial."circle-doc-class": Herencia circular de@class"close-non-object": Habilita el diagnóstico para intentos de cerra una variable con un no-objeto."code-after-break": Habilita el diagnóstico para el código que viene después de unbreaken un bucle."codestyle-check": Habilita el diagnóstico para líneas formateadas incorrectamente."count-down-loop": Habilita el diagnóstico para buclesforen los cuales nunca se alcanza su máximo o límite por que el bucle es incremental en vez de decremental."declare-const": Redeclarando una constante const"deprecated": Habilita el diagnóstico para resaltar APIs obsoletas."different-requires": Habilita el diagnóstico para archivos que son requeridos con dos rutas distintas."discard-returns": Habilita el diagnóstico para llamadas de funciones anotadas con---@nodiscarden las cuales se ignore los valores retornados."doc-field-no-class": Habilita el diagnóstico para resaltar una anotación de campo sin una anotación de clase que lo defina."duplicate-doc-alias": Habilita el diagnóstico para nombres de alias duplicados en una anotación."duplicate-doc-field": Habilita el diagnóstico para nombres de campo duplicados en una anotación."duplicate-doc-param": Habilita el diagnóstico para nombres de parámetros duplicados en una anotación."duplicate-index": Habilita el diagnóstico de índices de tabla duplicados."duplicate-set-field": Habilita el diagnóstico para cuando se asigna el mismo campo en una clase más de una vez."empty-block": Habilita el diagnóstico de bloques de código vacíos."env-is-global":_ENVusado como variable global"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": Expresión usada en posición de sentencia"global-close-attribute": Atributo close en una variable global"global-element": Habilita el diagnóstico que alerta sobre elementos globales."global-in-nil-env": Habilita el diagnóstico para la prohibición de uso de variables globales (_ENVse fija anil)."incomplete-signature-doc": Habilita el diagnóstico para anotaciones @param o @return incompletas para funciones."index-in-func-name": Índice en nombre de función"inject-field": Inyectando un campo en un objeto"invisible": Habilita el diagnóstico para accesos a campos que son invisibles."jump-local-scope": Saltando a un ámbito de variable local"keyword": Uso inadecuado de una palabra clave"local-limit": Demasiadas variables locales"lowercase-global": Habilita el diagnóstico de definiciones de variables globacels con minúsculas."lua-doc-miss-sign": Comentario LuaDoc sin signo"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": Literal numérico malformado"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": Campos faltantes"missing-global-doc": Habilita el diagnóstico para globales faltantes. Las funciones globales deben tener un comentario y anotaciones para todos sus parámetros y valores retornados."missing-local-export-doc": Habilita el diagnóstico para locales exportadas. Las funciones locales deben tener un comentario y anotaciones para todos sus parámetros y valores retornados."missing-parameter": Habilita el diagnóstico para llamados de funciones donde el número de argumentos es menore que el número de parámetros anotados de la función."missing-return": Habilita el diagnóstico para para funciones con anotaciones de retorno que no tienen la expresiónreturn …."missing-return-value": Habilita el diagnóstico para expresionesreturn …sin valores aunque la función que la contiene declare retornos."multi-close": Múltiples operaciones close"name-style-check": Habilita el diagnóstico para el estilo de nombres."need-check-nil": Habilita el diagnóstico para usos de variables sinilo un valor opcional (potencialmentenil) haya sido asignado a la variable anteriormente."need-paren": Se requieren paréntesis"nesting-long-mark": Marcadores de comentario largo anidados"newfield-call": Habilita el diagnóstico de campo nuevo en una llamada. Se alza un error cuando los paréntesis de una llamada a una función aparecen en la siguiente línea cuando se define un campo en una tabla."newline-call": Habilita el diagnóstico de llamadas en línea nueva. Se alza un error en las líneas que comienzan con(, lo que se lee sintácticamente como una llamada a la línea anterior."no-unknown": Habilita el diagnóstico para los casos en que el tipo no puede ser inferido."no-visible-label": Etiqueta invisible"not-yieldable": Habilita el diagnóstico para llamadas acoroutine.yield()cuando no esté permitido."param-type-mismatch": Habilita el diagnóstico para llamadas a funciones donde el tipo de un parámetro provisto no calza con el tipo de la definición anotado de la función."redefined-label": Etiqueta redefinida"redefined-local": Habilita el diagnóstico de variables locals redefinidas."redundant-parameter": Habilita el diagnóstico de parámetros redundantes de una función."redundant-return": Habilita el diagnóstico para sentencias de retorno que no son necesarias porque la función terminaría de igual manera."redundant-return-value": Habilita el diagnóstico para sentencias de retorno que retornan un valor extra que no fue especificado por una anotación de retorno."redundant-value": Habilita el diagnóstico de valores asignados redundantemente. Se alza un error en una asignación, cuando el número de valores es mayor que el número de objetos a los cuales se les asigna."return-type-mismatch": Habilita el diagnóstico para valores retornados cuyo tipo no calza con el tipo declarado en la anotación correspondiente de la función."set-const": Asignando a una constante const"spell-check": Habilita el diagnóstico para errores tipográficos en strings."trailing-space": Habilita el diagnóstico de espacios al final de línea."unbalanced-assignments": Habilita el diagnóstico para asignaciones múltiplies si no todas las variables obtienen un valor (por ejemplo,local x,y = 1)."undefined-doc-class": Habilita el diagnóstico para las anotaciones de clase en las cuales una clase sin definir es referenciada."undefined-doc-name": Habilita el diagnóstico para anotaciones de tipo que referencian a un tipo o alias sin definir."undefined-doc-param": Habilita el diagnóstico para casos en que una anotación de parámetro es dado sin declarar el parámetro en la definición de la función."undefined-env-child": Habilita el diagnóstico de variables de ambientes sin definir. Se alza un error cuando a la tabla_ENVse le asigna una tabla literal nueva, pero la variable global usada no está presente en el ambiente global."undefined-field": Habilita el diagnóstico para los casos en que se lee un campo sin definir de una variable."undefined-global": Habilita el diagnóstico de variables globales sin definir."unexpect-dots""unexpect-efunc-name""unexpect-gfunc-name""unexpect-lfunc-name""unexpect-symbol""unicode-name": Nombre Unicode"unknown-attribute": Atributo desconocido"unknown-cast-variable": Habilita el diagnóstico para conversiones de tipo de variables sin definir."unknown-diag-code": Habilita el diagnóstico para los casos en que un código desconocido de diagnóstico es ingresado."unknown-operator": Habilita el diagnóstico para operadores desconocidos."unknown-symbol": Símbolo desconocido"unreachable-code": Habilita el diagnóstico para código inalcanzable."unsupport-named-vararg": Vararg nombrado no soportado"unsupport-symbol""unused-function": Habilita el diagnóstico funcines sin uso."unused-label": Habilita el diagnóstico de etiquetas sin uso."unused-local": Habilita el diagnóstico de variables local sin uso."unused-vararg": Habilita el diagnóstico de expresión de número variable de argumentos (vararg) sin uso."variable-not-declared": Usando una variable no declarada
default
[]diagnostics.enable
Habilita los diagnósticos.
type
booleandefault
truediagnostics.enableScheme
Missing description!!
type
Array<string>default
["file"]diagnostics.globals
Variables globales definidas.
type
Array<string>default
[]diagnostics.globalsRegex
Encuentra variables globales definidas usando esta expresión regular.
type
Array<string>default
[]diagnostics.groupFileStatus
Modifica los diagnósticos de archivos requeridos en un grupo.
- Opened: solo diagnostica los archivos abiertos
- Any: diagnostica todos los archivos
- None: deshabilita este diagnóstico
Fallback significa que los diagnósticos en este grupo son controlados con una severida separada de diagnostics.neededFileStatus.
Otras configuraciones descartan las configuraciones individuales que no terminen en !.
type
object<string, string>enum
"Any""Opened""None""Fallback"
default
/* Detailed source-code truncated for AI context efficiency. */diagnostics.groupSeverity
Modifica el la severirad de los diagnósticos en un grupo.Fallback significa que los diagnósticos en este grupo son controlados con una severida separada de diagnostics.severity.
Otras configuraciones descartan las configuraciones individuales que no terminen en !.
type
object<string, string>enum
"Error""Warning""Information""Hint""Fallback"
default
/* Detailed source-code truncated for AI context efficiency. */diagnostics.ignoredFiles
Cómo diagnosticar los archivos ignorados.
type
stringenum
"Enable": Estos archivos siempre se diagnostican."Opened": Estos archivos se diagnostican solo cuando se abren."Disable": Estos archivos no se diagnostican.
default
"Opened"diagnostics.libraryFiles
Cómo diagnosticar los archivos cargados via Lua.workspace.library.
type
stringenum
"Enable": Estos archivos siempre se diagnostican."Opened": Estos archivos se diagnostican solo cuando se abren."Disable": Estos archivos no se diagnostican.
default
"Opened"diagnostics.neededFileStatus
- Opened: Solo diagnostica los archivos abiertos
- Any: diagnostica todos los archivos
- None: deshabilita este diagnóstico
Agregue ! al final para descartar la configuración diagnostics.groupFileStatus.
type
object<string, string>enum
"Any""Opened""None""Any!""Opened!""None!"
default
/* Detailed source-code truncated for AI context efficiency. */diagnostics.severity
Modifica el la severirad de los diagnósticos.
Agregue ! al final para descartar la configuración diagnostics.groupSeverity.
type
object<string, string>enum
"Error""Warning""Information""Hint""Error!""Warning!""Information!""Hint!"
default
/* Detailed source-code truncated for AI context efficiency. */diagnostics.unusedLocalExclude
Las variables que calcen con el siguiente patrón no se diagnostican con unused-local.
type
Array<string>default
[]diagnostics.workspaceDelay
Latencia en milisegundos para diagnósticos del espacio de trabajo.
type
integerdefault
3000diagnostics.workspaceEvent
Fija el tiempo para lanzar los diagnósticos del espacio de trabajo.
type
stringenum
"OnChange": Lanza los diagnósticos del espacio de trabajo cuando se cambie el archivo."OnSave": Lanza los diagnósticos del espacio de trabajo cuando se guarde el archivo."None": Deshabilita los diagnósticos del espacio de trabajo.
default
"OnSave"diagnostics.workspaceRate
Tasa porcentual de diagnósticos del espacio de trabajo. Decremente este valor para reducir el uso de CPU, también reduciendo la velocidad de los diagnósticos del espacio de trabajo. El diagnóstico del archivo que esté editando siempre se hace a toda velocidad y no es afectado por esta configuración.
type
integerdefault
100doc.packageName
Trata los nombres específicos de campo como del paquete. Por ejemplo m_* significa XXX.m_id y XXX.m_tipo son de paquete, por lo que solo pueden ser accedidos en el archivo donde son definidos.
type
Array<string>default
[]doc.privateName
Trata los nombres específicos de campo como privados. Por ejemplo m_* significa XXX.m_id y XXX.m_tipo son privados, por lo que solo pueden ser accedidos donde se define la clase.
type
Array<string>default
[]doc.protectedName
Trata los nombres específicos de campo como protegidos. Por ejemplo m_* significa XXX.m_id y XXX.m_tipo son privados, por lo que solo pueden ser accedidos donde se define la clase y sus subclases.
type
Array<string>default
[]doc.regengine
Motor de expresiones regulares usado para coincidir nombres de ámbito de documentación.
type
stringenum
"glob": Sintaxis de patrones ligera predeterminada."lua": Expresiones regulares completas al estilo Lua.
default
"glob"docScriptPath
Motor de expresiones regulares usado para coincidir nombres de ámbito de documentación.
type
stringdefault
""format.defaultConfig
La configuración de formateo predeterminada. Tiene menor prioridad que el archivo .editorconfig
en el espacio de trabajo.
Revise la documentación del formateador
para aprender más sobre su uso.
type
Object<string, string>default
{}format.enable
Habilita el formateador de código.
type
booleandefault
truehint.arrayIndex
Muestra las pistas de los índices de arreglos cuando se construye una tabla.
type
stringenum
"Enable": Muestra las pistas en todas las tablas."Auto": Muestra las pistas solo cuando la tabla tiene más de 3 ítemes, o cuando la tabla es mixta."Disable": Deshabilita las pistas en de los índices de arreglos.
default
"Auto"hint.await
Si la función que se llama está marcada con ---@async, pregunta por un await en la llamada.
type
booleandefault
truehint.awaitPropagate
Habilita la propagación de await. Cuando una función llama a una función marcada con ---@async,se marcará automáticamente como ---@async.
type
booleandefault
falsehint.enable
Habilita pistas en línea.
type
booleandefault
falsehint.paramName
Muestra las pistas de tipo en las llamadas a funciones.
type
stringenum
"All": Se muestran odos los tipos de los parámetros."Literal": Se muestran solo los parámetros de tipos literales."Disable": Deshabilita las pistas de los parámetros.
default
"All"hint.paramType
Muestra las pistas de tipo al parámetro de las funciones.
type
booleandefault
truehint.semicolon
Si no hay punto y coma al final de la sentencia, despliega un punto y coma virtual.
type
stringenum
"All": Todas las sentencias con un punto y coma virtual desplegado."SameLine": Cuando dos sentencias están en la misma línea, despliega un punto y coma entre ellas."Disable": Deshabilita punto y coma virtuales.
default
"SameLine"hint.setType
Muestra las pistas de tipo en las asignación.
type
booleandefault
falsehover.enable
Habilita la información bajo el cursor.
type
booleandefault
truehover.enumsLimit
Cuando el valor corresponde a múltiples tipos, fija el límite de tipos en despliegue.
type
integerdefault
5hover.expandAlias
Expandir o no los alias. Por ejemplo, la expansión de ---@alias miTipo boolean|number aparece como boolean|number, caso contrarior, aparece como miTipo.
type
booleandefault
truehover.previewFields
Cuando se ubica el cursor para ver una tabla, fija el máximo numero de previstas para los campos.
type
integerdefault
10hover.viewNumber
Ubica el cursor para ver el contenido numérico (solo si el literal no es decimal).
type
booleandefault
truehover.viewString
Ubica el cursor bajo un string para ver su contenido (solo si el literal contiene un caracter de escape).
type
booleandefault
truehover.viewStringMax
Largo máximo de la información bajo el cursor para ver el contenido de un string.
type
integerdefault
1000language.completeAnnotation
(Solo en VSCode) Inserta automáticamente un "---@ " después de un quiebre de línea que sucede a una anotación.
type
booleandefault
truelanguage.fixIndent
(Solo en VSCode) Arregla la auto-indentación incorrecta, como aquella cuando los quiebres de línea ocurren dentro de un string que contengan la palabra "function".
type
booleandefault
truemisc.executablePath
Especifica la ruta del ejecutable en VSCode.
type
stringdefault
""misc.parameters
Parámetros de la línea de comando para iniciar el servidor de lenguage en VSCode.
type
Array<string>default
[]nameStyle.config
Configuración de estilo para nombres.
Revise la documentación del formateador
para aprender más sobre su uso.
type
Object<string, string | array>default
{}runtime.builtin
Ajuste de la habilitación de biblioteca interna provista. Puede deshabilitar (o redefinir) las bibliotecas inexistentes de acuerdo al ambiente de ejecución.
default: Indica que la biblioteca será habilitada o deshabilitada de acuerdo a la versión que se ejecuta.enable: Habilitadadisable: Deshabilitada
type
object<string, string>enum
"default""enable""disable"
default
{
"basic": "default",
"bit": "default",
"bit32": "default",
"builtin": "default",
"coroutine": "default",
"debug": "default",
"ffi": "default",
"io": "default",
"jit": "default",
"jit.profile": "default",
"jit.util": "default",
"math": "default",
"os": "default",
"package": "default",
"string": "default",
"string.buffer": "default",
"table": "default",
"table.clear": "default",
"table.new": "default",
"utf8": "default"
}runtime.enableLuaJITExtensions
Activa la sintaxis de extensión de LuaJIT (requiere que Lua.runtime.version esté establecido en LuaJIT).
Cada extensión también se puede habilitar individualmente mediante Lua.runtime.nonstandardSymbol.
type
booleandefault
falseruntime.fileEncoding
Codificación de archivo. La opción ansi solo está disponible en la plataforma Windows.
type
stringenum
"utf8""ansi""utf16le""utf16be"
default
"utf8"runtime.meta
Formato del nombre del directoria de los archivos meta.
type
stringdefault
"${version} ${language} ${encoding}"runtime.nonstandardSymbol
Soporte de símbolos no estándar. Asegúrese que la versión de Lua que se ejecuta soporte estos símbolos.
type
Array<string>enum
"//": Comentario de línea (estilo C)."/**/": Comentario de bloque (estilo C)."`": Cadena literal con comilla invertida."+=": Asignación compuesta de suma."-=": Asignación compuesta de resta."*=": Asignación compuesta de multiplicación."/=": Asignación compuesta de división."%=": Asignación compuesta de módulo."^=": Asignación compuesta de potencia."//=": Asignación compuesta de división entera."|=": Asignación compuesta OR bit a bit."&=": Asignación compuesta AND bit a bit."<<=": Asignación compuesta de desplazamiento a la izquierda.">>=": Asignación compuesta de desplazamiento a la derecha."||": O lógico (equivalente aor)."&&": Y lógico (equivalente aand)."!": NO lógico (equivalente anot)."!=": Diferente (equivalente a~=)."continue": Sentenciacontinue."|lambda|": Función corta con parámetros en pipe (|x| expr)."?.": Navegación segura (campo/método:a?.b/obj?.:method()/obj:method?.())."?.(": Llamada de navegación segura (f?.()/f?."str"/f?.{...}/f?.[[...]])."?.[": Índice de navegación segura (t?.[key])."??": Coalescencia nula (a ?? b; usa el lado derecho solo cuando el izquierdo es nil)."ternary": Operador ternario (cond ? x : y, asociativo a la derecha; llamadas a métodos prohibidas en la partex)."~>>": Desplazamiento aritmético a la derecha (a ~>> b, específico de LuaJIT;>>normal es lógico)."~>>=": Asignación compuesta de desplazamiento aritmético a la derecha (a ~>>= b)."..=": Asignación compuesta de concatenación de cadenas (a ..= b)."~=": Asignación compuesta XOR: solo en contexto de sentencia (p. ej.a ~= ben una línea); en expresiones sigue siendo el operador de desigualdad."const": Declaraciónconst(constante local de ámbito de bloque; no se puede reasignar ni redeclarar)."->": Flecha de función corta (x -> expr/|x| -> expr/|| -> expr/-> do ... end)."number_underscore": Guiones bajos en literales numéricos (p. ej.1_000,0x1_2,0b1_0)."?(": Llamada opcional sin punto (f?()equivale af?.(); entra en conflicto con el análisis del ternario (ternary), no recomendado juntos)."?[": Índice opcional sin punto (t?[1]equivale at?.[1]; entra en conflicto con el análisis del ternario (ternary), no recomendado juntos)."?:": Método seguro sin punto (obj?:get()equivale aobj?.:get()).
default
[]runtime.path
Cuando se ocupa un require, cómo se encuentra el archivo basado en el nombre de entrada.
Asignar esta configuración a ?/init.lua significa que cuando se ingresa require 'myfile' se busca en ${workspace}/myfile/init.lua desde los archivos cargados.
Si runtime.pathStrict es false, también se busca en ${workspace}/**/myfile/init.lua.
Si se desea cargar archivos fuera del espacio de trabajo, se debe asignar Lua.workspace.library primero.
type
Array<string>default
["?.lua","?/init.lua"]runtime.pathStrict
Cuando está habilitado, runtime.path sólo buscará en el primer nivel de directorios, vea la descripción de runtime.path.
type
booleandefault
falseruntime.plugin
Ruta de plugin. Revise la wiki para más información.
type
string | arraydefault
nullruntime.pluginArgs
Argumentos adicionals al plugin.
type
array | objectdefault
nullruntime.special
Las variables globales personalizadas son consideradas variables intrínsecas, y el servidor de lenguage proveerá un soporte especial.
El siguiente ejemplo muestra que 'include' es tratado como 'require'.
"Lua.runtime.special" : {
"include" : "require"
}type
Object<string, string>default
{}runtime.unicodeName
Se permiten los caracteres unicode en los nombres.
type
booleandefault
falseruntime.version
Versión de Lua que se ejecuta.
type
stringenum
"Lua 5.1""Lua 5.2""Lua 5.3""Lua 5.4""Lua 5.5""LuaJIT"
default
"Lua 5.4"semantic.annotation
Coloración de las anotaciones de tipo.
type
booleandefault
truesemantic.enable
Habilita la coloración semántica. Puede ser necesario asignar editor.semanticHighlighting.enabled a true para que tenga efecto.
type
booleandefault
truesemantic.keyword
Coloración semántica de palabras clave, literales y operadores. Se necesita habilitar esta característica si su editor no puede hacer coloración sintáctica.
type
booleandefault
falsesemantic.variable
Coloración semántica de variables, campos y parámetros.
type
booleandefault
truesignatureHelp.enable
Habilita la ayuda de firma.
type
booleandefault
truespell.dict
Palabras extra para el corrector ortográfico.
type
Array<string>default
[]type.castNumberToInteger
Se permite asignar el tipo "número" al tipo "entero".
type
booleandefault
truetype.checkTableShape
Chequea estrictamente la forma de la tabla.
type
booleandefault
falsetype.inferParamType
Cuando un tipo de parámetro no está anotado, se infiere su tipo de los lugares donde la función es llamada.
Cuando esta configuración es false, el tipo del parámetro any cuando no puede ser anotado.
type
booleandefault
falsetype.inferTableSize
Cantidad máxima de campos de tabla analizados durante la inferencia de tipos.
type
integerdefault
10type.maxUnionVariants
Missing description!!
type
integerdefault
0type.weakNilCheck
Cuando se revisa el tipo de un tipo de unión, los nil dentro son ignorados.
Cuando esta configuración es false, el tipo number|nil no puede ser asignado al tipo number. Solo se puede con true.
type
booleandefault
falsetype.weakUnionCheck
Una vez que un sub-tipo de un tipo de unión satisface la condición, el tipo de unión también satisface la condición.
Cuando esta configuración es false, el tipo number|boolean no puede ser asignado al tipo number. Solo se puede con true.
type
booleandefault
falsetypeFormat.config
Configura el comportamiento del formateo mientras se tipea código Lua.
type
object<string, string>default
{
/*
Controla si se completa automáticamente con `end` en las posiciones correspondientes.
*/
"auto_complete_end": "true",
/*
Controla si se agrega automáticamente un separador al final de la declaración de una tabla.
*/
"auto_complete_table_sep": "true",
/*
Controla si una línea se formatea
*/
"format_line": "true"
}window.progressBar
Muestra la barra de progreso en la barra de estado.
type
booleandefault
truewindow.statusBar
Muestra el estado de la extensión en la barra de estado.
type
booleandefault
trueworkspace.checkThirdParty
Detección y adaptación automática de bibliotecas externas. Actualmente soportadas:
- OpenResty
- Cocos4.0
- LÖVE
- LÖVR
- skynet
- Jass
type
string | booleandefault
nullworkspace.ignoreDir
Directorios y archivos ignorados (se usa la misma gramática que en .gitignore)
type
Array<string>default
[".vscode"]workspace.ignoreSubmodules
Ignora submódulos.
type
booleandefault
trueworkspace.library
Además de los del espacio de trabajo actual, se cargan archivos de estos directorios. Los archivos en estos directorios serán tratados como bibliotecas con código externo y algunas características (como renombrar campos) no modificarán estos archivos.
type
Array<string>default
[]workspace.maxPreload
Máxima pre-carga de archivos.
type
integerdefault
5000workspace.preloadFileSize
Cuando se pre-carga, se omiten los archivos más grandes que este valor (en KB).
type
integerdefault
500workspace.useGitIgnore
Ignora los archivos enlistados en gitignore .
type
booleandefault
trueworkspace.userThirdParty
Rutas archivos de configuración para bibliotecas externas privadas. Revise el archivo de configuración provisto.
type
Array<string>default
[]Doc Ja Jp Config (`doc/ja-jp/config.md`)
addonManager.enable
アドオンマネージャーを有効にするかどうか。
type
booleandefault
trueaddonManager.repositoryBranch
アドオンマネージャーが使用するgitブランチを指定します。
type
stringdefault
""addonManager.repositoryPath
アドオンマネージャーが使用するgitパスを指定します。
type
stringdefault
""addonRepositoryPath
アドオンのリポジトリパスを指定します(アドオンマネージャーとは無関係です)。
type
stringdefault
""codeLens.enable
コードレンズを有効にします。
type
booleandefault
falsecompletion.autoRequire
入力がファイル名のように見える場合、自動的にこのファイルをrequireします。
type
booleandefault
truecompletion.callSnippet
関数呼び出しスニペットを表示します。
type
stringenum
"Disable": 関数名のみを表示します。"Both": 関数名と呼び出しスニペットを表示します。"Replace": 呼び出しスニペットのみを表示します。
default
"Disable"completion.displayContext
提案の関連コードスニペットをプレビューすることで、提案の使用法を理解しやすくなります。設定された数値は、コードフラグメント内で切り取られる行数を示します。0に設定すると、この機能を無効にできます。
type
integerdefault
0completion.enable
補完を有効にします。
type
booleandefault
truecompletion.keywordSnippet
キーワード構文スニペットを表示します。
type
stringenum
"Disable": キーワードのみを表示します。"Both": キーワードと構文スニペットを表示します。"Replace": 構文スニペットのみを表示します。
default
"Replace"completion.maxSuggestCount
補完用に分析するフィールドの最大数。オブジェクトがこの制限より多くのフィールドを持つ場合、補完が表示されるにはより具体的な入力が必要になります。
type
integerdefault
100completion.postfix
後置提案をトリガーするために使用されるシンボル。
type
stringdefault
"@"completion.requireSeparator
require時に使用される区切り文字。
type
stringdefault
"."completion.showParams
補完リストにパラメータを表示します。関数に複数の定義がある場合、個別に表示されます。
type
booleandefault
truecompletion.showWord
提案内にコンテキストワードを表示します。
type
stringenum
"Enable": 常に提案内にコンテキストワードを表示します。"Fallback": セマンティックスに基づく提案を提供できない場合のみ、コンテキストワードを表示します。"Disable": コンテキストワードを表示しません。
default
"Fallback"completion.workspaceWord
表示されるコンテキストワードにワークスペース内の他のファイルの内容を含めるかどうか。
type
booleandefault
truediagnostics.disable
無効化する診断(ホバーの括弧内に表示されるコードを使用)。
type
Array<string>enum
"action-after-return":return文の後のコード"ambiguity-1": 演算子優先順位のあいまいさ診断を有効にします。例:num or 0 + 1には(num or 0) + 1を推奨します。"ambiguous-syntax": 曖昧な構文"args-after-dots":...の後の引数"assign-const-global": const グローバル変数への代入"assign-type-mismatch": 値の型が代入先の型と一致しない代入の診断を有効にします。"await-in-sync": 同期関数内で非同期関数を呼び出す場合の診断を有効にします。"block-after-else":elseの後のブロック"break-outside": ループの外でbreakを使用"cast-local-type": ローカル変数のキャスト先の型が定義と一致しない場合の診断を有効にします。"cast-type-mismatch": キャスト先の型が元の型と一致しない場合の診断を有効にします。"circle-doc-class":@class継承の循環"close-non-object": オブジェクト以外を閉じようとする場合の診断を有効にします。"code-after-break": ループ内でbreakの後に配置されたコードの診断を有効にします。"codestyle-check": スタイルに合わない行の診断を有効にします。"count-down-loop": 減少しないため上限に到達しないforループの診断を有効にします。"declare-const": const 定数の再宣言"deprecated": 非推奨APIを強調する診断を有効にします。"different-requires": 異なるパスで同じファイルをrequireする場合の診断を有効にします。"discard-returns":---@nodiscardが付いた関数の戻り値を無視した呼び出しの診断を有効にします。"doc-field-no-class": クラス注釈なしでフィールド注釈がある場合の診断を有効にします。"duplicate-doc-alias": エイリアス注釈名の重複診断を有効にします。"duplicate-doc-field": フィールド注釈名の重複診断を有効にします。"duplicate-doc-param": パラメータ注釈名の重複診断を有効にします。"duplicate-index": 重複したテーブルインデックスの診断を有効にします。"duplicate-set-field": クラス内で同じフィールドを複数回設定する診断を有効にします。"empty-block": 空のコードブロック診断を有効にします。"env-is-global":_ENVをグローバル変数として使用"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-close-attribute": グローバル変数への close 属性"global-element": グローバル要素に関する警告診断を有効にします。"global-in-nil-env": グローバル変数を使用できない(_ENVがnil)場合の診断を有効にします。"incomplete-signature-doc": 関数の @param または @return 注釈が不完全な場合の診断。"index-in-func-name": 関数名にインデックスが含まれる"inject-field": オブジェクトへのフィールド注入"invisible": 不可視フィールドへのアクセス診断を有効にします。"jump-local-scope": ローカル変数のスコープにジャンプ"keyword": キーワードの不適切な使用"local-limit": ローカル変数の数が上限を超える"lowercase-global": 先頭小文字のグローバル変数定義の診断を有効にします。"lua-doc-miss-sign": LuaDoc コメントに記号が不足"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": 戻り注釈があるのにreturn文がない場合の診断を有効にします。"missing-return-value": 戻り値を宣言しているのに値を返さないreturn文の診断を有効にします。"multi-close": 多重 close 操作"name-style-check": 名前スタイルの診断を有効にします。"need-check-nil": 以前にnilまたは任意型が代入された変数を使用する際のnilチェック診断を有効にします。"need-paren": 括弧が必要"nesting-long-mark": ネストした長いコメントマーカー"newfield-call": newfield 呼び出しの診断を有効にします。テーブル定義中に関数呼び出しの括弧が次の行に現れる場合に発生します。"newline-call": 改行呼び出しの診断を有効にします。(で始まる行が前の行への関数呼び出しとして構文解析される場合に発生します。"no-unknown": 型を推論できない場合の診断を有効にします。"no-visible-label": 見えないラベル"not-yieldable": 許可されない場所でのcoroutine.yield()呼び出しの診断を有効にします。"param-type-mismatch": 注釈の型と一致しない引数を渡した場合の診断を有効にします。"redefined-label": 再定義されたラベル"redefined-local": ローカル変数の再定義診断を有効にします。"redundant-parameter": 冗長な関数パラメータの診断を有効にします。"redundant-return": 不要なreturn文の診断を有効にします。"redundant-return-value": 注釈にない追加の戻り値を返すreturn文の診断を有効にします。"redundant-value": 代入時の余分な値の診断を有効にします。値の数が変数の数を超える場合に発生します。"return-type-mismatch": 戻り値の型が注釈と一致しない場合の診断を有効にします。"set-const": const 定数への代入"spell-check": 文字列内のタイポ診断を有効にします。"trailing-space": 行末の余分な空白の診断を有効にします。"unbalanced-assignments": 多重代入で一部の変数が値を得られない場合の診断を有効にします(例:local x,y = 1)。"undefined-doc-class": 未定義クラスを参照するクラス注釈の診断を有効にします。"undefined-doc-name": 未定義の型またはエイリアスを参照する注釈の診断を有効にします。"undefined-doc-param": 関数定義に存在しないパラメータへの注釈の診断を有効にします。"undefined-env-child": 未定義環境変数の診断を有効にします。_ENVを新しいリテラルテーブルに設定した結果、使用中のグローバルが存在しない場合に発生します。"undefined-field": 未定義フィールドを参照する場合の診断を有効にします。"undefined-global": 未定義のグローバル変数の診断を有効にします。"unexpect-dots""unexpect-efunc-name""unexpect-gfunc-name""unexpect-lfunc-name""unexpect-symbol""unicode-name": Unicode 名"unknown-attribute": 不明な属性"unknown-cast-variable": 未定義変数へのキャスト診断を有効にします。"unknown-diag-code": 不明な診断コードが入力された場合の診断を有効にします。"unknown-operator": 不明な演算子の診断を有効にします。"unknown-symbol": 不明な記号"unreachable-code": 到達不能コードの診断を有効にします。"unsupport-named-vararg": サポートされない名前付き可変引数"unsupport-symbol""unused-function": 未使用の関数の診断を有効にします。"unused-label": 未使用ラベルの診断を有効にします。"unused-local": 未使用のローカル変数の診断を有効にします。"unused-vararg": 未使用の可変引数の診断を有効にします。"variable-not-declared": 未宣言の変数の使用
default
[]diagnostics.enable
診断を有効にします。
type
booleandefault
truediagnostics.enableScheme
Missing description!!
type
Array<string>default
["file"]diagnostics.globals
定義済みのグローバル変数。
type
Array<string>default
[]diagnostics.globalsRegex
正規表現で定義済みのグローバル変数を検索します。
type
Array<string>default
[]diagnostics.groupFileStatus
グループ内の診断対象ファイル状態を変更します。
- Opened: 開いているファイルのみを診断
- Any: すべてのファイルを診断
- None: この診断を無効化
Fallback は、このグループ内の診断が個別に diagnostics.neededFileStatus によって制御されることを意味します。
その他の設定は、末尾に ! が付いていない個別の設定を上書きします。
type
object<string, string>enum
"Any""Opened""None""Fallback"
default
/* Detailed source-code truncated for AI context efficiency. */diagnostics.groupSeverity
グループ内の診断の重大度を変更します。Fallback は、このグループ内の診断が個別に diagnostics.severity によって制御されることを意味します。
その他の設定は、末尾に ! が付いていない個別の設定を上書きします。
type
object<string, string>enum
"Error""Warning""Information""Hint""Fallback"
default
/* Detailed source-code truncated for AI context efficiency. */diagnostics.ignoredFiles
無視されているファイルをどのように診断するか。
type
stringenum
"Enable": 常にこれらのファイルを診断します。"Opened": これらのファイルが開かれているときのみ診断します。"Disable": これらのファイルは診断しません。
default
"Opened"diagnostics.libraryFiles
Lua.workspace.library 経由で読み込まれたファイルをどのように診断するか。
type
stringenum
"Enable": 常にこれらのファイルを診断します。"Opened": これらのファイルが開かれているときのみ診断します。"Disable": これらのファイルは診断しません。
default
"Opened"diagnostics.neededFileStatus
- Opened: 開いているファイルのみを診断
- Any: すべてのファイルを診断
- None: この診断を無効化
末尾に ! を付けると、グループ設定 diagnostics.groupFileStatus を上書きします。
type
object<string, string>enum
"Any""Opened""None""Any!""Opened!""None!"
default
/* Detailed source-code truncated for AI context efficiency. */diagnostics.severity
診断の重大度を変更します。
末尾に ! を付けると、グループ設定 diagnostics.groupSeverity を上書きします。
type
object<string, string>enum
"Error""Warning""Information""Hint""Error!""Warning!""Information!""Hint!"
default
/* Detailed source-code truncated for AI context efficiency. */diagnostics.unusedLocalExclude
変数名が次のパターンに一致する場合、unused-local を診断しません。
type
Array<string>default
[]diagnostics.workspaceDelay
ワークスペース診断の待ち時間(ミリ秒)。
type
integerdefault
3000diagnostics.workspaceEvent
ワークスペース診断をトリガーするタイミングを設定します。
type
stringenum
"OnChange": ファイルが変更されたときにワークスペース診断をトリガーします。"OnSave": ファイルが保存されたときにワークスペース診断をトリガーします。"None": ワークスペース診断を無効にします。
default
"OnSave"diagnostics.workspaceRate
ワークスペース診断の実行レート(%)。この値を下げると CPU 使用率は低下しますが、ワークスペース診断の速度も低下します。現在編集中のファイルの診断は常に全速で行われ、この設定の影響を受けません。
type
integerdefault
100doc.packageName
特定のフィールド名をパッケージとして扱います。例: m_* は XXX.m_id や XXX.m_type がパッケージであり、定義されているファイル内でのみアクセス可能です。
type
Array<string>default
[]doc.privateName
特定のフィールド名をプライベートとして扱います。例: m_* は XXX.m_id や XXX.m_type がプライベートであり、定義されているクラス内でのみアクセス可能です。
type
Array<string>default
[]doc.protectedName
特定のフィールド名をプロテクトとして扱います。例: m_* は XXX.m_id や XXX.m_type がプロテクトであり、定義クラスおよびそのサブクラスでのみアクセス可能です。
type
Array<string>default
[]doc.regengine
ドキュメントスコープ名のマッチに使用する正規表現エンジン。
type
stringenum
"glob": デフォルトの軽量パターン構文。"lua": Luaスタイルの正規表現(フル機能)。
default
"glob"docScriptPath
ドキュメントスコープ名のマッチに使用する正規表現エンジン。
type
stringdefault
""format.defaultConfig
デフォルトのフォーマット設定。ワークスペース内の.editorconfigファイルより優先度が低くなります。
formatter docs を参照してください。
type
Object<string, string>default
{}format.enable
コードフォーマッタを有効にします。
type
booleandefault
truehint.arrayIndex
テーブル構築時に配列インデックスのヒントを表示します。
type
stringenum
"Enable": すべてのテーブルでヒントを表示します。"Auto": テーブルが3要素を超える、または混在テーブルの場合のみヒントを表示します。"Disable": 配列インデックスのヒントを無効にします。
default
"Auto"hint.await
呼び出す関数に ---@async が付いている場合、呼び出し箇所で await を提案します。
type
booleandefault
truehint.awaitPropagate
await の伝播を有効にします。---@async が付いた関数を呼び出す関数は、自動的に ---@async とマークされます。
type
booleandefault
falsehint.enable
インレイヒントを有効にします。
type
booleandefault
falsehint.paramName
関数呼び出し時にパラメータ名のヒントを表示します。
type
stringenum
"All": すべての型のパラメータを表示します。"Literal": リテラル型のパラメータのみを表示します。"Disable": パラメータヒントを無効にします。
default
"All"hint.paramType
関数のパラメータに型ヒントを表示します。
type
booleandefault
truehint.semicolon
文末にセミコロンがない場合に仮想セミコロンを表示します。
type
stringenum
"All": すべての文で仮想セミコロンを表示します。"SameLine": 同じ行に2つの文がある場合、その間にセミコロンを表示します。"Disable": 仮想セミコロンを無効にします。
default
"SameLine"hint.setType
代入操作で型ヒントを表示します。
type
booleandefault
falsehover.enable
ホバーを有効にします。
type
booleandefault
truehover.enumsLimit
値が複数の型に対応する場合、表示される型の数を制限します。
type
integerdefault
5hover.expandAlias
エイリアスを展開するかどうか。たとえば、---@alias myType boolean|numberを展開するとboolean|numberとして表示され、そうでない場合はmyTypeとして表示されます。
type
booleandefault
truehover.previewFields
テーブルをホバーで表示する際、フィールドのプレビューの最大数を制限します。
type
integerdefault
10hover.viewNumber
ホバーで数値内容を表示します(リテラルが10進数でない場合のみ)。
type
booleandefault
truehover.viewString
ホバーで文字列の内容を表示します(リテラルにエスケープ文字が含まれている場合のみ)。
type
booleandefault
truehover.viewStringMax
ホバーで表示する文字列内容の最大長。
type
integerdefault
1000language.completeAnnotation
(VSCodeのみ) 注釈行の改行後に自動で "---@ " を挿入します。
type
booleandefault
truelanguage.fixIndent
(VSCodeのみ) 誤った自動インデントを修正します。例えば、"function" を含む文字列内で改行したときの不正なインデントなど。
type
booleandefault
truemisc.executablePath
VSCodeでの実行可能ファイルのパスを指定します。
type
stringdefault
""misc.parameters
VSCode で言語サーバーを起動するときのコマンドライン引数。
type
Array<string>default
[]nameStyle.config
命名スタイル設定。
formatter docs を参照してください。
type
Object<string, string | array>default
{}runtime.builtin
組み込みライブラリの有効状態を調整します。実際のランタイム環境に応じて、存在しないライブラリを無効化(または再定義)できます。
default: ランタイムバージョンに応じてライブラリを有効/無効にしますenable: 常に有効disable: 常に無効
type
object<string, string>enum
"default""enable""disable"
default
{
"basic": "default",
"bit": "default",
"bit32": "default",
"builtin": "default",
"coroutine": "default",
"debug": "default",
"ffi": "default",
"io": "default",
"jit": "default",
"jit.profile": "default",
"jit.util": "default",
"math": "default",
"os": "default",
"package": "default",
"string": "default",
"string.buffer": "default",
"table": "default",
"table.clear": "default",
"table.new": "default",
"utf8": "default"
}runtime.enableLuaJITExtensions
LuaJIT 拡張構文を有効にします(Lua.runtime.version を LuaJIT に設定する必要があります)。
各拡張構文は Lua.runtime.nonstandardSymbol で個別に有効化することもできます。
type
booleandefault
falseruntime.fileEncoding
ファイルのエンコーディング。ansi オプションは Windows プラットフォームでのみ利用可能です。
type
stringenum
"utf8""ansi""utf16le""utf16be"
default
"utf8"runtime.meta
メタファイルのディレクトリ名の形式。
type
stringdefault
"${version} ${language} ${encoding}"runtime.nonstandardSymbol
非標準の記号をサポートします。ランタイム環境がこれらの記号をサポートしていることを確認してください。
type
Array<string>enum
"//": 行コメント(C スタイル)。"/**/": ブロックコメント(C スタイル)。"`": バッククォート文字列リテラル。"+=": 加算複合代入。"-=": 減算複合代入。"*=": 乗算複合代入。"/=": 除算複合代入。"%=": 剰余複合代入。"^=": べき乗複合代入。"//=": 床除算複合代入。"|=": ビット単位 OR 複合代入。"&=": ビット単位 AND 複合代入。"<<=": 左シフト複合代入。">>=": 右シフト複合代入。"||": 論理 OR(orと同等)。"&&": 論理 AND(andと同等)。"!": 論理 NOT(notと同等)。"!=": 等しくない(~=と同等)。"continue":continue文。"|lambda|": パイプ引数の短い関数(|x| expr)。"?.": 安全ナビゲーション(フィールド/メソッド:a?.b/obj?.:method()/obj:method?.())。"?.(": 安全ナビゲーション呼び出し(f?.()/f?."str"/f?.{...}/f?.[[...]])。"?.[": 安全ナビゲーションインデックス(t?.[key])。"??": nil 合体(a ?? b。左辺が nil の場合のみ右辺を返す)。"ternary": 三項演算子(cond ? x : y、右結合。x部分ではメソッド呼び出し禁止)。"~>>": 算術右シフト(a ~>> b。LuaJIT 固有。通常の>>は論理右シフト)。"~>>=": 算術右シフト複合代入(a ~>>= b)。"..=": 文字列連結複合代入(a ..= b)。"~=": XOR 複合代入:文コンテキスト(例:a ~= bが単独の行)でのみ有効。式の中では「等しくない」のまま。"const":const宣言(ブロックスコープのローカル定数。再代入・再宣言不可)。"->": 短い関数の矢印(x -> expr/|x| -> expr/|| -> expr/-> do ... end)。"number_underscore": 数値リテラルのアンダースコア(例:1_000、0x1_2、0b1_0)。"?(": ドットなしオプショナル呼び出し(f?()はf?.()と同等。三項(ternary)の解析と競合するため併用非推奨)。"?[": ドットなしオプショナルインデックス(t?[1]はt?.[1]と同等。三項(ternary)の解析と競合するため併用非推奨)。"?:": ドットなし安全メソッド(obj?:get()はobj?.:get()と同等)。
default
[]runtime.path
require を使用する際、入力名に基づいてファイルを探す方法。
この設定を ?/init.lua にすると、require 'myfile' と入力したとき、読み込まれたファイルから ${workspace}/myfile/init.lua が検索されます。runtime.pathStrict が false の場合、${workspace}/**/myfile/init.lua も検索対象になります。
ワークスペース外のファイルを読み込みたい場合は、先に Lua.workspace.library を設定する必要があります。
type
Array<string>default
["?.lua","?/init.lua"]runtime.pathStrict
有効にすると、runtime.path は最上位のディレクトリ階層のみを検索します。詳細は runtime.path の説明を参照してください。
type
booleandefault
falseruntime.plugin
プラグインのパス。詳細は wiki を参照してください。
type
string | arraydefault
nullruntime.pluginArgs
プラグインに渡す追加引数。
type
array | objectdefault
nullruntime.special
カスタムのグローバル変数を一部の特別な組み込み変数として扱い、言語サーバーが特別なサポートを提供します。
以下の例では、include を require として扱います。
"Lua.runtime.special" : {
"include" : "require"
}type
Object<string, string>default
{}runtime.unicodeName
名前に Unicode 文字を使用できるようにします。
type
booleandefault
falseruntime.version
Lua のランタイムバージョン。
type
stringenum
"Lua 5.1""Lua 5.2""Lua 5.3""Lua 5.4""Lua 5.5""LuaJIT"
default
"Lua 5.4"semantic.annotation
型注釈のセマンティックカラーリング。
type
booleandefault
truesemantic.enable
セマンティックカラーを有効にします。効果を発揮するためにeditor.semanticHighlighting.enabledをtrueに設定する必要があるかもしれません。
type
booleandefault
truesemantic.keyword
キーワード/リテラル/演算子のセマンティックカラーリング。エディタが構文カラーリングをできない場合のみ、この機能を有効にする必要があります。
type
booleandefault
falsesemantic.variable
変数/フィールド/パラメータのセマンティックカラーリング。
type
booleandefault
truesignatureHelp.enable
シグネチャヘルプを有効にします。
type
booleandefault
truespell.dict
スペルチェック用のカスタム単語。
type
Array<string>default
[]type.castNumberToInteger
number 型を integer 型に代入することを許可します。
type
booleandefault
truetype.checkTableShape
テーブルの形状を厳密にチェックします。
type
booleandefault
falsetype.inferParamType
パラメータ型が注釈されていない場合、関数の呼び出し箇所から推論します。
この設定がfalseの場合、注釈がないパラメータの型はanyになります。
type
booleandefault
falsetype.inferTableSize
型推論時に解析するテーブルフィールドの最大数。
type
integerdefault
10type.maxUnionVariants
Missing description!!
type
integerdefault
0type.weakNilCheck
共用体型のチェック時に、その中のnilを無視します。
この設定がfalseの場合、number|nil型はnumber型に代入できません。trueの場合は可能です。
type
booleandefault
falsetype.weakUnionCheck
共用体型のどれか1つのサブタイプが条件を満たせば、共用体全体も条件を満たします。
この設定がfalseの場合、number|boolean型はnumber型に代入できません。trueの場合は可能です。
type
booleandefault
falsetypeFormat.config
Luaコード入力中のフォーマット動作を設定します。
type
object<string, string>default
{
/*
適切な位置で`end`を自動補完するかを制御します。
*/
"auto_complete_end": "true",
/*
テーブル宣言末尾にセパレータを自動付与するかを制御します。
*/
"auto_complete_table_sep": "true",
/*
行を自動整形するかどうかを制御します。
*/
"format_line": "true"
}window.progressBar
ステータスバーに進行状況バーを表示します。
type
booleandefault
truewindow.statusBar
ステータスバーに拡張機能のステータスを表示します。
type
booleandefault
trueworkspace.checkThirdParty
サードパーティライブラリの自動検出と適応。現在サポートされているライブラリ:
- OpenResty
- Cocos4.0
- LÖVE
- LÖVR
- skynet
- Jass
type
string | booleandefault
nullworkspace.ignoreDir
無視するファイルとディレクトリ(.gitignore の構文を使用)。
type
Array<string>default
[".vscode"]workspace.ignoreSubmodules
サブモジュールを無視します。
type
booleandefault
trueworkspace.library
現在のワークスペースに加えて、どのディレクトリからファイルをロードするか。これらのディレクトリ内のファイルは外部提供のコードライブラリとして扱われ、一部の機能(フィールド名の変更など)はこれらのファイルを変更しません。
type
Array<string>default
[]workspace.maxPreload
プリロードする最大ファイル数。
type
integerdefault
5000workspace.preloadFileSize
プリロード時にこの値(KB)より大きいファイルをスキップします。
type
integerdefault
500workspace.useGitIgnore
.gitignore に記載されたファイルを無視します。
type
booleandefault
trueworkspace.userThirdParty
プライベートサードパーティライブラリの設定ファイルパスをここに追加してください。組み込みの設定ファイルパスを参照してください。
type
Array<string>default
[]Doc Pt Br Config (`doc/pt-br/config.md`)
addonManager.enable
Habilita ou desabilita o gerenciador de add-ons.
type
booleandefault
trueaddonManager.repositoryBranch
Define o branch Git usado pelo gerenciador de add-ons.
type
stringdefault
""addonManager.repositoryPath
Define o caminho Git usado pelo gerenciador de add-ons.
type
stringdefault
""addonRepositoryPath
Define o caminho do repositório de add-ons (não relacionado ao gerenciador de add-ons).
type
stringdefault
""codeLens.enable
Habilitar code lens.
type
booleandefault
falsecompletion.autoRequire
Quando a entrada se parece com um nome de arquivo, fazer require desse arquivo automaticamente.
type
booleandefault
truecompletion.callSnippet
Mostra snippets de chamada de função.
type
stringenum
"Disable": Mostra apenas onome da função."Both": Mostra onome da funçãoe otrecho de chamada."Replace": Mostra apenas otrecho de chamada.
default
"Disable"completion.displayContext
Pré-visualizar o trecho de código relevante da sugestão pode ajudar a entender seu uso. O número define quantas linhas são interceptadas no fragmento; definir como 0 desabilita este recurso.
type
integerdefault
0completion.enable
Habilita autocompletar.
type
booleandefault
truecompletion.keywordSnippet
Mostra snippets de sintaxe de palavras-chave.
type
stringenum
"Disable": Mostra apenas apalavra-chave."Both": Mostra apalavra-chavee otrecho de sintaxe."Replace": Mostra apenas otrecho de sintaxe.
default
"Replace"completion.maxSuggestCount
Número máximo de campos analisados para autocompletar. Se um objeto tiver mais campos que esse limite, serão necessárias entradas mais específicas para que as sugestões apareçam.
type
integerdefault
100completion.postfix
Símbolo usado para acionar sugestões de pós-fixo.
type
stringdefault
"@"completion.requireFunction
The function to insert when an auto-require is triggered.
type
stringdefault
"require"completion.requireSeparator
Separador usado em require.
type
stringdefault
"."completion.showParams
Mostrar parâmetros na lista de conclusão. Se a função tiver várias definições, elas serão exibidas separadamente.
type
booleandefault
truecompletion.showWord
Mostrar palavras de contexto nas sugestões.
type
stringenum
"Enable": Sempre mostrar palavras de contexto nas sugestões."Fallback": Mostrar palavras de contexto somente quando não houver sugestões baseadas em semântica."Disable": Não mostrar palavras de contexto.
default
"Fallback"completion.workspaceWord
Define se as palavras de contexto exibidas incluem conteúdo de outros arquivos da workspace.
type
booleandefault
truediagnostics.disable
Diagnósticos desabilitados (use o código nos colchetes do hover).
type
Array<string>enum
"action-after-return": Código após uma instruçãoreturn"ambiguity-1": Ambiguidade de precedência, por exemplonum or 0 + 1; supõe-se que o esperado seja(num or 0) + 1"ambiguous-syntax": Sintaxe ambígua"args-after-dots": Argumentos após..."assign-const-global": Atribuindo a uma variável global const"assign-type-mismatch": Habilita diagnóstico para atribuições em que o tipo do valor não corresponde ao tipo da variável alvo."await-in-sync": Habilita diagnóstico para chamadas de funções assíncronas dentro de uma função síncrona."block-after-else": Bloco apóselse"break-outside": Usandobreakfora de um loop"cast-local-type": Habilita diagnóstico para coerções de variáveis locais em que o tipo alvo não corresponde ao tipo definido."cast-type-mismatch": Habilita diagnóstico para coerções em que o tipo alvo não corresponde ao tipo inicial."circle-doc-class": Herança circular de@class"close-non-object": Habilita diagnóstico para tentativas de fechar uma variável que não é objeto."code-after-break": Habilita diagnóstico para código após umbreakem um loop."codestyle-check": Habilita diagnóstico para linhas que violam o estilo de código."count-down-loop": Habilita diagnóstico para laçosfordecrescentes que nunca atingem o limite porque são incrementados."declare-const": Redeclarando uma constante const"deprecated": Habilita diagnóstico para APIs obsoletas."different-requires": Habilita diagnóstico para arquivos exigidos por dois caminhos diferentes."discard-returns": Habilita diagnóstico para chamadas de funções anotadas com---@nodiscardquando os retornos são ignorados."doc-field-no-class": Habilita diagnóstico para anotações de campo sem anotação de classe correspondente."duplicate-doc-alias": Habilita diagnóstico para nome de alias anotado duplicado."duplicate-doc-field": Habilita diagnóstico para nome de campo anotado duplicado."duplicate-doc-param": Habilita diagnóstico para nome de parâmetro anotado duplicado."duplicate-index": Índice duplicado em tabela literal"duplicate-set-field": Habilita diagnóstico para definir o mesmo campo em uma classe mais de uma vez."empty-block": Bloco vazio"env-is-global":_ENVusado como variável global"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": Expressão usada na posição de instrução"global-close-attribute": Atributo close em variável global"global-element": Habilita diagnóstico para avisar sobre elementos globais."global-in-nil-env": Não é possível usar variáveis globais (_ENVfoi definido comonil)"incomplete-signature-doc": Anotações @param ou @return incompletas para funções."index-in-func-name": Índice em nome de função"inject-field": Injetando um campo em um objeto"invisible": Habilita diagnóstico para acessos a campos invisíveis."jump-local-scope": Pulando para um escopo de variável local"keyword": Uso impróprio de palavra-chave"local-limit": Muitas variáveis locais"lowercase-global": Definição de variável global com inicial minúscula"lua-doc-miss-sign": Comentário LuaDoc sem sinal"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": Literal numérico malformado"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": Campos ausentes"missing-global-doc": Faltam anotações para globais! Funções globais devem ter comentário e anotações para todos os parâmetros e retornos."missing-local-export-doc": Faltam anotações para locais exportados! Funções locais exportadas devem ter comentário e anotações para todos os parâmetros e retornos."missing-parameter": Habilita diagnóstico para chamadas de função com menos argumentos que os parâmetros anotados."missing-return": Habilita diagnóstico para funções com anotação de retorno mas sem instrução return."missing-return-value": Habilita diagnóstico para retornos sem valores embora a função declare valores de retorno."multi-close": Múltiplas operações close"name-style-check": Habilita diagnóstico para estilo de nomes."need-check-nil": Habilita diagnóstico para uso de variável após ela recebernilou valor opcional."need-paren": Parênteses necessários"nesting-long-mark": Marcadores de comentário longo aninhados"newfield-call": Em uma tabela literal, faltou um separador entre duas linhas; foi interpretado como uma operação de índice"newline-call": Nova linha iniciando com(é analisada como chamada da linha anterior"no-unknown": Habilita diagnóstico para casos em que o tipo não pode ser inferido."no-visible-label": Rótulo invisível"not-yieldable": Habilita diagnóstico para chamadas decoroutine.yield()quando não permitido."param-type-mismatch": Habilita diagnóstico para chamadas onde o tipo do parâmetro fornecido não corresponde à definição anotada."redefined-label": Rótulo redefinido"redefined-local": Variável local redefinida"redundant-parameter": Chamada de função com parâmetros em excesso"redundant-return": Habilita diagnóstico para retornos desnecessários porque a função já terminaria."redundant-return-value": Habilita diagnóstico para retornos que entregam valor extra não especificado na anotação."redundant-value": Em uma atribuição, há mais valores que variáveis-alvo"return-type-mismatch": Habilita diagnóstico para retornos cujo tipo não corresponde ao tipo declarado."set-const": Atribuindo a uma constante const"spell-check": Habilita diagnóstico para erros ortográficos em strings."trailing-space": Espaços à direita"unbalanced-assignments": Habilita diagnóstico em múltiplas atribuições se nem todas as variáveis recebem valor (ex.:local x,y = 1)."undefined-doc-class": Habilita diagnóstico para anotações de classe que fazem referência a classe indefinida."undefined-doc-name": Habilita diagnóstico para anotações de tipo que referenciam tipo ou alias indefinido."undefined-doc-param": Habilita diagnóstico para anotações de parâmetro sem declaração correspondente na função."undefined-env-child":_ENVfoi definido como nova tabela literal, mas a variável global acessada não está nela"undefined-field": Habilita diagnóstico para leitura de campo indefinido de uma variável."undefined-global": Variável global não definida"unexpect-dots""unexpect-efunc-name""unexpect-gfunc-name""unexpect-lfunc-name""unexpect-symbol""unicode-name": Nome Unicode"unknown-attribute": Atributo desconhecido"unknown-cast-variable": Habilita diagnóstico para coerções de variáveis indefinidas."unknown-diag-code": Habilita diagnóstico quando um código de diagnóstico desconhecido é informado."unknown-operator": Habilita diagnóstico para operadores desconhecidos."unknown-symbol": Símbolo desconhecido"unreachable-code": Habilita diagnóstico para código inalcançável."unsupport-named-vararg": Vararg nomeado não suportado"unsupport-symbol""unused-function": Função não utilizada"unused-label": Rótulo não utilizado"unused-local": Variável local não utilizada"unused-vararg": Parâmetro vararg não utilizado"variable-not-declared": Usando uma variável não declarada
default
[]diagnostics.enable
Habilita diagnósticos.
type
booleandefault
truediagnostics.enableScheme
Missing description!!
type
Array<string>default
["file"]diagnostics.globals
Variáveis globais definidas.
type
Array<string>default
[]diagnostics.globalsRegex
Encontra variáveis globais definidas usando regex.
type
Array<string>default
[]diagnostics.groupFileStatus
Modifica o status de arquivo necessário para diagnóstico em um grupo.
- Opened: diagnosticar apenas arquivos abertos
- Any: diagnosticar todos os arquivos
- None: desabilitar este diagnóstico
Fallback significa que os diagnósticos deste grupo são controlados por diagnostics.neededFileStatus separadamente.
Outras configurações sobrescreverão configurações individuais sem terminar com !.
type
object<string, string>enum
"Any""Opened""None""Fallback"
default
/* Detailed source-code truncated for AI context efficiency. */diagnostics.groupSeverity
Modifica a gravidade do diagnóstico em um grupo.Fallback significa que os diagnósticos deste grupo são controlados por diagnostics.severity separadamente.
Outras configurações sobrescreverão configurações individuais sem terminar com !.
type
object<string, string>enum
"Error""Warning""Information""Hint""Fallback"
default
/* Detailed source-code truncated for AI context efficiency. */diagnostics.ignoredFiles
Como diagnosticar arquivos ignorados.
type
stringenum
"Enable": Sempre diagnosticar esses arquivos."Opened": Diagnosticar esses arquivos apenas quando estiverem abertos."Disable": Esses arquivos não são diagnosticados.
default
"Opened"diagnostics.libraryFiles
Como diagnosticar arquivos carregados via Lua.workspace.library.
type
stringenum
"Enable": Sempre diagnosticar esses arquivos."Opened": Diagnosticar esses arquivos apenas quando estiverem abertos."Disable": Esses arquivos não são diagnosticados.
default
"Opened"diagnostics.neededFileStatus
- Opened: diagnosticar apenas arquivos abertos
- Any: diagnosticar todos os arquivos
- None: desabilitar este diagnóstico
Terminar com ! significa sobrescrever a configuração de grupo diagnostics.groupFileStatus.
type
object<string, string>enum
"Any""Opened""None""Any!""Opened!""None!"
default
/* Detailed source-code truncated for AI context efficiency. */diagnostics.severity
Modifica a gravidade do diagnóstico.
Terminar com ! significa sobrescrever a configuração de grupo diagnostics.groupSeverity.
type
object<string, string>enum
"Error""Warning""Information""Hint""Error!""Warning!""Information!""Hint!"
default
/* Detailed source-code truncated for AI context efficiency. */diagnostics.unusedLocalExclude
Não diagnosticar unused-local quando o nome da variável corresponder ao padrão a seguir.
type
Array<string>default
[]diagnostics.workspaceDelay
Latência (milissegundos) para diagnósticos da workspace.
type
integerdefault
3000diagnostics.workspaceEvent
Define quando acionar diagnósticos da workspace.
type
stringenum
"OnChange": Aciona diagnósticos da workspace quando o arquivo é modificado."OnSave": Aciona diagnósticos da workspace quando o arquivo é salvo."None": Desabilita diagnósticos da workspace.
default
"OnSave"diagnostics.workspaceRate
Taxa de execução dos diagnósticos da workspace (%). Diminuir este valor reduz o uso de CPU, mas também reduz a velocidade dos diagnósticos. O diagnóstico do arquivo que você está editando sempre é feito em velocidade total e não é afetado por esta configuração.
type
integerdefault
100doc.packageName
Tratar nomes de campos específicos como de pacote; ex.: m_* significa que XXX.m_id e XXX.m_type são de pacote e só podem ser acessados no arquivo onde foram definidos.
type
Array<string>default
[]doc.privateName
Tratar nomes de campos específicos como privados; ex.: m_* significa que XXX.m_id e XXX.m_type são privados e só podem ser acessados na classe onde foram definidos.
type
Array<string>default
[]doc.protectedName
Tratar nomes de campos específicos como protegidos; ex.: m_* significa que XXX.m_id e XXX.m_type são protegidos e só podem ser acessados na classe onde foram definidos e em subclasses.
type
Array<string>default
[]doc.regengine
Mecanismo de expressão regular usado para corresponder nomes de escopo de documentação.
type
stringenum
"glob": Sintaxe de padrão leve padrão."lua": Expressões regulares completas no estilo Lua.
default
"glob"docScriptPath
Mecanismo de expressão regular usado para corresponder nomes de escopo de documentação.
type
stringdefault
""format.defaultConfig
Configuração de formatação padrão; tem prioridade menor que o arquivo .editorconfig da workspace.
Consulte a documentação do formatador para uso.
type
Object<string, string>default
{}format.enable
Habilitar formatador de código.
type
booleandefault
truehint.arrayIndex
Mostrar dicas de índice de array ao construir uma tabela.
type
stringenum
"Enable": Mostrar dicas em todas as tabelas."Auto": Mostrar dicas apenas quando a tabela tiver mais de 3 itens ou for uma tabela mista."Disable": Desativar dicas de índice de array.
default
"Auto"hint.await
Se a função chamada estiver marcada com ---@async, sugerir await na chamada.
type
booleandefault
truehint.awaitPropagate
Habilita a propagação de await. Quando uma função chama outra marcada com ---@async, ela será automaticamente marcada como ---@async.
type
booleandefault
falsehint.enable
Habilitar inlay hints.
type
booleandefault
falsehint.paramName
Mostrar dicas com o nome do parâmetro na chamada de função.
type
stringenum
"All": Mostrar todos os tipos de parâmetros."Literal": Mostrar apenas parâmetros de tipo literal."Disable": Desativar dicas de nome de parâmetro.
default
"All"hint.paramType
Mostrar dicas de tipo nos parâmetros da função.
type
booleandefault
truehint.semicolon
Se não houver ponto e vírgula no fim da instrução, mostrar um ponto e vírgula virtual.
type
stringenum
"All": Todas as instruções exibem ponto e vírgula virtual."SameLine": Quando duas instruções estiverem na mesma linha, mostrar um ponto e vírgula entre elas."Disable": Desativar pontos e vírgulas virtuais.
default
"SameLine"hint.setType
Mostrar dicas de tipo em atribuições.
type
booleandefault
falsehover.enable
Habilitar hover.
type
booleandefault
truehover.enumsLimit
Quando um valor corresponde a vários tipos, limita quantos tipos são exibidos.
type
integerdefault
5hover.expandAlias
Definir se aliases devem ser expandidos. Por exemplo, ---@alias myType boolean|number aparecerá como boolean|number; caso contrário aparecerá como myType.
type
booleandefault
truehover.previewFields
Ao inspecionar uma tabela, limita o número máximo de campos pré-visualizados.
type
integerdefault
10hover.viewNumber
No hover, mostrar conteúdo numérico (apenas se o literal não for decimal).
type
booleandefault
truehover.viewString
No hover, mostrar o conteúdo da string (apenas se o literal tiver caracteres de escape).
type
booleandefault
truehover.viewStringMax
Comprimento máximo da string exibida no hover.
type
integerdefault
1000language.completeAnnotation
(Somente VSCode) Insere automaticamente "---@ " após uma quebra de linha seguinte a uma anotação.
type
booleandefault
truelanguage.fixIndent
(Somente VSCode) Corrige indentação automática incorreta, como quebras de linha dentro de uma string contendo a palavra "function".
type
booleandefault
truemisc.executablePath
Especifica o caminho do executável no VSCode.
type
stringdefault
""misc.parameters
Parâmetros de linha de comando ao iniciar o serviço de linguagem no VSCode.
type
Array<string>default
[]nameStyle.config
Configurações de estilo de nomes.
Consulte a documentação do formatador para uso.
type
Object<string, string | array>default
{}runtime.builtin
Ajusta o estado de habilitação das bibliotecas internas. Você pode desabilitar (ou redefinir) bibliotecas inexistentes conforme o ambiente de execução real.
default: a biblioteca será habilitada ou desabilitada conforme a versão do runtimeenable: sempre habilitardisable: sempre desabilitar
type
object<string, string>enum
"default""enable""disable"
default
{
"basic": "default",
"bit": "default",
"bit32": "default",
"builtin": "default",
"coroutine": "default",
"debug": "default",
"ffi": "default",
"io": "default",
"jit": "default",
"jit.profile": "default",
"jit.util": "default",
"math": "default",
"os": "default",
"package": "default",
"string": "default",
"string.buffer": "default",
"table": "default",
"table.clear": "default",
"table.new": "default",
"utf8": "default"
}runtime.enableLuaJITExtensions
Ativa a sintaxe de extensão do LuaJIT (requer que Lua.runtime.version esteja definido como LuaJIT).
Cada extensão também pode ser habilitada individualmente via Lua.runtime.nonstandardSymbol.
type
booleandefault
falseruntime.fileEncoding
Codificação de arquivo. A opção ansi está disponível apenas na plataforma Windows.
type
stringenum
"utf8""ansi""utf16le""utf16be"
default
"utf8"runtime.meta
Formato do nome do diretório dos arquivos meta.
type
stringdefault
"${version} ${language} ${encoding}"runtime.nonstandardSymbol
Suporta símbolos não-padrão. Certifique-se de que seu ambiente de runtime suporta esses símbolos.
type
Array<string>enum
"//": Comentário de linha (estilo C)."/**/": Comentário de bloco (estilo C)."`": String literal com crase."+=": Atribuição composta de adição."-=": Atribuição composta de subtração."*=": Atribuição composta de multiplicação."/=": Atribuição composta de divisão."%=": Atribuição composta de módulo."^=": Atribuição composta de potência."//=": Atribuição composta de divisão inteira."|=": Atribuição composta OR bit a bit."&=": Atribuição composta AND bit a bit."<<=": Atribuição composta de deslocamento à esquerda.">>=": Atribuição composta de deslocamento à direita."||": OU lógico (equivalente aor)."&&": E lógico (equivalente aand)."!": NÃO lógico (equivalente anot)."!=": Diferente (equivalente a~=)."continue": Instruçãocontinue."|lambda|": Função curta com parâmetros em pipe (|x| expr)."?.": Navegação segura (campo/método:a?.b/obj?.:method()/obj:method?.())."?.(": Chamada de navegação segura (f?.()/f?."str"/f?.{...}/f?.[[...]])."?.[": Índice de navegação segura (t?.[key])."??": Coalescência nula (a ?? b; usa o lado direito apenas quando o esquerdo é nil)."ternary": Operador ternário (cond ? x : y, associativo à direita; chamadas de método proibidas na partex)."~>>": Deslocamento aritmético à direita (a ~>> b, específico do LuaJIT;>>normal é lógico)."~>>=": Atribuição composta de deslocamento aritmético à direita (a ~>>= b)."..=": Atribuição composta de concatenação de strings (a ..= b)."~=": Atribuição composta XOR: apenas em contexto de declaração (ex.:a ~= bem uma linha); em expressões continua sendo o operador de desigualdade."const": Declaraçãoconst(constante local de escopo de bloco; não pode ser reatribuída nem redeclarada)."->": Seta de função curta (x -> expr/|x| -> expr/|| -> expr/-> do ... end)."number_underscore": Sublinhado em literais numéricos (ex.:1_000,0x1_2,0b1_0)."?(": Chamada opcional sem ponto (f?()equivale af?.(); conflita com a análise do ternário (ternary), não recomendado juntos)."?[": Índice opcional sem ponto (t?[1]equivale at?.[1]; conflita com a análise do ternário (ternary), não recomendado juntos)."?:": Método seguro sem ponto (obj?:get()equivale aobj?.:get()).
default
[]runtime.path
Ao usar require, define como encontrar o arquivo baseado no nome fornecido.
Definir esta configuração como ?/init.lua significa que ao executar require 'myfile', será buscado ${workspace}/myfile/init.lua nos arquivos carregados.
Se runtime.pathStrict for false, ${workspace}/**/myfile/init.lua também será buscado.
Para carregar arquivos fora da workspace, primeiro configure Lua.workspace.library.
type
Array<string>default
["?.lua","?/init.lua"]runtime.pathStrict
Quando habilitado, runtime.path buscará apenas o primeiro nível de diretórios; veja a descrição de runtime.path.
type
booleandefault
falseruntime.plugin
Caminho do plugin. Leia a wiki para saber mais.
type
string | arraydefault
nullruntime.pluginArgs
Argumentos adicionais para o plugin.
type
array | objectdefault
nullruntime.special
Variáveis globais personalizadas são tratadas como variáveis especiais internas, e o servidor fornecerá suporte especial.
O exemplo a seguir mostra que 'include' é tratado como 'require'.
"Lua.runtime.special" : {
"include" : "require"
}type
Object<string, string>default
{}runtime.unicodeName
Permite caracteres Unicode em nomes.
type
booleandefault
falseruntime.version
Versão do runtime Lua.
type
stringenum
"Lua 5.1""Lua 5.2""Lua 5.3""Lua 5.4""Lua 5.5""LuaJIT"
default
"Lua 5.4"semantic.annotation
Colorização semântica de anotações de tipo.
type
booleandefault
truesemantic.enable
Habilita colorização semântica. Pode ser necessário definir editor.semanticHighlighting.enabled como true.
type
booleandefault
truesemantic.keyword
Colorização semântica de palavras-chave/literais/operadores. Só habilite se seu editor não oferecer colorização sintática.
type
booleandefault
falsesemantic.variable
Colorização semântica de variáveis/campos/parâmetros.
type
booleandefault
truesignatureHelp.enable
Habilitar ajuda de assinatura.
type
booleandefault
truespell.dict
Palavras personalizadas para verificação ortográfica.
type
Array<string>default
[]type.castNumberToInteger
Permitir atribuir o tipo number ao tipo integer.
type
booleandefault
truetype.checkTableShape
Verificação rigorosa do formato das tabelas.
type
booleandefault
falsetype.inferParamType
Quando o parâmetro não tiver anotação, inferir o tipo a partir dos argumentos de chamada.
Quando esta opção for false, o tipo do parâmetro será any se não houver anotação.
type
booleandefault
falsetype.inferTableSize
Número máximo de campos de tabela analisados durante a inferência de tipo.
type
integerdefault
10type.maxUnionVariants
Missing description!!
type
integerdefault
0type.weakNilCheck
Ao verificar um tipo união, ignora o nil presente nele.
Quando esta opção for false, number|nil não pode ser atribuído a number; com true, pode.
type
booleandefault
falsetype.weakUnionCheck
Quando um subtipo de uma união atende à condição, considera-se que a união inteira atende.
Quando esta opção for false, number|boolean não pode ser atribuído a number; com true, pode.
type
booleandefault
falsetypeFormat.config
Configura o comportamento de formatação enquanto digita código Lua.
type
object<string, string>default
{
/*
Controla se `end` é completado automaticamente em posições adequadas.
*/
"auto_complete_end": "true",
/*
Controla se um separador é adicionado automaticamente ao final de uma declaração de tabela.
*/
"auto_complete_table_sep": "true",
/*
Controla se uma linha deve ser formatada.
*/
"format_line": "true"
}window.progressBar
Mostrar barra de progresso na barra de status.
type
booleandefault
truewindow.statusBar
Mostrar status da extensão na barra de status.
type
booleandefault
trueworkspace.checkThirdParty
Detecção e adaptação automáticas de bibliotecas de terceiros; atualmente suportadas:
- OpenResty
- Cocos4.0
- LÖVE
- LÖVR
- skynet
- Jass
type
string | booleandefault
nullworkspace.ignoreDir
Arquivos e diretórios ignorados (usa sintaxe .gitignore).
type
Array<string>default
[".vscode"]workspace.ignoreSubmodules
Ignorar submódulos.
type
booleandefault
trueworkspace.library
Além da workspace atual, de quais diretórios carregar arquivos. Os arquivos nesses diretórios serão tratados como bibliotecas de código externas, e alguns recursos (como renomear campos) não modificarão esses arquivos.
type
Array<string>default
[]workspace.maxPreload
Número máximo de arquivos pré-carregados.
type
integerdefault
5000workspace.preloadFileSize
Ignorar arquivos maiores que este valor (KB) ao pré-carregar.
type
integerdefault
500workspace.useGitIgnore
Ignorar lista de arquivos em .gitignore.
type
booleandefault
trueworkspace.userThirdParty
Adicione aqui caminhos de configuração de bibliotecas de terceiros privadas; consulte o caminho de configuração embutido.
type
Array<string>default
[]Doc Zh Cn Config (`doc/zh-cn/config.md`)
addonManager.enable
是否启用扩展的附加插件管理器(Addon Manager)
type
booleandefault
trueaddonManager.repositoryBranch
指定插件管理器(Addon Manager)使用的git仓库分支
type
stringdefault
""addonManager.repositoryPath
指定插件管理器(Addon Manager)使用的git仓库路径
type
stringdefault
""addonRepositoryPath
指定插件仓库的路径(与 Addon Manager 无关)
type
stringdefault
""codeLens.enable
启用代码度量。
type
booleandefault
falsecompletion.autoRequire
输入内容看起来是个文件名时,自动 require 此文件。
type
booleandefault
truecompletion.callSnippet
显示函数调用片段。
type
stringenum
"Disable": 只显示函数名。"Both": 显示函数名与调用片段。"Replace": 只显示调用片段。
default
"Disable"completion.displayContext
预览建议的相关代码片段,可能可以帮助你了解这项建议的用法。设置的数字表示代码片段的截取行数,设置为0可以禁用此功能。
type
integerdefault
0completion.enable
启用自动完成。
type
booleandefault
truecompletion.keywordSnippet
显示关键字语法片段
type
stringenum
"Disable": 只显示关键字。"Both": 显示关键字与语法片段。"Replace": 只显示语法片段。
default
"Replace"completion.maxSuggestCount
自动完成时最多分析的字段数量。当对象字段超过此上限时,需要更精确的输入才会显示补全。
type
integerdefault
100completion.postfix
用于触发后缀建议的符号。
type
stringdefault
"@"completion.requireFunction
The function to insert when an auto-require is triggered.
type
stringdefault
"require"completion.requireSeparator
require 时使用的分隔符。
type
stringdefault
"."completion.showParams
在建议列表中显示函数的参数信息,函数拥有多个定义时会分开显示。
type
booleandefault
truecompletion.showWord
在建议中显示上下文单词。
type
stringenum
"Enable": 总是在建议中显示上下文单词。"Fallback": 无法根据语义提供建议时才显示上下文单词。"Disable": 不显示上下文单词。
default
"Fallback"completion.workspaceWord
显示的上下文单词是否包含工作区中其他文件的内容。
type
booleandefault
truediagnostics.disable
禁用的诊断(使用浮框括号内的代码)。
type
Array<string>enum
"action-after-return":return语句之后的代码"ambiguity-1": 优先级歧义,如:num or 0 + 1,推测用户的实际期望为(num or 0) + 1"ambiguous-syntax": 存在歧义的语法"args-after-dots":...之后的参数"assign-const-global": 给 const 全局变量赋值"assign-type-mismatch": 值类型与赋值变量类型不匹配"await-in-sync": 同步函数中异步函数调用"block-after-else":else之后的代码块"break-outside": 在循环外使用break"cast-local-type": 已显式定义变量类型与要定义的值的类型不匹配"cast-type-mismatch": 变量被转换为与其初始类型不匹配的类型"circle-doc-class":@class继承出现循环"close-non-object": 尝试关闭非对象变量的诊断"code-after-break": 放在循环中break语句后面的代码"codestyle-check": 启用对不正确样式行的诊断"count-down-loop": for循环永远无法达到最大/极限值(在递减时递增)"declare-const": 重复声明 const 常量"deprecated": 变量已被标记为deprecated(过时)但仍在使用"different-requires": required的同一个文件使用了两个不同的名字"discard-returns": 函数的返回值被忽略(函数被@nodiscard标记时)"doc-field-no-class": 为不存在的类@class标记@field字段"duplicate-doc-alias":@alias字段的名字冲突"duplicate-doc-field":@field字段的名字冲突"duplicate-doc-param":@param字段的名字冲突"duplicate-index": 在字面量表中重复定义了索引"duplicate-set-field": 在一个类中多次定义同一字段"empty-block": 空代码块"env-is-global":_ENV作为全局变量使用"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-close-attribute": 全局变量使用 close 属性"global-element": 启用诊断以警告全局元素。"global-in-nil-env": 不能使用全局变量(_ENV被设置为了nil)"incomplete-signature-doc":@param或@return的注释不完整"index-in-func-name": 函数名中包含索引"inject-field": 向对象注入字段"invisible": 使用不可见的值"jump-local-scope": 跳入局部变量作用域"keyword": 关键字使用不当"local-limit": 局部变量数量超过限制"lowercase-global": 首字母小写的全局变量定义"lua-doc-miss-sign": LuaDoc 注释缺少符号"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": 函数无值返回但函数使用@return标记了返回值"multi-close": 多重 close 操作"name-style-check": 变量的名称样式检查"need-check-nil": 变量之前被赋值为nil或可选值(可能为nil)"need-paren": 需要括号"nesting-long-mark": 嵌套的长注释标记"newfield-call": 在字面量表中,2行代码之间缺少分隔符,在语法上被解析为了一次索引操作"newline-call": 以(开始的新行,在语法上被解析为了上一行的函数调用"no-unknown": 变量的未知类型无法推断"no-visible-label": 不可见的标签"not-yieldable": 不允许调用coroutine.yield()"param-type-mismatch": 给定参数的类型与函数定义所要求的类型(@param)不匹配"redefined-label": 重复定义的标签"redefined-local": 重复定义的局部变量"redundant-parameter": 函数调用时,传入了多余的参数"redundant-return": 当放置一个不需要的返回值时触发(函数会自行退出)"redundant-return-value": 返回@return注释未指定的额外值"redundant-value": 赋值操作时,值的数量比被赋值的对象多"return-type-mismatch": 返回值的类型与@return中声明的类型不匹配"set-const": 给 const 常量赋值"spell-check": 启用字符串拼写检查的诊断。"trailing-space": 后置空格"unbalanced-assignments": 多重赋值时没有赋值所有变量(如local x,y = 1)"undefined-doc-class": 在@class注解中引用未定义的类。"undefined-doc-name": 在@type注解中引用未定义的类型或@alias"undefined-doc-param": 函数声明中@param引用了未定义的参数"undefined-env-child":_ENV被设置为了新的字面量表,但是试图获取的全局变量不再这张表中"undefined-field": 引用变量的未定义字段"undefined-global": 未定义的全局变量"unexpect-dots""unexpect-efunc-name""unexpect-gfunc-name""unexpect-lfunc-name""unexpect-symbol""unicode-name": Unicode 名称使用"unknown-attribute": 未知的属性"unknown-cast-variable": 使用@cast对未定义变量的强制转换"unknown-diag-code": 未知的诊断代码"unknown-operator": 未知的运算符"unknown-symbol": 未知的符号"unreachable-code": 不可达的代码"unsupport-named-vararg": 不支持的命名变参"unsupport-symbol""unused-function": 未使用的函数"unused-label": 未使用的标签"unused-local": 未使用的局部变量"unused-vararg": 未使用的不定参数"variable-not-declared": 使用未声明的变量
default
[]diagnostics.enable
启用诊断。
type
booleandefault
truediagnostics.enableScheme
Missing description!!
type
Array<string>default
["file"]diagnostics.globals
已定义的全局变量。
type
Array<string>default
[]diagnostics.globalsRegex
已定义的全局变量符合的正则表达式。
type
Array<string>default
[]diagnostics.groupFileStatus
批量修改一个组中的文件状态。
- Opened: 只诊断打开的文件
- Any: 诊断任何文件
- None: 禁用此诊断
设置为 Fallback 意味着组中的诊断由 diagnostics.neededFileStatus 单独设置。
其他设置将覆盖单独设置,但是不会覆盖以 ! 结尾的设置。
type
object<string, string>enum
"Any""Opened""None""Fallback"
default
/* Detailed source-code truncated for AI context efficiency. */diagnostics.groupSeverity
批量修改一个组中的诊断等级。
设置为 Fallback 意味着组中的诊断由 diagnostics.severity 单独设置。
其他设置将覆盖单独设置,但是不会覆盖以 ! 结尾的设置。
type
object<string, string>enum
"Error""Warning""Information""Hint""Fallback"
default
/* Detailed source-code truncated for AI context efficiency. */diagnostics.ignoredFiles
如何诊断被忽略的文件。
type
stringenum
"Enable": 总是诊断这些文件。"Opened": 只有打开这些文件时才会诊断。"Disable": 不诊断这些文件。
default
"Opened"diagnostics.libraryFiles
如何诊断通过 Lua.workspace.library 加载的文件。
type
stringenum
"Enable": 总是诊断这些文件。"Opened": 只有打开这些文件时才会诊断。"Disable": 不诊断这些文件。
default
"Opened"diagnostics.neededFileStatus
- Opened: 只诊断打开的文件
- Any: 诊断任何文件
- None: 禁用此诊断
以 ! 结尾的设置优先级高于组设置 diagnostics.groupFileStatus。
type
object<string, string>enum
"Any""Opened""None""Any!""Opened!""None!"
default
/* Detailed source-code truncated for AI context efficiency. */diagnostics.severity
修改诊断等级。
以 ! 结尾的设置优先级高于组设置 diagnostics.groupSeverity。
type
object<string, string>enum
"Error""Warning""Information""Hint""Error!""Warning!""Information!""Hint!"
default
/* Detailed source-code truncated for AI context efficiency. */diagnostics.unusedLocalExclude
如果变量名匹配以下规则,则不对其进行 unused-local 诊断。
type
Array<string>default
[]diagnostics.workspaceDelay
进行工作区诊断的延迟(毫秒)。
type
integerdefault
3000diagnostics.workspaceEvent
设置触发工作区诊断的时机。
type
stringenum
"OnChange": 当文件发生变化时触发工作区诊断。"OnSave": 当文件保存时触发工作区诊断。"None": 关闭工作区诊断。
default
"OnSave"diagnostics.workspaceRate
工作区诊断的运行速率(百分比)。降低该值会减少CPU占用,但是也会降低工作区诊断的速度。你当前正在编辑的文件的诊断总是全速完成,不受该选项影响。
type
integerdefault
100doc.packageName
将特定名称的字段视为package,例如 m_* 意味着 XXX.m_id 与 XXX.m_type 只能在定义所在的文件中访问。
type
Array<string>default
[]doc.privateName
将特定名称的字段视为私有,例如 m_* 意味着 XXX.m_id 与 XXX.m_type 是私有字段,只能在定义所在的类中访问。
type
Array<string>default
[]doc.protectedName
将特定名称的字段视为受保护,例如 m_* 意味着 XXX.m_id 与 XXX.m_type 是受保护的字段,只能在定义所在的类极其子类中访问。
type
Array<string>default
[]doc.regengine
用于匹配文档作用域名称的正则表达式引擎。
type
stringenum
"glob": 默认轻量级模式语法。"lua": 完整的 Lua 风格正则表达式。
default
"glob"docScriptPath
自定义 Lua 脚本路径,覆盖默认文档生成行为。
type
stringdefault
""format.defaultConfig
默认的格式化配置,优先级低于工作区内的 .editorconfig 文件。
请查阅格式化文档了解用法。
type
Object<string, string>default
{}format.enable
启用代码格式化程序。
type
booleandefault
truehint.arrayIndex
在构造表时提示数组索引。
type
stringenum
"Enable": 所有的表中都提示数组索引。"Auto": 只有表大于3项,或者表是混合类型时才进行提示。"Disable": 禁用数组索引提示。
default
"Auto"hint.await
如果调用的函数被标记为了 ---@async ,则在调用处提示 await 。
type
booleandefault
truehint.awaitPropagate
启用 await 的传播, 当一个函数调用了一个---@async标记的函数时,会自动标记为---@async。
type
booleandefault
falsehint.enable
启用内联提示。
type
booleandefault
falsehint.paramName
在函数调用处提示参数名。
type
stringenum
"All": 所有类型的参数均进行提示。"Literal": 只有字面量类型的参数进行提示。"Disable": 禁用参数提示。
default
"All"hint.paramType
在函数的参数位置提示类型。
type
booleandefault
truehint.semicolon
若语句尾部没有分号,则显示虚拟分号。
type
stringenum
"All": 所有语句都显示虚拟分号。"SameLine": 2个语句在同一行时,在它们之间显示分号。"Disable": 禁用虚拟分号。
default
"SameLine"hint.setType
在赋值操作位置提示类型。
type
booleandefault
falsehover.enable
启用悬停提示。
type
booleandefault
truehover.enumsLimit
当值对应多个类型时,限制类型的显示数量。
type
integerdefault
5hover.expandAlias
是否展开别名。例如 ---@alias myType boolean|number 展开后显示为 boolean|number,否则显示为 myType。
type
booleandefault
truehover.previewFields
悬停提示查看表时,限制表内字段的最大预览数量。
type
integerdefault
10hover.viewNumber
悬停提示查看数字内容(仅当字面量不是十进制时)。
type
booleandefault
truehover.viewString
悬停提示查看字符串内容(仅当字面量包含转义符时)。
type
booleandefault
truehover.viewStringMax
悬停提示查看字符串内容时的最大长度。
type
integerdefault
1000language.completeAnnotation
(仅VSCode) 在注解后换行时自动插入 "---@ "。
type
booleandefault
truelanguage.fixIndent
(仅VSCode) 修复错误的自动缩进,例如在包含单词 "function" 的字符串中换行时出现的错误缩进。
type
booleandefault
truemisc.executablePath
VSCode中指定可执行文件路径。
type
stringdefault
""misc.parameters
VSCode中启动语言服务时的命令行参数。
type
Array<string>default
[]nameStyle.config
设定命名风格检查的配置。
请查阅格式化文档了解用法。
type
Object<string, string | array>default
{}runtime.builtin
调整内置库的启用状态,你可以根据实际运行环境禁用掉不存在的库(或重新定义)。
default: 表示库会根据运行版本启用或禁用enable: 总是启用disable: 总是禁用
type
object<string, string>enum
"default""enable""disable"
default
{
"basic": "default",
"bit": "default",
"bit32": "default",
"builtin": "default",
"coroutine": "default",
"debug": "default",
"ffi": "default",
"io": "default",
"jit": "default",
"jit.profile": "default",
"jit.util": "default",
"math": "default",
"os": "default",
"package": "default",
"string": "default",
"string.buffer": "default",
"table": "default",
"table.clear": "default",
"table.new": "default",
"utf8": "default"
}runtime.enableLuaJITExtensions
启用 LuaJIT 扩展语法(需要将 Lua.runtime.version 设置为 LuaJIT)。
各项扩展语法也可以单独通过 Lua.runtime.nonstandardSymbol 启用。
type
booleandefault
falseruntime.fileEncoding
文件编码,ansi 选项只在 Windows 平台下有效。
type
stringenum
"utf8""ansi""utf16le""utf16be"
default
"utf8"runtime.meta
meta文件的目录名称格式。
type
stringdefault
"${version} ${language} ${encoding}"runtime.nonstandardSymbol
支持非标准的符号。请务必确认你的运行环境支持这些符号。
type
Array<string>enum
"//": 行注释(C 风格)。"/**/": 块注释(C 风格)。"`": 反引号字符串字面量。"+=": 加法复合赋值。"-=": 减法复合赋值。"*=": 乘法复合赋值。"/=": 除法复合赋值。"%=": 取模复合赋值。"^=": 幂复合赋值。"//=": 地板除复合赋值。"|=": 按位或复合赋值。"&=": 按位与复合赋值。"<<=": 左移复合赋值。">>=": 右移复合赋值。"||": 逻辑或(等价于 or)。"&&": 逻辑与(等价于 and)。"!": 逻辑非(等价于 not)。"!=": 不等于(等价于 ~=)。"continue": continue 语句。"|lambda|": 管道参数短函数(|x| expr)。"?.": 安全导航(字段/方法:a?.b/obj?.:method()/obj:method?.())。"?.(": 安全导航调用(f?.()/f?."str"/f?.{...}/f?.[[...]])。"?.[": 安全导航索引(t?.[key])。"??": 空值合并(a ?? b,仅当左侧为 nil 时取右侧)。"ternary": 三元运算(cond ? x : y,右结合;x 部分禁止方法调用)。"~>>": 算术右移(a ~>> b,LuaJIT 特有;普通>>为逻辑右移)。"~>>=": 算术右移复合赋值(a ~>>= b)。"..=": 字符串连接复合赋值(a ..= b)。"~=": 异或复合赋值:仅语句上下文(如a ~= b单独成行)生效;表达式中仍是不等于比较。"const":const声明(块级局部常量,不可重新赋值/重复声明)。"->": 短函数箭头(x -> expr/|x| -> expr/|| -> expr/-> do ... end)。"number_underscore": 数字字面量下划线(如1_000、0x1_2、0b1_0)。"?(": 无点号可选链调用(f?()等价于f?.();与三元(ternary)解析冲突,不建议同时启用)。"?[": 无点号可选链索引(t?[1]等价于t?.[1];与三元(ternary)解析冲突,不建议同时启用)。"?:": 无点号安全方法(obj?:get()等价于obj?.:get())。
default
[]runtime.path
当使用 require 时,如何根据输入的名字来查找文件。
此选项设置为 ?/init.lua 意味着当你输入 require 'myfile' 时,会从已加载的文件中搜索 {workspace}/myfile/init.lua。
当 runtime.pathStrict 设置为 false 时,还会尝试搜索 ${workspace}/**/myfile/init.lua。
如果你想要加载工作区以外的文件,你需要先设置 Lua.workspace.library。
type
Array<string>default
["?.lua","?/init.lua"]runtime.pathStrict
启用后 runtime.path 将只搜索第一层目录,见 runtime.path 的说明。
type
booleandefault
falseruntime.plugin
插件路径,请查阅文档了解用法。
type
string | arraydefault
nullruntime.pluginArgs
插件的额外参数。
type
array | objectdefault
nullruntime.special
将自定义全局变量视为一些特殊的内置变量,语言服务将提供特殊的支持。
下面这个例子表示将 include 视为 require 。
"Lua.runtime.special" : {
"include" : "require"
}type
Object<string, string>default
{}runtime.unicodeName
允许在名字中使用 Unicode 字符。
type
booleandefault
falseruntime.version
Lua运行版本。
type
stringenum
"Lua 5.1""Lua 5.2""Lua 5.3""Lua 5.4""Lua 5.5""LuaJIT"
default
"Lua 5.4"semantic.annotation
对类型注解进行语义着色。
type
booleandefault
truesemantic.enable
启用语义着色。你可能需要同时将 editor.semanticHighlighting.enabled 设置为 true 才能生效。
type
booleandefault
truesemantic.keyword
对关键字/字面量/运算符进行语义着色。只有当你的编辑器无法进行语法着色时才需要启用此功能。
type
booleandefault
falsesemantic.variable
对变量/字段/参数进行语义着色。
type
booleandefault
truesignatureHelp.enable
启用参数提示。
type
booleandefault
truespell.dict
拼写检查的自定义单词。
type
Array<string>default
[]type.castNumberToInteger
允许将 number 类型赋给 integer 类型。
type
booleandefault
truetype.checkTableShape
对表的形状进行严格检查。
type
booleandefault
falsetype.inferParamType
未注释参数类型时,参数类型由函数传入参数推断。
如果设置为 "false",则在未注释时,参数类型为 "any"。
type
booleandefault
falsetype.inferTableSize
类型推断期间分析的表字段的最大数量。
type
integerdefault
10type.maxUnionVariants
Missing description!!
type
integerdefault
0type.weakNilCheck
对联合类型进行类型检查时,忽略其中的 nil。
此设置为 false 时,numer|nil 类型无法赋给 number 类型;为 true 是则可以。
type
booleandefault
falsetype.weakUnionCheck
联合类型中只要有一个子类型满足条件,则联合类型也满足条件。
此设置为 false 时,number|boolean 类型无法赋给 number 类型;为 true 时则可以。
type
booleandefault
falsetypeFormat.config
配置输入Lua代码时的格式化行为
type
object<string, string>default
{
/*
是否在合适的位置自动完成 `end`
*/
"auto_complete_end": "true",
/*
是否在table末尾自动添加分隔符
*/
"auto_complete_table_sep": "true",
/*
是否对某一行进行格式化
*/
"format_line": "true"
}window.progressBar
在状态栏显示进度条。
type
booleandefault
truewindow.statusBar
在状态栏显示插件状态。
type
booleandefault
trueworkspace.checkThirdParty
自动检测与适配第三方库,目前支持的库为:
- OpenResty
- Cocos4.0
- LÖVE
- LÖVR
- skynet
- Jass
type
string | booleandefault
nullworkspace.ignoreDir
忽略的文件与目录(使用 .gitignore 语法)。
type
Array<string>default
[".vscode"]workspace.ignoreSubmodules
忽略子模块。
type
booleandefault
trueworkspace.library
除了当前工作区以外,还会从哪些目录中加载文件。这些目录中的文件将被视作外部提供的代码库,部分操作(如重命名字段)不会修改这些文件。
type
Array<string>default
[]workspace.maxPreload
最大预加载文件数。
type
integerdefault
5000workspace.preloadFileSize
预加载时跳过大小大于该值(KB)的文件。
type
integerdefault
500workspace.useGitIgnore
忽略 .gitignore 中列举的文件。
type
booleandefault
trueworkspace.userThirdParty
在这里添加私有的第三方库适配文件路径,请参考内置的配置文件路径
type
Array<string>default
[]Doc Zh Tw Config (`doc/zh-tw/config.md`)
addonManager.enable
是否啟用延伸模組的附加插件管理器(Addon Manager)。
type
booleandefault
trueaddonManager.repositoryBranch
指定插件管理器(Addon Manager)使用的git branch。
type
stringdefault
""addonManager.repositoryPath
指定插件管理器(Addon Manager)使用的git path。
type
stringdefault
""addonRepositoryPath
指定獨立的插件倉庫路徑(與插件管理器無關)。
type
stringdefault
""codeLens.enable
啟用CodeLens。
type
booleandefault
falsecompletion.autoRequire
輸入內容看起來像檔名時,自動 require 此檔案。
type
booleandefault
truecompletion.callSnippet
顯示函式呼叫片段。
type
stringenum
"Disable": 只顯示函式名。"Both": 顯示函式名與呼叫片段。"Replace": 只顯示呼叫片段。
default
"Disable"completion.displayContext
預覽建議的相關程式碼片段,可能可以幫助你瞭解這項建議的用法。設定的數字表示程式碼片段的擷取行數,設定為 0 可以停用此功能。
type
integerdefault
0completion.enable
啟用自動完成。
type
booleandefault
truecompletion.keywordSnippet
顯示關鍵字語法片段。
type
stringenum
"Disable": 只顯示關鍵字。"Both": 顯示關鍵字與語法片段。"Replace": 只顯示語法片段。
default
"Replace"completion.maxSuggestCount
自動完成時最多分析的欄位數量。若物件欄位超過此上限,必須提供更精確的輸入才會顯示建議。
type
integerdefault
100completion.postfix
用於觸發後綴建議的符號。
type
stringdefault
"@"completion.requireFunction
The function to insert when an auto-require is triggered.
type
stringdefault
"require"completion.requireSeparator
require 時使用的分隔符。
type
stringdefault
"."completion.showParams
在建議列表中顯示函式的參數資訊,函式擁有多個定義時會分開顯示。
type
booleandefault
truecompletion.showWord
在建議中顯示上下文單詞。
type
stringenum
"Enable": 總是在建議中顯示上下文單詞。"Fallback": 無法根據語義提供建議時才顯示上下文單詞。"Disable": 不顯示上下文單詞。
default
"Fallback"completion.workspaceWord
顯示的上下文單詞是否包含工作區中其他檔案的內容。
type
booleandefault
truediagnostics.disable
停用的診斷(使用浮框括號內的程式碼)。
type
Array<string>enum
"action-after-return":return陳述式之後的程式碼"ambiguity-1": 優先順序歧義,如:num or 0 + 1,推測使用者的實際期望為(num or 0) + 1"ambiguous-syntax": 存在歧義的語法"args-after-dots":...之後的參數"assign-const-global": 對 const 全域變數賦值"assign-type-mismatch": 賦值類型與變數類型不符合"await-in-sync": 同步函式中呼叫非同步函式"block-after-else":else之後的程式碼區塊"break-outside": 在迴圈外使用break"cast-local-type": 已顯式定義變數類型不符合要定義的值的類型"cast-type-mismatch": 變數被轉換為不符合其初始類型的類型"circle-doc-class":@class繼承出現循環"close-non-object": 嘗試關閉非物件變數"code-after-break": 迴圈內break陳述式後的程式碼"codestyle-check": 行的格式不正確"count-down-loop": 因為for迴圈是遞增而不是遞減,所以不會到達上限/極限"declare-const": 重複宣告 const 常數"deprecated": API已標記deprecated(棄用)但仍在使用"different-requires": required的同一個檔案使用了兩個不同的名字"discard-returns": 忽略了標註為@nodiscard的函式的回傳值"doc-field-no-class": 向沒有標註@class的類別標註@field欄位"duplicate-doc-alias":@alias標註名字衝突"duplicate-doc-field":@field標註名字衝突"duplicate-doc-param":@param標註名字衝突"duplicate-index": 在字面常數表中重複定義了索引"duplicate-set-field": 在類別中多次定義相同的欄位"empty-block": 空程式碼區塊"env-is-global":_ENV作為全域變數使用"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-close-attribute": 全域變數使用 close 屬性"global-element": 對全域元素的警告"global-in-nil-env": 不能使用全域變數(_ENV被設定為nil)"incomplete-signature-doc":@param或@return不完整"index-in-func-name": 函式名稱中包含索引"inject-field": 向物件注入欄位"invisible": 嘗試存取不可見的欄位"jump-local-scope": 跳入區域變數作用域"keyword": 關鍵字使用不當"local-limit": 區域變數數量超過限制"lowercase-global": 首字母小寫的全域變數定義"lua-doc-miss-sign": LuaDoc 註解缺少符號"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": 函式有@return標註卻沒有return陳述式"missing-return-value": 函式沒有回傳值,但使用了@return標註了回傳值"multi-close": 多重 close 操作"name-style-check": 變數命名風格檢查"need-check-nil": 變數曾被賦值為nil或可選值(可能是nil)"need-paren": 需要括號"nesting-long-mark": 巢狀的長註解標記"newfield-call": 在字面常數表中,2行程式碼之間缺少分隔符,在語法上被解析為了一次索引操作"newline-call": 以(開始的新行,在語法上被解析為了上一行的函式呼叫"no-unknown": 無法推斷變數的未知類型"no-visible-label": 不可見的標籤"not-yieldable": 不允許呼叫coroutine.yield()"param-type-mismatch": 給定參數的類型不符合函式定義所要求的類型(@param)"redefined-label": 重複定義的標籤"redefined-local": 重複定義的區域變數"redundant-parameter": 函式呼叫時,傳入了多餘的引數"redundant-return": 放了一個不需要的return陳述式,因為函式會自行退出"redundant-return-value": 回傳了@return標註未指定的額外值"redundant-value": 賦值操作時,值的數量比被賦值的對象多"return-type-mismatch": 回傳值的類型不符合@return中宣告的類型"set-const": 對 const 常數賦值"spell-check": 字串拼寫檢查"trailing-space": 後置空格"unbalanced-assignments": 多重賦值時沒有賦值所有變數(如local x,y = 1)"undefined-doc-class": 在@class標註中引用未定義的類別。"undefined-doc-name": 在@type標註中引用未定義的類型或@alias"undefined-doc-param": 在@param標註中引用函式定義未宣告的參數"undefined-env-child":_ENV被設定為了新的字面常數表,但是試圖獲取的全域變數不在這張表中"undefined-field": 讀取變數中為定義的欄位"undefined-global": 未定義的全域變數"unexpect-dots""unexpect-efunc-name""unexpect-gfunc-name""unexpect-lfunc-name""unexpect-symbol""unicode-name": Unicode 名稱使用"unknown-attribute": 未知的屬性"unknown-cast-variable": 使用@cast對未定義的變數進行強制轉換"unknown-diag-code": 輸入了未知的診斷"unknown-operator": 未知的運算子"unknown-symbol": 未知的符號"unreachable-code": 無法到達的程式碼"unsupport-named-vararg": 不支援的命名變參"unsupport-symbol""unused-function": 未使用的函式"unused-label": 未使用的標籤"unused-local": 未使用的區域變數"unused-vararg": 未使用的不定引數"variable-not-declared": 使用未宣告的變數
default
[]diagnostics.enable
啟用診斷。
type
booleandefault
truediagnostics.enableScheme
Missing description!!
type
Array<string>default
["file"]diagnostics.globals
已定義的全域變數。
type
Array<string>default
[]diagnostics.globalsRegex
使用正規表示式尋找全域變數。
type
Array<string>default
[]diagnostics.groupFileStatus
批次修改一個組中的檔案狀態。
- Opened: 只診斷打開的檔案
- Any: 診斷所有檔案
- None: 停用此診斷
設定為 Fallback 意味著組中的診斷由 diagnostics.neededFileStatus 單獨設定。
其他設定將覆蓋單獨設定,但是不會覆蓋以 ! 結尾的設定。
type
object<string, string>enum
"Any""Opened""None""Fallback"
default
/* Detailed source-code truncated for AI context efficiency. */diagnostics.groupSeverity
批次修改一個組中的診斷等級。
設定為 Fallback 意味著組中的診斷由 diagnostics.severity 單獨設定。
其他設定將覆蓋單獨設定,但是不會覆蓋以 ! 結尾的設定。
type
object<string, string>enum
"Error""Warning""Information""Hint""Fallback"
default
/* Detailed source-code truncated for AI context efficiency. */diagnostics.ignoredFiles
如何診斷被忽略的檔案。
type
stringenum
"Enable": 總是診斷這些檔案。"Opened": 只有打開這些檔案時才會診斷。"Disable": 不診斷這些檔案。
default
"Opened"diagnostics.libraryFiles
如何診斷透過 Lua.workspace.library 載入的檔案。
type
stringenum
"Enable": 總是診斷這些檔案。"Opened": 只有打開這些檔案時才會診斷。"Disable": 不診斷這些檔案。
default
"Opened"diagnostics.neededFileStatus
- Opened: 只診斷打開的檔案
- Any: 診斷所有檔案
- None: 停用此診斷
以 ! 結尾的設定優先順序高於組設定 diagnostics.groupFileStatus。
type
object<string, string>enum
"Any""Opened""None""Any!""Opened!""None!"
default
/* Detailed source-code truncated for AI context efficiency. */diagnostics.severity
修改診斷等級。
以 ! 結尾的設定優先順序高於組設定 diagnostics.groupSeverity。
type
object<string, string>enum
"Error""Warning""Information""Hint""Error!""Warning!""Information!""Hint!"
default
/* Detailed source-code truncated for AI context efficiency. */diagnostics.unusedLocalExclude
如果變數名符合以下規則,則不對其進行 unused-local 診斷。
type
Array<string>default
[]diagnostics.workspaceDelay
進行工作區診斷的延遲(毫秒)。
type
integerdefault
3000diagnostics.workspaceEvent
設定觸發工作區診斷的時機。
type
stringenum
"OnChange": 當檔案發生變化時觸發工作區診斷。"OnSave": 當儲存檔案時觸發工作區診斷。"None": 停用工作區診斷。
default
"OnSave"diagnostics.workspaceRate
工作區診斷的執行速率(百分比)。降低該值會減少CPU使用率,但是也會降低工作區診斷的速度。你目前正在編輯的檔案的診斷總是全速完成,不受該選項影響。
type
integerdefault
100doc.packageName
將特定名稱的欄位視為package,例如 m_* 代表 XXX.m_id 和 XXX.m_type 只能在定義所在的檔案內存取
type
Array<string>default
[]doc.privateName
將特定名稱的欄位視為private,例如 m_* 代表 XXX.m_id 和 XXX.m_type 會是私有層級,只能在定義所在的類別內存取
type
Array<string>default
[]doc.protectedName
將特定名稱的欄位視為protected,例如 m_* 代表 XXX.m_id 和 XXX.m_type 會是保護層級,只能在定義所在的類別和其子類別內存取
type
Array<string>default
[]doc.regengine
用於匹配文件作用域名稱的正則表達式引擎。
type
stringenum
"glob": 預設的輕量模式語法。"lua": 完整的 Lua 風格正則表達式。
default
"glob"docScriptPath
用於匹配文件作用域名稱的正則表達式引擎。
type
stringdefault
""format.defaultConfig
預設的格式化組態,優先順序低於工作區內的 .editorconfig 檔案。
請查閱格式化文件了解用法。
type
Object<string, string>default
{}format.enable
啟用程式碼格式化程式。
type
booleandefault
truehint.arrayIndex
在建構表時提示陣列索引。
type
stringenum
"Enable": 所有的表中都提示陣列索引。"Auto": 只有表大於3項,或者表是混合類型時才進行提示。"Disable": 停用陣列索引提示。
default
"Auto"hint.await
如果呼叫的函式被標記為了 ---@async,則在呼叫處提示 await。
type
booleandefault
truehint.awaitPropagate
啟用 await 的傳播,當一個函式呼叫了一個 ---@async 標記的函式時,會自動標記為 ---@async。
type
booleandefault
falsehint.enable
啟用內嵌提示。
type
booleandefault
falsehint.paramName
在函式呼叫處提示參數名。
type
stringenum
"All": 所有類型的參數均進行提示。"Literal": 只有字面常數類型的參數進行提示。"Disable": 停用參數提示。
default
"All"hint.paramType
在函式的參數位置提示類型。
type
booleandefault
truehint.semicolon
若陳述式尾部沒有分號,則顯示虛擬分號。
type
stringenum
"All": 所有陳述式都顯示虛擬分號。"SameLine": 兩個陳述式在同一行時,在它們之間顯示分號。"Disable": 停用虛擬分號。
default
"SameLine"hint.setType
在賦值操作位置提示類型。
type
booleandefault
falsehover.enable
啟用懸浮提示。
type
booleandefault
truehover.enumsLimit
當值對應多個類型時,限制類型的顯示數量。
type
integerdefault
5hover.expandAlias
是否展開別名。例如 ---@alias myType boolean|number 展開後顯示為 boolean|number,否則顯示為 myType'。
type
booleandefault
truehover.previewFields
懸浮提示檢視表時,限制表內欄位的最大預覽數量。
type
integerdefault
10hover.viewNumber
懸浮提示檢視數字內容(僅當字面常數不是十進制時)。
type
booleandefault
truehover.viewString
懸浮提示檢視字串內容(僅當字面常數包含跳脫字元時)。
type
booleandefault
truehover.viewStringMax
懸浮提示檢視字串內容時的最大長度。
type
integerdefault
1000language.completeAnnotation
(僅限VSCode)在註解後換行時自動插入 "---@ "。
type
booleandefault
truelanguage.fixIndent
(僅限VSCode)修復自動縮排錯誤,例如在有包含 "function" 的字串中換行時出現的錯誤縮排。
type
booleandefault
truemisc.executablePath
指定VSCode內的可執行文件
type
stringdefault
""misc.parameters
VSCode內啟動語言伺服時的命令列參數。
type
Array<string>default
[]nameStyle.config
設定檢查命名風格的組態。
閱讀 formatter docs 了解用法。
type
Object<string, string | array>default
{}runtime.builtin
調整內建庫的啟用狀態,你可以根據實際執行環境停用(或重新定義)不存在的庫。
default: 表示庫會根據執行版本啟用或停用enable: 總是啟用disable: 總是停用
type
object<string, string>enum
"default""enable""disable"
default
{
"basic": "default",
"bit": "default",
"bit32": "default",
"builtin": "default",
"coroutine": "default",
"debug": "default",
"ffi": "default",
"io": "default",
"jit": "default",
"jit.profile": "default",
"jit.util": "default",
"math": "default",
"os": "default",
"package": "default",
"string": "default",
"string.buffer": "default",
"table": "default",
"table.clear": "default",
"table.new": "default",
"utf8": "default"
}runtime.enableLuaJITExtensions
啟用 LuaJIT 擴充語法(需將 Lua.runtime.version 設定為 LuaJIT)。
各項擴充語法也可以單獨透過 Lua.runtime.nonstandardSymbol 啟用。
type
booleandefault
falseruntime.fileEncoding
檔案編碼,選項 ansi 只在 Windows 平台下有效。
type
stringenum
"utf8""ansi""utf16le""utf16be"
default
"utf8"runtime.meta
meta檔案的目錄名稱格式
type
stringdefault
"${version} ${language} ${encoding}"runtime.nonstandardSymbol
支援非標準的符號。請務必確認你的執行環境支援這些符號。
type
Array<string>enum
"//": 行註解(C 風格)。"/**/": 區塊註解(C 風格)。"`": 反引號字串字面量。"+=": 加法複合指定。"-=": 減法複合指定。"*=": 乘法複合指定。"/=": 除法複合指定。"%=": 取模複合指定。"^=": 冪複合指定。"//=": 地板除複合指定。"|=": 按位或複合指定。"&=": 按位與複合指定。"<<=": 左移複合指定。">>=": 右移複合指定。"||": 邏輯或(等價於 or)。"&&": 邏輯與(等價於 and)。"!": 邏輯非(等價於 not)。"!=": 不等於(等價於 ~=)。"continue":continue陳述式。"|lambda|": 管道參數短函式(|x| expr)。"?.": 安全導覽(欄位/方法:a?.b/obj?.:method()/obj:method?.())。"?.(": 安全導覽呼叫(f?.()/f?."str"/f?.{...}/f?.[[...]])。"?.[": 安全導覽索引(t?.[key])。"??": 空值合併(a ?? b,僅當左側為 nil 時取右側)。"ternary": 三元運算(cond ? x : y,右結合;x 部分禁止方法呼叫)。"~>>": 算術右移(a ~>> b,LuaJIT 特有;普通>>為邏輯右移)。"~>>=": 算術右移複合指定(a ~>>= b)。"..=": 字串連接複合指定(a ..= b)。"~=": 互斥或複合指定:僅陳述式上下文(如a ~= b單獨成行)生效;表達式中仍是不等於比較。"const":const宣告(區塊級區域常數,不可重新賦值/重複宣告)。"->": 短函式箭頭(x -> expr/|x| -> expr/|| -> expr/-> do ... end)。"number_underscore": 數字字面量底線(如1_000、0x1_2、0b1_0)。"?(": 無點號可選鏈呼叫(f?()等價於f?.();與三元(ternary)解析衝突,不建議同時啟用)。"?[": 無點號可選鏈索引(t?[1]等價於t?.[1];與三元(ternary)解析衝突,不建議同時啟用)。"?:": 無點號安全方法(obj?:get()等價於obj?.:get())。
default
[]runtime.path
當使用 require 時,如何根據輸入的名字來尋找檔案。
此選項設定為 ?/init.lua 時,代表當你輸入 require 'myfile' 時,會從已載入的檔案中搜尋 {workspace}/myfile/init.lua。
當 runtime.pathStrict 設定為 false 時,還會嘗試搜尋 ${workspace}/**/myfile/init.lua。
如果你想要載入工作區以外的檔案,你需要先設定 Lua.workspace.library。
type
Array<string>default
["?.lua","?/init.lua"]runtime.pathStrict
啟用後 runtime.path 將只搜尋第一層目錄,見 runtime.path 的說明。
type
booleandefault
falseruntime.plugin
延伸模組路徑,請查閱文件瞭解用法。
type
string | arraydefault
nullruntime.pluginArgs
延伸模組的額外引數。
type
array | objectdefault
nullruntime.special
將自訂全域變數視為一些特殊的內建變數,語言伺服將提供特殊的支援。
下面這個例子表示將 include 視為 require 。
"Lua.runtime.special" : {
"include" : "require"
}type
Object<string, string>default
{}runtime.unicodeName
允許在名字中使用 Unicode 字元。
type
booleandefault
falseruntime.version
Lua執行版本。
type
stringenum
"Lua 5.1""Lua 5.2""Lua 5.3""Lua 5.4""Lua 5.5""LuaJIT"
default
"Lua 5.4"semantic.annotation
對類型註解進行語義著色。
type
booleandefault
truesemantic.enable
啟用語義著色。你可能需要同時將 editor.semanticHighlighting.enabled 設定為 true 才能生效。
type
booleandefault
truesemantic.keyword
對關鍵字/字面常數/運算子進行語義著色。只有當你的編輯器無法進行語法著色時才需要啟用此功能。
type
booleandefault
falsesemantic.variable
對變數/欄位/參數進行語義著色。
type
booleandefault
truesignatureHelp.enable
啟用參數提示。
type
booleandefault
truespell.dict
拼寫檢查的自訂單詞。
type
Array<string>default
[]type.castNumberToInteger
允許將 number 類型賦值給 integer 類型。
type
booleandefault
truetype.checkTableShape
對表的形狀進行嚴格檢查。
type
booleandefault
falsetype.inferParamType
未註解參數類型時,參數類型由函式傳入參數推斷。
如果設定為 "false",則在未註解時,參數類型為 "any"。
type
booleandefault
falsetype.inferTableSize
在類型推斷時最多分析的表欄位數。
type
integerdefault
10type.maxUnionVariants
Missing description!!
type
integerdefault
0type.weakNilCheck
對同位類型進行類型檢查時,忽略其中的 nil。
此設定為 false 時,number|boolean 類型無法賦值給 number 類型;為 true 時則可以。
type
booleandefault
falsetype.weakUnionCheck
同位類型中只要有一個子類型滿足條件,則同位類型也滿足條件。
此設定為 false 時,number|boolean 類型無法賦值給 number 類型;為 true 時則可以。
type
booleandefault
falsetypeFormat.config
寫Lua程式碼時的格式化組態
type
object<string, string>default
{
/*
是否在合適的位置自動完成 `end`
*/
"auto_complete_end": "true",
/*
是否在宣告表的結尾自動添加分隔符號
*/
"auto_complete_table_sep": "true",
/*
是否格式化某一行
*/
"format_line": "true"
}window.progressBar
在狀態欄顯示進度條。
type
booleandefault
truewindow.statusBar
在狀態欄顯示延伸模組狀態。
type
booleandefault
trueworkspace.checkThirdParty
自動偵測與適應第三方庫,目前支援的庫為:
- OpenResty
- Cocos4.0
- LÖVE
- LÖVR
- skynet
- Jass
type
string | booleandefault
nullworkspace.ignoreDir
忽略的檔案與目錄(使用 .gitignore 語法)。
type
Array<string>default
[".vscode"]workspace.ignoreSubmodules
忽略子模組。
type
booleandefault
trueworkspace.library
除了目前工作區以外,還會從哪些目錄中載入檔案。這些目錄中的檔案將被視作外部提供的程式碼庫,部分操作(如重新命名欄位)不會修改這些檔案。
type
Array<string>default
[]workspace.maxPreload
最大預先載入檔案數。
type
integerdefault
5000workspace.preloadFileSize
預先載入時跳過大小大於該值(KB)的檔案。
type
integerdefault
500workspace.useGitIgnore
忽略 .gitignore 中列舉的檔案。
type
booleandefault
trueworkspace.userThirdParty
在這裡添加私有的第三方庫適應檔案路徑,請參考內建的組態檔案路徑
type
Array<string>default
[]--- METRICS ---
- Files Extracted: 7
- Estimated Token Budget: ~42523 tokens
- Canonical Reference: https://codewiki.google/github.com/LuaLS/lua-language-server