Skip to content

Bug: no error output for missing theme colors when themes is not a section in config file #2755

@ghost

Description

Summary

Theme error reporting works with this structure:

.config
    └── zellij
        └── config.kdl    <-- themes section in this file

But it does not work with this structure

.config
    └── zellij
        ├── config.kdl
        └── themes
            └── themes.kdl    <-- themes section in this file

Basic information

zellij --version: zellij 0.38.0

Further information

Reproduction steps

  1. Create a theme with a missing theme color in the themes config directory
  2. Run zellij

Noticeable behavior

  • If the themes section is inside the config file, zellij outputs the miette fancy-formatted error when using a theme with a missing theme color .
Output
   × Failed to parse Zellij configuration
     ╭─[/home/user/.config/zellij/config.kdl:140:1]
 140 │     themes {
 141 │ ╭─▶     default {
 142 │ │           fg "#ffffff" 
 143 │ │           bg "#ffffff" 
 144 │ │           black "#ffffff"
 145 │ │           red "#ffffff"
 146 │ │           green "#ffffff"
 147 │ │           yellow "#ffffff"
 148 │ │           blue "#ffffff"
 149 │ │           magenta "#ffffff"
 150 │ │           cyan "#ffffff" 
 151 │ ├─▶         white "#ffffff" 
     · ╰──── Missing theme color: orange
 152 │         }
 153 │     }
     ╰────
  help: For more information, please see our configuration guide: https://
        zellij.dev/documentation/configuration.html
  • If the themes section is stored in a themes subdirectory, zellij does not output the miette fancy-formatted error when using a theme with a missing theme color .
Output
  × Failed to parse Zellij configuration
  help: For more information, please see our configuration guide: https://
        zellij.dev/documentation/configuration.html

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions