Overview
@fileparam sets a default type for any parameter with the same name in the current file. Functions without an explicit @param for that name use the file-level default.
Syntax
Usage
Precedence
If GLuaLS cannot infer the parameter type from the function signature or owning type, it checks these sources in order:- Explicit
@paramannotation on the function itself @fileparamfor the current filegmod.fileParamDefaultsin.gluarc.json: workspace-wide defaults
Override with @param
If one function in the file needs a different type for the same parameter name, add@param to that function:
Workspace defaults
Set defaults for all files in the workspace:.gluarc.json
Common patterns
GMod addons reuse parameter names such asply, attacker, and victim. Use @fileparam or workspace defaults to avoid repeated @param annotations: