TOML language preview
1. Package manifest
tables, strings, and arrays
horizon-dark
# project metadata
[package]
name = "svelte-highlight"
version = "1.0.0"
authors = ["Jane Doe <jane@example.com>"]
keywords = ["syntax", "highlight"] atom-one-dark
# project metadata
[package]
name = "svelte-highlight"
version = "1.0.0"
authors = ["Jane Doe <jane@example.com>"]
keywords = ["syntax", "highlight"] github-dark
# project metadata
[package]
name = "svelte-highlight"
version = "1.0.0"
authors = ["Jane Doe <jane@example.com>"]
keywords = ["syntax", "highlight"] dracula
# project metadata
[package]
name = "svelte-highlight"
version = "1.0.0"
authors = ["Jane Doe <jane@example.com>"]
keywords = ["syntax", "highlight"] nord
# project metadata
[package]
name = "svelte-highlight"
version = "1.0.0"
authors = ["Jane Doe <jane@example.com>"]
keywords = ["syntax", "highlight"] github
# project metadata
[package]
name = "svelte-highlight"
version = "1.0.0"
authors = ["Jane Doe <jane@example.com>"]
keywords = ["syntax", "highlight"] 2. Numbers and dates
hex/octal/binary, floats, and RFC 3339 dates
horizon-dark
[build]
threads = 8
ratio = 0.75
mask = 0xDEAD_BEEF
permissions = 0o755
flags = 0b1010
released = 2024-01-02T10:30:00Z atom-one-dark
[build]
threads = 8
ratio = 0.75
mask = 0xDEAD_BEEF
permissions = 0o755
flags = 0b1010
released = 2024-01-02T10:30:00Z github-dark
[build]
threads = 8
ratio = 0.75
mask = 0xDEAD_BEEF
permissions = 0o755
flags = 0b1010
released = 2024-01-02T10:30:00Z dracula
[build]
threads = 8
ratio = 0.75
mask = 0xDEAD_BEEF
permissions = 0o755
flags = 0b1010
released = 2024-01-02T10:30:00Z nord
[build]
threads = 8
ratio = 0.75
mask = 0xDEAD_BEEF
permissions = 0o755
flags = 0b1010
released = 2024-01-02T10:30:00Z github
[build]
threads = 8
ratio = 0.75
mask = 0xDEAD_BEEF
permissions = 0o755
flags = 0b1010
released = 2024-01-02T10:30:00Z 3. Nested tables and inline tables
array-of-tables and dotted keys
horizon-dark
[server]
host = "localhost"
port = 8080
[database]
connection = { user = "admin", timeout = 30 }
ssl.enabled = true
[[server.endpoints]]
path = "/api"
methods = ["GET", "POST"] atom-one-dark
[server]
host = "localhost"
port = 8080
[database]
connection = { user = "admin", timeout = 30 }
ssl.enabled = true
[[server.endpoints]]
path = "/api"
methods = ["GET", "POST"] github-dark
[server]
host = "localhost"
port = 8080
[database]
connection = { user = "admin", timeout = 30 }
ssl.enabled = true
[[server.endpoints]]
path = "/api"
methods = ["GET", "POST"] dracula
[server]
host = "localhost"
port = 8080
[database]
connection = { user = "admin", timeout = 30 }
ssl.enabled = true
[[server.endpoints]]
path = "/api"
methods = ["GET", "POST"] nord
[server]
host = "localhost"
port = 8080
[database]
connection = { user = "admin", timeout = 30 }
ssl.enabled = true
[[server.endpoints]]
path = "/api"
methods = ["GET", "POST"] github
[server]
host = "localhost"
port = 8080
[database]
connection = { user = "admin", timeout = 30 }
ssl.enabled = true
[[server.endpoints]]
path = "/api"
methods = ["GET", "POST"] 4. Quoted keys
keys that need quoting: dots, spaces, and IPs
horizon-dark
[servers]
"127.0.0.1" = "localhost"
"key with spaces" = true
[servers."router.local"]
enabled = true atom-one-dark
[servers]
"127.0.0.1" = "localhost"
"key with spaces" = true
[servers."router.local"]
enabled = true github-dark
[servers]
"127.0.0.1" = "localhost"
"key with spaces" = true
[servers."router.local"]
enabled = true dracula
[servers]
"127.0.0.1" = "localhost"
"key with spaces" = true
[servers."router.local"]
enabled = true nord
[servers]
"127.0.0.1" = "localhost"
"key with spaces" = true
[servers."router.local"]
enabled = true github
[servers]
"127.0.0.1" = "localhost"
"key with spaces" = true
[servers."router.local"]
enabled = true