Overview
@source links generated annotations back to their original source.
For local source URIs such as file:///..., GLuaLS uses @source as a Go to Definition redirect. For web URLs such as https://..., GLuaLS treats the URL as external documentation. Hover can show it as a clickable Source link without replacing the real code definition target.
When hover shows a symbol with @source, GLuaLS renders the source URI as a clickable Markdown link.
Use this in generated annotation files that point back to a real source file or an external reference page.
Syntax
@source accepts either a bare URI or a URI followed by #line:column.
file:///...for local files used by Go to Definitionhttps://...for web links shown from hover, not used as definition locations- A bare local URI opens the target at
0:0 lineandcolumnuse zero-based positions when present#l41:0is also accepted for the line part
Usage
Use this in generated stubs when you want Go to Definition to jump from a stub to the real implementation.Player:SetHealth(), GLuaLS opens the @source target instead of the stub.
For generated wiki annotations, you can also point directly at a page: