Skip to content

Using alacritty-themes deindent commented out sections in the default yaml file #259

@Naeddyr

Description

@Naeddyr

Trying out alacritty for the first time, and came across this; also first time configuring anything with YAML.

When alacritty-themes is run to change the configuration yaml-file, it deindents commented lines in the default alacritty.yaml you can get from here.

Example configuration:

# Font configuration
#font:
  # Normal (roman) font face
  #normal:
    # Font family
    #
    # Default:
    #   - (macOS) Menlo
    #   - (Linux/BSD) monospace
    #   - (Windows) Consolas
    #family: monospace

    # The `style` can be specified to pick a specific face.
    #style: Regular

is turned into:

# Font configuration
#font:
# Normal (roman) font face
#normal:
# Font family
#
# Default:
#   - (macOS) Menlo
#   - (Linux/BSD) monospace
#   - (Windows) Consolas
#family: monospace
# The `style` can be specified to pick a specific face.
#style: Regular

The comments are indented before the #, so apparently whatever yaml-parser is being used by alacritty-themes removes the "superfluous" white-space before it, breaking the formatting of the commented example yaml-sections and breaking the configuration without apparent cause.

I'm not sure where the issue really should be put, alacritty project (the comment indenting could be done differently) or here (the comment indenting is affecting this project and maybe there's a yaml flag that lets you keep all whitespace), but it's more likely someone will care about it here, so here you go.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions