.emmyrc.json.
Complete Configuration Example
View Complete Configuration Template
View Complete Configuration Template
Code Actions
Configure code quick fixes and refactoring operations.Insert space when adding
@diagnostic disable-next-line after --- comments.Example
Example
When When
true:false:Code Lens
CodeLens provides inline actionable information in your code.Enable or disable CodeLens functionality. CodeLens displays contextual information above functions, classes, and other declarations.
Completion
Intelligent code completion configuration for enhanced coding efficiency.Enable or disable code completion feature.
Automatically insert call to
require when autocompletion inserts objects from other modules.The function name used for auto-requiring modules. Useful for custom module systems.
The naming convention for auto-required filenames.Options:
keep: Keep original filenamecamel-case: Convert to camelCasesnake-case: Convert to snake_casepascal-case: Convert to PascalCasekeep-class: Use class name when returning class definition, otherwise keep original
Separator used in auto-require paths.
Enable function call snippets in completions. When enabled, function completions include parameter placeholders.
Symbol used to trigger postfix autocompletion.Options:
@, ., :Postfix Completion Example
Postfix Completion Example
Whether to include the name in base function completion.
Diagnostics
See the Diagnostics Configuration page for detailed information about diagnostic settings.Enable or disable the diagnostic system.
Delay between opening/changing a file and scanning it for errors, in milliseconds.
Documentation
Configure how documentation comments are parsed and displayed.Documentation comment syntax type.Options:
md: Markdown syntaxmyst: MyST (Markedly Structured Text) syntaxrst: reStructuredText syntaxnone: No special syntax parsing
List of custom documentation tags that should be recognized by the analyzer.
Treat specific field names as private. Fields matching these patterns can only be accessed in the class where they’re defined.
Document Color
Color highlighting for color values in strings.Enable parsing strings for color tags and showing a color picker next to them.
Example
Example
Formatting
See the Formatting Configuration page for detailed information about formatting settings.Hover
Configure hover documentation display.Enable showing documentation on hover.
The detail level of hover information. Default is
null (use default detail level). Set to a number between 1 and 255 to customize the verbosity of hover information.Inline Hints
Intelligent inline hint system for viewing type information without mouse hover.Enable or disable inline hints globally.
Show function parameter names and types as inline hints.
Show named array indexes for multi-line table indexing.
Show type hints for local variables.
Show hints when methods override functions from base class.
Show hint when calling an object results in a call to its metatable’s
__call function.Show name of enumerator when passing a literal value to a function that expects an enum.
Inline Values
Display variable values inline during debugging.Show inline values during debug sessions.
References
Configure how symbol references are found.Enable searching for symbol usages.
Use fuzzy search when searching for symbol usages and normal search didn’t find anything. This helps find references even when symbol names don’t exactly match.
Also search for symbol usages in string literals. Useful for finding dynamic references but may produce false positives.
Resource Paths
Configure resource file directories for path completion.List of resource file root directories. Configuring resource directories allows EmmyLua to provide file path completion and navigation.
Runtime
Configure Lua runtime environment and version features.Lua version selection.Options:
Lua5.1: Classic versionLuaJIT: High performance JIT compilerLua5.2: Enhanced featuresLua5.3: Integer supportLua5.4: Latest stable featuresLua5.5: Experimental featuresLuaLatest: Latest feature set
List of functions that behave like
require. The analyzer will treat these functions similarly to require for module resolution.Framework version identifiers. Used to load framework-specific definitions.
Additional file extensions to recognize as Lua files.
Require pattern matching rules. Defines how module paths are resolved.
Enable non-standard Lua symbols.Options:
// (C++ style comments), /**/ (C style block comments), ` (backticks), +=, -=, *=, /=, %=, ^=, //=, |=, &=, <<=, >>=, ||, &&, !, !=, continueMap special function names to their behavior types.Options:
require, error, assert, type, setmetatableSemantic Tokens
Configure semantic syntax highlighting.Enable semantic tokens for enhanced syntax highlighting based on code analysis.
Render Markdown/RST in documentation. Requires
doc.syntax to be set for this option to have effect.Signature Help
Configure function signature help.Show detailed function signature help with parameter types and descriptions.
Strict Mode
Strict mode configuration controls the strictness of type checking and code analysis.When enabled, require paths must start from specified root directories. When disabled, flexible path resolution is used.
When enabled, manual overload definitions are required for callable types. When disabled, calling a type returns the type itself.
When enabled, strict adherence to array indexing rules is enforced. Arrays must use integer indices.
When enabled, meta definitions (from libraries) override definitions in files. When disabled, behavior is similar to
lua-language-server.Base constant types defined in doc can match base types. For example, allows
int to match ---@alias id 1|2|3, same for string literals.Limits visibility of third-party libraries. When enabled, libraries must use
---@export global annotation to be importable.Workspace
Workspace and project structure configuration.List of directories to ignore. Supports both relative and absolute paths.
Glob pattern-based file ignore rules.
Library directory paths. Can be a simple string path or an object with path and ignore rules.
Workspace root directory list for multi-root workspaces.
Package directories. Treats the parent directory as a library, but only adds files from the specified directory.
File encoding format. Change this if your project uses a different encoding.
Module path mapping rules using regular expressions.
Delay between changing a file and triggering full project reindex, in milliseconds.
Enable full project reindex after changing a file. This can be resource-intensive for large projects.
