Keywords — the full, up-to-date list is generated from the single source of truth apps/webui/src/lang-tdsl/keywords.json (see BLOCK_KEYWORDS / ITEM_KEYWORDS / MISC_KEYWORDS); this extension's grammar (syntaxes/tdsl.tmLanguage.json) is regenerated from it via npm run prebuild in apps/webui
String literals, comments (// and /* */)
Wikidata entity IDs (Q123), property IDs (P569), and references (wd:Q123)
Wikidata expressions: claim(P571).year, label@ja
Numeric literals including negative years (e.g. -221 for 221 BCE)
Language Server (LSP) — requires tdsl binary
When the tdsl CLI is installed, this extension automatically starts the LSP server (tdsl lsp) and provides:
Diagnostics — error and warning highlighting, updated on every edit
Hover — lane label/kind/order on hover; QID hover shows cached entity info (cache is populated by tdsl build or tdsl render; shows a hint if not cached)
Go to Definition — jump to lane declarations
Find References — find all usages of a lane ID
Rename — rename a lane and all its references (only lanes declared with an explicit as <alias>; auto-slug lanes are not renameable)
Code Actions — quick fixes from tdsl lint
Document Symbols — outline view and breadcrumb navigation
Formatting — format the document (comments are preserved like tdsl fmt; comments inside blocks may be relocated to canonical positions)
Path to the tdsl binary. If empty, the binary is resolved from PATH.
Example
// Chinese Dynasties Timeline
timeline "Chinese Dynasties" {
unit year;
range -500..2000;
calendar proleptic_gregorian;
}
lane "Qin" as qin { kind dynasty; order 10; }
lane "Han" as han { kind dynasty; order 20; }
span qin -221..-206 "Qin Dynasty" { source wd:Q7183; };
span han -206..220 "Han Dynasty" { source wd:Q7209; };
event qin -221 "Unification of China" {};
// Import from Wikidata
import wikidata as wd {
entity Q7209 as han_entity;
}
map wd.han_entity to span {
lane han;
label label@en;
start claim(P571).year;
end claim(P576).year;
}