HTML括号内美化设置

HTML Beautify Settings in Brackets

我知道 Brackets Beautify extension is based on JS Beautify,因此我有一套可用的首选项设置,但我不知道如何通过 Brackets settings.json 文件更改它们。有人知道吗?

这是我当前的设置:

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

我假设我只需要添加新的 "me.drewh.jsbeautify" 行,但这似乎不起作用...

顺便说一句,我正在专门查看 HTML 设置。

与原始 library 一样,扩展使用 .jsbeautifyrc 文件进行设置。

如果您在项目根目录中创建这样一个内容如下的文件,它应该可以工作:

{
    "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"
}

另外,我只能推荐你看看我的fork of that extension as it allows more detailed settings