Mario Parra
Mario Parra

Reputation: 1554

Unable to change Beautify indent size

I'm trying to change the indent size for CSS/SCSS to two spaces in Atom Beautify, but it has no effect and the indent remains at four spaces. Even if I set it to two spaces in my .jsbeautifyrc file, it has no effect. Am I missing something?

{
    "indent_size": 2,
    "indent_char": " ",
    "indent_level": 0,
    "indent_with_tabs": false,
    "preserve_newlines": true,
    "max_preserve_newlines": 10,
    "jslint_happy": false,
    "space_after_anon_function": false,
    "brace_style": "collapse-preserve-inline",
    "keep_array_indentation": false,
    "keep_function_indentation": false,
    "space_before_conditional": true,
    "break_chained_methods": false,
    "eval_code": false,
    "unescape_strings": false,
    "wrap_line_length": 0
}

Upvotes: 1

Views: 6184

Answers (1)

Alexander Von Moll
Alexander Von Moll

Reputation: 521

atom-beautify uses its own configuration, which can be changed in the following two ways in Atom:

  1. In the Settings GUI
    • Ctrl + , to open Settings (or File > Settings)
    • Select Packages
    • Find atom-beautify and click on Settings
    • Find CSS and click to expand the Settings for CSS
    • Enter your desired indent size where it says Indent Size:
    • Repeat previous 2 steps for SCSS
  2. In config.cson
    • File > Config... to open config.cson
    • Add the following
  3. "atom-beautify":
      css:
        indent_size: 2
      scss:
        indent_size: 2
    

Upvotes: 2

Related Questions