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

Syntax highlighting does not work for me #396

Closed
slavizh opened this issue Aug 31, 2020 · 13 comments · Fixed by #2276
Closed

Syntax highlighting does not work for me #396

slavizh opened this issue Aug 31, 2020 · 13 comments · Fixed by #2276
Assignees
Labels
bug Something isn't working revisit

Comments

@slavizh
Copy link
Contributor

slavizh commented Aug 31, 2020

I have installed the bicep VSC extension but I do not see any highlighting.
What information you need to troubleshoot?

image

@ghost ghost added the Needs: Triage 🔍 label Aug 31, 2020
@alex-frankel
Copy link
Collaborator

Can you add OS information as well as your VS code version (code --version)?

@slavizh
Copy link
Contributor Author

slavizh commented Sep 1, 2020

Sent info via e-mail

@georgechang
Copy link

I'm seeing the same issue on my end. VS Code 1.48.2 x64 on Win10.

@mattias-pedersen
Copy link

mattias-pedersen commented Sep 2, 2020

I had the same problem for the syntax problem. I changed back to "Dark+ (Default dark)" theme and now it works for me. Does not work with any custom or marketplace themes for me.

@majastrz
Copy link
Member

majastrz commented Sep 2, 2020

@blobbylight that's super helpful actually. Are these themes you made or one from the vs code marketplace? If it's the latter, can you give us their names so we can try to repro the issue?

@mattias-pedersen
Copy link

@majastrz I used slime from the marketplace and that one did not work.
Below is the themes i found not working and some not working to 100%

Slime (marketplace) - not working
Atom one dark - not working
Powershell ISE - not working

Light (visual studio) - not working to 100% some parameters are not highlighted
Dark (visual studio) - not working to 100% some parameters are not highlighted

@slavizh
Copy link
Contributor Author

slavizh commented Sep 2, 2020

I am with. It is marketplace theme.

image

@georgechang
Copy link

georgechang commented Sep 2, 2020

Nice catch @blobbylight! I'm using this theme from the marketplace that doesn't work:
https://marketplace.visualstudio.com/items?itemName=mischah.relaxed-theme

Confirmed that it works in a bunch of standard VS Code themes but none of the custom ones.

@anthony-c-martin
Copy link
Member

Thanks to @blobbylight for figuring this out!

I believe we need to configure the following for this to work:
https://code.visualstudio.com/api/language-extensions/semantic-highlight-guide#semantic-token-scope-map

@anthony-c-martin anthony-c-martin added this to the v0.2 milestone Sep 2, 2020
@anthony-c-martin anthony-c-martin self-assigned this Sep 2, 2020
@shenglol
Copy link
Contributor

shenglol commented Sep 2, 2020

@slavizh @blobbylight Some custom themes don't enable semantic syntax highlighting. You can override that for a specific theme with the following VSCode settings for now until we implement scope map:

    "editor.semanticHighlighting.enabled": true,
    "editor.semanticTokenColorCustomizations": {
        "[Atom One Dark]": {
            "enabled": true
        }
    }

@alex-frankel
Copy link
Collaborator

Some this will be mitigated by completing #268. In the meantime, you can use @shenglol's fix.

We could potentially trigger something in the extension if we identify this and let user's turn it on.

@alex-frankel alex-frankel added bug Something isn't working and removed Needs: Triage 🔍 labels Sep 3, 2020
@anthony-c-martin
Copy link
Member

FYI, looks like this is being worked on for Atom One Dark here. I expect as more and more extensions take advantage of semantic colorization, it'll gain wider adoption across other themes.

@alex-frankel
Copy link
Collaborator

We think this will get better over time as more themes adopt semantic highlighting, and there is not much more we can do other than to auto-detect when this occurs. Closing for now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working revisit
Projects
None yet
7 participants