Skip to content

Add coloring for $ and wordSepartors #2702

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

Merged
merged 3 commits into from
May 19, 2020

Conversation

MJECloud
Copy link
Contributor

@MJECloud MJECloud commented May 14, 2020

PR Summary

Adding scopes in the theme to make the $ orange aswell.
image

Also adding wordSepartors to ISE Mode
Fixes #2546

PR Checklist

Note: Tick the boxes below that apply to this pull request by putting an x between the square brackets.
Please mark anything not applicable to this PR NA.

  • PR has a meaningful title
  • Summarized changes
  • PR has tests
  • This PR is ready to merge and is not work in progress
    • If the PR is work in progress, please add the prefix WIP: to the beginning of the title and remove the prefix when the PR is ready

@ghost ghost added Area-Configuration Area-Documentation Issue-Enhancement A feature request (enhancement). labels May 14, 2020
@MJECloud MJECloud changed the title WIP Title Add coloring for $ and wordSepartors May 14, 2020
Copy link
Member

@TylerLeonhardt TylerLeonhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks for picking this up!

@@ -24,6 +24,7 @@ export class ISECompatibilityFeature implements IFeature {
{ path: "powershell.integratedConsole", name: "focusConsoleOnExecute", value: false },
{ path: "files", name: "defaultLanguage", value: "powershell" },
{ path: "workbench", name: "colorTheme", value: "PowerShell ISE" },
{ path: "editor", name: "wordSeparators", value: "`~!@#%^&*()-=+[{]}\\|;:'\",.<>/?" }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did this value for the word separators come from anywhere in particular? I'm wondering about the following: ~, @, #, ^, *, -, \, :.

It depends on the context in which I think of where we're defining "words" too. In expression mode, * and - are word separators, but in command mode they're not. I suspect we should prefer expression mode, but want to raise it in any case

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the default minus the $ - I originally said this here:
#2546 (comment)

Not perfect... but better.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, i used the example Tyler mentioned in the comment.
Is there a better implementation?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy with better. We can improve it in future as needed

@TylerLeonhardt
Copy link
Member

@MJECloud looks like there's a conflict now with a PR that just went in. Can you rebase or resolve the conflict?

@MJECloud
Copy link
Contributor Author

Resolved the conflict.

@MJECloud MJECloud closed this May 19, 2020
@MJECloud MJECloud reopened this May 19, 2020
@TylerLeonhardt
Copy link
Member

Thanks for doing that!

@TylerLeonhardt TylerLeonhardt merged commit bf189e5 into PowerShell:master May 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Select $variable with double click in editor
3 participants