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

PHP 8 named arguments color #663

Closed
asolux opened this issue Dec 9, 2021 · 6 comments
Closed

PHP 8 named arguments color #663

asolux opened this issue Dec 9, 2021 · 6 comments
Labels

Comments

@asolux
Copy link

asolux commented Dec 9, 2021

There are a mish mash coloring for the PHP 8 named arguments.

Screenshot:
Unbenannt-1

For reproduction:

<?php

sample('string', param: 1);
figure(sprintf('pattern %d', 1), param: 1);
type(Class::func(), param: 1);
throw new \Exception(sprintf('pattern %d', 1), param: 1);
type(
    Class::func(), 
    param: 1
);
throw new \Exception(
    "Error Processing Request",
    param: 1,
    option: 0
);
Class::func('string', mode: 0);
type(Class::func(), param: 1);

Screenshot of the code above:
Code_78RC6Ix1z4

Thank you for your great work!

@asolux asolux added the bug label Dec 9, 2021
@Binaryify
Copy link
Owner

Binaryify commented Dec 12, 2021

is this what you want ?
image

@asolux
Copy link
Author

asolux commented Dec 12, 2021

You forgot the colons. 😀😉
I am not familiar with the color themes. But as far as I have seen the "php 8 named arguments" cannot be identified. The orange colored ones are constants? Am I correct? I personally would like it in gray - or I would change it to gray. However, if they cannot be identified, that is not possible. (?)

Code_BKI3L5isj4
Code_BlsWgpf2LM
Code_un8zvoln8m

@Binaryify
Copy link
Owner

image
how about this

@asolux
Copy link
Author

asolux commented Dec 13, 2021

Looks good! 🙂 How can I do that?

@Binaryify
Copy link
Owner

you can add this snippet in your settions.json before I release next version

"editor.tokenColorCustomizations": {
    "[One Dark Pro]": {
      "textMateRules": []
    },
    "textMateRules": [
      {
        "name": "php scope",
        "scope": "entity.name.variable.parameter.php,punctuation.separator.colon.php,constant.other.php",
        "settings": {
          "foreground": "#abb2bf"
        }
      },
    ]
  },

@asolux
Copy link
Author

asolux commented Dec 13, 2021

Great! Seems to be working fine. However, I still added the entity.name.goto-label.php key.
If I notice anything else, I'll get in touch again.
Thanks!

@asolux asolux closed this as completed Dec 13, 2021
Binaryify added a commit that referenced this issue Dec 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants