The lat.md format uses Obsidian-style wiki links [[target]] or [[target|alias]] to create connections between markdown sections and source code symbols.
Markdown Section Links
Targets are hierarchical paths starting from the vault root (the project directory). All paths must include the lat.md/ prefix.
Resolution Rules:
[[foo]]: Links to the root section of foo.md.[[foo#Bar]]: Links to heading Bar in foo.md. The path after # must be an exact heading chain (e.g., [[file#Heading1#Heading2]]).[[path/foo#Bar]]: Fully qualified link to path/foo.md at heading Bar.
Source Code Links
You can link directly to symbols in supported languages (.ts, .tsx, .js, .jsx, .py, .rs, .go, .c, .h).
- TypeScript/JavaScript:
[[src/config.ts#getConfigDir]] (function) or [[src/server.ts#App#listen]] (method on class). - Python:
[[file.py#my_func]] (functions, classes, methods, or module-level variables). Decorators are unwrapped automatically. - Rust:
[[file.rs#Type#method]] (functions, structs, enums, traits, impl methods, consts, statics, type aliases). - Go:
[[file.go#Type#Method]] (functions, types, methods with receivers, consts, vars). - C:
[[file.h#Struct#field]] (functions, structs, fields, enums, typedefs, #define macros, variables).
Note: Source code references always require the full path; short path disambiguation does not apply to source files.
[[lat.md/guides/setup#Install]]
[[src/config.ts#getConfigDir]]
[[src/server.ts#App#listen]]
[[src/lib.rs#Greeter#greet]]