-
Notifications
You must be signed in to change notification settings - Fork 46
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
subexpression marker ($ in '$(') is in scope 'punctuation.definition.variable' #132
Comments
@TylerLeonhardt would be great to have something along these lines tbh, this is such a common thing in a lot of code I see and it can look really weird in strings at the moment. 😔 |
@vexx32, in a recent PR #156 commit, I have set the Would the It might be possible to apply both scopes to the interpolated version of the definition, then support in the theme can fallback to which ever is supported. |
Hard to say from where I'm standing, I'm afraid. I'm not super familiar with how the different scopes are handled, but I'm painfully aware that a lot of themes have a bit of inconsistent support for many of the scope rules. I guess it seems logical that if we can apply multiple that are sensible, at least one of them is likely to be covered by a given theme? |
I've partially misspoke, I just found out that while VS Code's Monokai Dimmed does not highlight punctuation.section.embedded, the default Dark+/Light+ themes do. My goal is still to try to post a small PR for this and related issues. |
Disappointingly ATOM does not support specifying multiple scopes. This means that the tests in this project will fail since they are based on ATOM. :( |
Environment
Issue Description
The subexpression marker(the $ in '$(') is currently scoped in 'punctuation.definition.variable'. This causes no colorization in most schemes, such then cause colorization issues in double quoted text subexpressions.
Expected Behavior
I might think that it should be in a 'keyword' scope. To play around, I modified the VS Code powershell.tmLanguage.json file, in two places, to change the $ in '$(' to be scoped as 'keyword.other.subexpression.powershell'.
This seems to get the result with themes, causing it to colorize the same as the @ in '@(' or '@{' which also scope as a 'keyword'.
The text was updated successfully, but these errors were encountered: