Sublime Forum

How to get Rainbow Brackets by default per language

#1

RainbowBrackets works great with Scheme and Lisp. But, each time I create a new Scheme file I need to invoke RainbowBrackets: Make Rainbow. Not a big deal, but it would be nice if it were on for languages in in the include list.

Possible?

0 Likes

#2

I had the same issue. Only way I was able to get it to work was by creating a new “default_config” and setting “coloring” to true in User Settings (Preferences > Package Settings > Rainbow Brackets > Settings). You can also add additional language-specific settings to that file, if you so desire:

{
   "default_config": {

        "bracket_pairs": {
            "(": ")",
            "[": "]",
            "{": "}"
        },

        "coloring": true,  // <--set this to true to turn on coloring by default

        "enabled": true,

        "ignored_scopes": [
            "comment",
            "string",
            "constant"
        ],

        "rainbow_colors": [
            "#FF0000", // level0
            "#FF6A00", // level1
            "#FFD800", // level2
            "#00FF00", // level3
            "#0094FF", // level4
            "#0041FF", // level5
            "#7D00E5"  // level6
        ],

        "mismatch_color": "#FF0000"
    },

    "syntax_specific": {
        "TypeScript": {
            "coloring": true,
            "bracket_pairs": {
                "(": ")",
                "[": "]",
                "{": "}"
            },
            "extensions": [".ts", ".tsx"],

            "ignored_scopes": ["keyword", "comment", "string"]
        }
    }
}
1 Like

#3

Just adding “coloring”: true, as the sole single entry in my settings “default-config” did the trick for every language.

Thanks.

0 Likes