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

"|" symbol display error in .yml #130229

Closed
jianboy opened this issue Aug 6, 2021 · 5 comments
Closed

"|" symbol display error in .yml #130229

jianboy opened this issue Aug 6, 2021 · 5 comments
Assignees
Labels
info-needed Issue requires more information from poster

Comments

@jianboy
Copy link

jianboy commented Aug 6, 2021

The"|" symbol display to a "/".

image

Other IDE display normally:
image

@aeschli
Copy link
Contributor

aeschli commented Aug 18, 2021

What theme are you using? It seems to me that the| is rendered in italics.
To inspect this, set the cursor before the | and invoke the command Inspect editor token and scopes. If you can paste a screenshot of the inspection hover that would be great.

@aeschli aeschli added the info-needed Issue requires more information from poster label Aug 18, 2021
@jianboy
Copy link
Author

jianboy commented Aug 18, 2021

theme: Dark+

xx.yml:

image

xx.java:

image

gif:

动画 (9) (1)

@aeschli
Copy link
Contributor

aeschli commented Aug 18, 2021

As for the theme, do you mean the Dart+ or Dark+? The gif shows that you select the built-in Dark+.

The built-in Dark+ does not define 'italics for keyword.control.
Also, I can't reproduce the issue on my machine.

Did you customize the theming rules in the settings? (editor.tokenColorCustomizations)

@jianboy
Copy link
Author

jianboy commented Aug 19, 2021

I got a setting:

    "editor.fontFamily": "Monaco, 'Courier New', monospace",
    "editor.tokenColorCustomizations": {
        "comments": {},
        "keywords": {
            "fontStyle": "italic",
            // "foreground": "#ffee00"
        },
        "functions": {
            "fontStyle": "bold",
            // "foreground": "#15ff00"
        },
    },

But, "|" is not a keywords in *.yml.

@aeschli
Copy link
Contributor

aeschli commented Aug 19, 2021

That explains what you see. The YAML grammar gives the | the keyword.control scope, which is typically used for keywords like if, switch.
You can file an issue against the YAML grammar (https://github.com/textmate/yaml.tmbundle) and argue that the '|' should not be classified as a keyword.

@aeschli aeschli closed this as completed Aug 19, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Oct 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

2 participants