RainbowBrackets icon indicating copy to clipboard operation
RainbowBrackets copied to clipboard

Syntax specific color schemes not applied correctly on startup

Open themilkman opened this issue 4 years ago • 11 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! :)

themilkman avatar Mar 27 '21 22:03 themilkman

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

absop avatar Feb 03 '22 15:02 absop

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

absop avatar Feb 10 '22 15:02 absop

Hi @absop , it works now!

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

themilkman avatar Feb 11 '22 07:02 themilkman

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 avatar Feb 15 '22 13:02 themilkman

@themilkman Can you provide a larger screenshot?

absop avatar Feb 15 '22 15:02 absop

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

themilkman avatar Feb 16 '22 07:02 themilkman

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

absop avatar Feb 16 '22 16:02 absop

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

themilkman avatar Feb 17 '22 07:02 themilkman

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

absop avatar Feb 17 '22 10:02 absop

Oh, I saw the white dots.

absop avatar Feb 17 '22 10:02 absop

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

image

image

absop avatar Feb 18 '22 12:02 absop