absop / RainbowBrackets

A rainbow brackets plugin for SublimeText4.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Syntax specific color schemes not applied correctly on startup

themilkman opened this issue · comments

Hi there,

I see a strange behavior with syntax specific color schemes in combination with RainbowBrackets.
The details are described in:
sublimehq/sublime_text#4000
I am yet not sure if it is only my setup but the problem described stopped reproducible when I disable the RB package.

Is someone else able to reproduce it?

Cheers and thanks for all the rainbows! :)

Aha, It's a bug of RB. syntax specific color schemes are not currently considered.

@themilkman The latest version of the mater branch should fix this issue, can you give it a try?

Hi @absop , it works now!

Thank you very much for taking a look into it an create a fix!! 🙏 :-)

Huh, I have no I idea what happened/what I did but my impression is that RBB was disabled when I tested it and my mind was in another dimension. Now I realized that the issue still persists and the behavior is even more weird.
It seems to always recreate the CS, gets reset quite often and the corners of the brackets have little white sections.
rainbow

Sorry for my confusion... :-/

@themilkman Can you provide a larger screenshot?

The screenshot below shows an JS file on the left (default with CS applied) and the same CS as Syntax specific on a ruby file on the right:

rainbow2

For the records: https://github.com/themilkman/sublime-toxinated is the CS

Can you put your code and "rainbow_colors" setting here?

Sure

/*
  RainbowBrackets user settings in here override the default
*/
{
    "default_config": {
        "bracket_pairs": {
            "(": ")",
            "[": "]",
            "{": "}"
        },
        "coloring": false,
        "enabled": true,
        "ignored_scopes": [
            "comment",
            "string",
            "constant"
        ],
        "rainbow_colors": [
            "#FFFFFF",
            "#FF6A00",
            "#FFD800",
            "#00FF00",
            "#0094FF",
            "#0041FF",
            "#7D00E5"
        ],
        "mismatch_color": "#FF0000"
    },
    "syntax_specific": {
        "Ruby": {
            "bracket_pairs": {
                "(": ")",
                "{": "}",
                "[": "]",
            },
            "extensions": [
                ".haml",
                ".slim",
                ".rb",
                ".erb",
            ],
            "ignored_scopes": [
                "comment",
                "string"
            ]
        },

        "JSON": {
            "bracket_pairs": {
                "{": "}",
                "[": "]",
            },

            "extensions": [
                ".json",
                ".sublime-settings",
                ".sublime-menu",
                ".sublime-build",
                ".sublime-keymap",
                ".sublime-commands",
                ".sublime-theme",
                ".sublime-color-scheme"
            ],

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

Ruby.sublime-settings:

{
  "extensions":
  [
    "axlsx"
  ],
  "color_scheme": "Packages/User/Toxinated.sublime-color-scheme"
}

The source was randomly chosen (smth public for the screenshot), in this case it was part of the https://github.com/redmine/redmine repo

I still can't see anything unusual in the picture you gave above.
Can you describe the problem in this picture

Oh, I saw the white dots.

I think this is the same as #22, compare the two screenshots below, note the cursor position, ignore the right side

image

image