Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Naeddyr opened this issue Jul 18, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@Naeddyr
Copy link

Naeddyr commented Jul 18, 2023

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.

@Naeddyr Naeddyr added the bug Something isn't working label Jul 18, 2023
@rajasegar
Copy link
Owner

@Naeddyr I think the problem is we are not properly stringifying the yaml document with proper indentation
https://github.com/rajasegar/alacritty-themes/blob/5438488f67665640987bde3033851d4081d7531c/index.js#L98C25-L98C25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants