Three ways to write structured config
Standard tables — [section]
A line that starts with [name] opens a new table. All keys after it (until the next table header) belong to that table. Names follow key syntax (bare or quoted, dotted for nested).
Nested tables — [section.subsection]
Dots in the table header create nesting. [server.database] is the database table inside the server table.
Inline tables — { key = value, ... }
Curly-brace tables fit on one line. Use them for small inline objects (a single point, a single config value) where a full [section] would feel heavy. Inline tables are self-contained — once written, they cannot be added to with later [section] headers.
Order matters less than YAML
You can write [a.b] before [a], or skip [a] entirely (it implicitly exists). The parser figures it out. The cost is that re-reading the file in source order doesn't always match the parsed structure — a small price for flexibility.
[server], you can't write [server] again later. Keep all of a table's keys under one header. (Sub-tables and arrays-of-tables are different — the next lesson covers those.)