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 highlight Int[] etc. #198

Open
karajan9 opened this issue Sep 12, 2019 · 0 comments
Open

Syntax highlight Int[] etc. #198

karajan9 opened this issue Sep 12, 2019 · 0 comments

Comments

@karajan9
Copy link

It would be nice to highlight the types in array creation statements like Int[] the same way they are highlighted with Vector{Int}().
As @pfitzseb mentioned on Slack, simply highlighting everything before [] runs into problems with a[] after a = Ref{Int}(), to which he suggested to highlight only TitleCase.

Pros:

  • extra highlighting makes the code easier to read
  • consistency with highlighting types elsewhere

Cons:

  • it will give a false negative for people who don't use TitleCase for their own types
  • it will give a false positive for people who use TitleCase for their variables and use Ref

Since the Julia manual suggests "modules and type names use capitalization and camel case: module SparseArrays, struct UnitRange." and the next logical step would to use everything but this for variables, one could argue that the cons shouldn't affect too many people.

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

No branches or pull requests

2 participants