Php Tools changes my own code style (I attach two screenhots). It is posiible to kepp my colors and styles?

Best
Jacek

    JacekS The extension does not change the VSCode color theme.

    It adds colors to the PHPDoc blocks (which can be turned off using setting "php.docblock.colorMode":

    For the color theme, use the Color Theme command (F1):

      It doesn't work. I tried it earlier :). I have color theme:

      And both of options in Color Mode don't work:


      I use extension 'Syntax Highlighter' and my own extension for colorize some words. Maybe it is a problem?

        JacekS yes, this must be caused by another extension. PHP extension does not add or modify color themes.

          I think that is PHP Tools problem (cooperation with other extensions). And when I change Color Mode option, PHP Tools changes docblock colors... Without PHP Tools I get correct style and colors. And when I enable PHP Tools I observe that for a second styles are correct, and after one second change for incorrect. Will you try fix this bug?

            JacekS those colors are not from our extension :-) we don't provide any color information in our package.

            The only thing I can think of is that you previously had .php files associated with a different "language", which affects colors:

              I'm sorry for this discussion, but I like PHP Tools and I wolud buy it. But code styles and colors are important for me. Jakub pls - I didn't change language :). And I probably know where is the problem. When I choose option 'fallback' in Color Mode - I get colors (and styles) from theme. But - I have my VSCODE settings 'editor.semanticTokenColorCustomizations':

              And I think, that PHP Tools removes/disregards those settings.

                JacekS I'm only aware of PHPDoc colors, the extension contributes to keyword.other.phpdoc.php scope with the setting "semanticTokenScopes" so we can highlight keywords in PHPDoc correctly.

                If you see our extension's package.json, please try removing "semanticTokenScopes" if that helps.

                  It works :). Thank you very much.

                    JacekS Thank you for the help.

                    I'll review if there are some settings we can workaround this because the "semanticTokenScopes" configuration were necessary for the PHPDoc colors to work correctly :)

                      I understand. But maybe you replace this 'semanticTokenScopes' and should merge? check if exists? Or change one rule 'comment' not all of rules?

                        JacekS it's something we can't enable dynamically.

                        I still don't understand how this can affect your colors outside the /**PHPDoc*/ tokens.

                          JacekS Interesting! Yes, both extensions update "semanticToken***" VSCode configuration; but seemingly unrelated scopes.

                          Do you have your settings publically available so I can test it?

                            No, but I can give you that:

                                "editor.semanticTokenColorCustomizations": {
                                    "rules": {
                                        "comment": {
                                            "foreground": "#BABDB6",
                                            "fontStyle": "italic"
                                        },
                                        "type": "#138159",
                                        "function": {
                                            "foreground": "#000000",
                                            "italic": true
                                        },
                                        "variable": "#000000",
                                        "number": "#90A4AE",
                                        "string": "#006eff",
                                        "macro": "#FF0000",
                                        "keyword": "#FF0000",
                                        "type.modification": {
                                            "foreground": "#C21B30"
                                        },
                                        "publickeyword": "#00FF00"
                                    }
                                },
                            Write a Reply...