Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for php+html #190

Open
gcb opened this issue Oct 3, 2023 · 5 comments
Open

support for php+html #190

gcb opened this issue Oct 3, 2023 · 5 comments

Comments

@gcb
Copy link

gcb commented Oct 3, 2023

Most php syntax files work with phpRegion and use php or html syntax as appropriate. With Rainbow Eanbled, it all become php.

for example, without Rainbow:
image

After :RainbowToggle:
image

I'm not well-versed in vim's syntax code... but i can see that it already includes containedin=@htmlPreproc which should have limited these synIDs into the php region...?

@gcb
Copy link
Author

gcb commented Oct 3, 2023

oh. i just realized it is coloring the html tags in the same colors as the parentheses...

but in the process it is also killing all other information, such as showing attributes etc. Not to mention the contents of tags such as script/style which show up fine with rainbow off.

@luochen1990
Copy link
Owner

Yes, there is limit about highlighting html tags.

@gcb
Copy link
Author

gcb commented Oct 10, 2023

thanks @luochen1990

Is there an option to keep levels in php but disable on html code? or should i try to add one?

@1030504258
Copy link

我觉得 可以像 sublime text 的彩虹括号插件一样,按不同语言或不同文件格式单独定制需要高亮的括号

https://github.com/absop/RainbowBrackets

@1030504258
Copy link

我觉得 可以像 sublime text 的彩虹括号插件一样,按不同语言或不同文件格式单独定制需要高亮的括号

https://github.com/absop/RainbowBrackets

{
    "debug": false,

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

        "coloring": false,

        "enabled": true,

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

        "color.error": "#FF0000",

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

    },

    "syntax_specific": {
        "Scheme": {
            "coloring": true,

            "extensions": [".scm", ".ss"],

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

        "JSON": {
            "coloring": true,

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

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants