settingsadobe-bracketsjs-beautify

HTML Beautify Settings in Brackets


I understand that the Brackets Beautify extension is based on JS Beautify, and that I have a suite of preference settings available because of that, but I have no idea of how to alter them through the Brackets settings.json file. Does anyone have any idea?

Here are my current settings:

   {
        "debug.showErrorsInStatusBar": false,
        "linting.collapsed": true,
        "wordWrap": false,
        "me.drewh.jsbeautify.on_save": false,
        "styleActiveLine": true,
        "themes.theme": "explicit-brackets-style",
        "fonts.fontSize": "12px"
    }

I'm assuming I just need to add new "me.drewh.jsbeautify" lines, but that doesn't seem to work...

I'm specifically looking at HTML settings, BTW.


Solution

  • Like the original library the extension uses a .jsbeautifyrc file for the settings.

    It should work if you create such a file in your project root with content like this:

    {
        "eol": "\n",
        "end_with_newline": true,
        "preserve_newlines": true,
        "max_preserve_newlines": 10,
        "indent_inner_html": false,
        "brace_style": "collapse",
        "indent_scripts": "normal",
        "wrap_line_length": 0,
        "wrap_attributes": "auto"
    }
    

    Additionally, I can only recommend you to have a look at my fork of that extension as it allows more detailed settings.