Skip to content

Configuration

CosmoQuickView reads configuration from ~/.config/cosmoquicklook/config.yaml. Settings take effect immediately in Quick Look previews — the renderer reads config automatically when generating HTML.

Quick Setup

bash
# View current config
cosmoquicklook config

# Set a value
cosmoquicklook set theme dracula
cosmoquicklook set enable_mathjax true
cosmoquicklook set font_size large
cosmoquicklook 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
cosmoquicklook config          # Show current config
cosmoquicklook config --init   # Create config with defaults
cosmoquicklook set <key> <value>  # Set a config value

Line Numbers

Enable line numbers to display line counts alongside code:

bash
cosmoquicklook set line_numbers true