-
-
Notifications
You must be signed in to change notification settings - Fork 62
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
is it possible to add more font faces (like for variable definitions, modules, and function parameters)? #137
Comments
See #2 for variable definition highlighting (it's more difficult than it sounds, but help is welcome). We could certainly fontify "MyModule" in Looking at your screenshots, the bigger difference to me is that Ocaml uses a lot more keywords, so there are more things to highlight. Julia's syntax is slightly more minimal in a lot of usage (probably not actually more minimal as far as total syntax available), and it tends to use symbols for syntax more often instead of keywords. |
I'll also note that you appear to be using an older version of |
Ah ok, maybe I'll take a crack at something simple, like font-locking the token before an '=' sign. I'm using 2020-07-17.1915 version, that should be recent enough, right? Also another easy one would be to color any capitalized word. This would color modules, like |
Yep. Not sure why
Make sure you don't font-lock named-tuple fields then. And make sure you don't make font-locking uglier for multiple assignment by only highlighting one of the variables being assigned to.
I strongly disagree with font-locking based on a convention like the fact that UpperCamelCase indicates a type. Font-locking should only be based on the syntax/semantics of the language. |
I agree with @non-Jedi about the above. Specifically, one usually has a single module per buffer (or at most a few submodules), and it is usually at the top, so highlighting it may not be necessary. I also don't think that we should highlight based on anything else than syntax. Generally I find font locking in this package more or less sufficient, given Julia's relatively lightweight syntax. #2 may be desirable, but it is not a low-hanging fruit. |
Compare the OCaml highlighting with the Julia highlighting.
Would it be possible to maybe add more color to the julia one? I think the OCaml highlighting strikes a great balance of color without being too busy. I find the Julia highlighting to be too minimal and hard to read.
What do you guys thinks?
The text was updated successfully, but these errors were encountered: