Skip to content

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 dark

Configuration 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 | dark

Themes ​

ThemeDescription
githubLight theme matching GitHub (default)
monokaiDark theme with vibrant colors
draculaDark purple theme
customUse 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 value

Line Numbers ​

Enable line numbers to display line counts alongside code:

bash
cosmoscope set line_numbers true