Overview
@meta marks a file as a type-only declaration file. GLuaLS reads it for type information. Your addon does not run it.
Use this for meta libraries, including the wiki-generated Garry’s Mod annotations (view them here).
Syntax
Usage
Use meta files to define types for:- External libraries
- Built-in APIs
- Code without implementation source
Named meta files
Add a name after@meta to connect the file to a library name for documentation and tooling:
Common uses
- Bundled GMod annotations: GLuaLS ships GMod API annotations as meta files
- Third-party library stubs: declare types for libraries loaded at runtime
- Custom type files: define extra types used across your workspace
Meta files in workspace configuration
Add meta files or directories toworkspace.library so GLuaLS analyzes them without treating them as project code:
.gluarc.json
See also
- Annotations management: how the VS Code extension downloads and loads GMod annotations