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
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/features/ISECompatibility.ts
Original file line number Diff line number Diff line change
Expand 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

];
private iseCommandRegistration: vscode.Disposable;
private defaultCommandRegistration: vscode.Disposable;
Expand Down
4 changes: 3 additions & 1 deletion themes/theme-psise/theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@
"name": "Variables",
"scope": [
"variable",
"support.variable"
"support.variable",
"punctuation.definition.variable.powershell",
"variable.other.readwrite.powershell"
],
"settings": {
"foreground": "#FF4500"
Expand Down