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

Improvements to Syntax Highlighting #22

Closed
fitdev opened this issue Jul 24, 2018 · 6 comments
Closed

Improvements to Syntax Highlighting #22

fitdev opened this issue Jul 24, 2018 · 6 comments

Comments

@fitdev
Copy link

fitdev commented Jul 24, 2018

It would be nice to add the following improvements to Syntax Highlighting:

  1. Control Flow Keyword option should include if, else if, else, switch, case, for, yield, break, foreach, try, catch, finally. So these get appropriate formatting as well.

  2. Add "Local Variable" category for identifiers declared within method bodies, i.e. locals, so these can be colored/formatted differently and thus distinguished from say method parameters, or local fields.

Thank you.

@wmjordan
Copy link
Owner

Thank you for commenting.
Why currently only return, break, continue, throw, yield return and yield break are highlighted is because they are the point where the control flow get changed, exiting the current method or loop. That is my consideration.

Local variable is already there, please find the Local Member Name within the C# - Member section.

@fitdev
Copy link
Author

fitdev commented Jul 25, 2018

I see. Thank you for explanation. Then perhaps you can add another category for those as well, at least for branching constructs. I mean with ifs control flow certainly does get changed.

Sorry about the local member name. You are right, I got confused by the naming. Usually I don't think of those as "Fields", hence did not think that that item would apply to local variables.

@wmjordan
Copy link
Owner

wmjordan commented Jul 29, 2018

Well, I will try make more category for C# keywords.

I will correct the naming of "Local Field Name" to "Local Variable Name", and move it to the "Declaration" category. Thanks for pointing this out.

@fitdev
Copy link
Author

fitdev commented Aug 1, 2018

Thanks for adding the new categories: loop and branching keywords! I like the granularity of control!

@fitdev fitdev closed this as completed Aug 1, 2018
@wmjordan
Copy link
Owner

wmjordan commented Aug 1, 2018

The upcoming version will add more categories.

The try, catch and finally will be categorized as "Resource and exceptions" in the next version besides using, lock, unsafe statements.
And the upcoming version will allow you to apply the syntax styles to braces and parentheses according to the statement types, as well.
shot

@fitdev
Copy link
Author

fitdev commented Aug 1, 2018

Applying the syntax styles to braces and parentheses is really great idea! Makes perfect sense!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants