Configuration
Cosmoscope reads configuration from ~/.config/cosmoscope/config.yaml. Settings take effect immediately in Quick Look previews — the renderer reads config automatically when generating HTML.
Quick Setup
bash
# View current config
cosmoscope config
# Set a value
cosmoscope set theme dracula
cosmoscope set enable_mathjax true
cosmoscope set font_size large
cosmoscope set light_dark_mode darkConfiguration File
yaml
theme: github # github | monokai | dracula | custom
custom_theme_path: "" # Path to custom CSS (only when theme: custom)
enable_mathjax: false # Render math expressions in Markdown
enable_mermaid: false # Render Mermaid diagrams in Markdown
font_size: normal # small | normal | large
line_numbers: false # true | false — show line numbers in previews
light_dark_mode: auto # auto | light | darkThemes
| Theme | Description |
|---|---|
github | Light theme matching GitHub (default) |
monokai | Dark theme with vibrant colors |
dracula | Dark purple theme |
custom | Use your own CSS file via custom_theme_path |
Config Commands
bash
cosmoscope config # Show current config
cosmoscope config --init # Create config with defaults
cosmoscope set <key> <value> # Set a config valueLine Numbers
Enable line numbers to display line counts alongside code:
bash
cosmoscope set line_numbers true