-
-
Notifications
You must be signed in to change notification settings - Fork 248
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
All top-level def forms should have consistent font-lock #578
Comments
I've tried to align the font-locking in |
I don't care that much about highlighting locals too. My main point's that logically all top-level definitions are kinda on the same level of "importance", so should be highlighted similarly, whether it's defined with a But setting Anyways, feel free to close as you see fit, as it's not a feature request per se but more of "what's your thoughts on this" type ticket; or maybe leave open to gather more opinions. |
@yuhan0 Would it be possible to share your local fork? That special highlighting looks great, but it looks you're using definitions of |
Some thoughts on syntax highlighting.
I think variable-name-face should be used for foo in
(let [foo 42] ...)
, but not for foo in(def foo 42)
. Top-level definitions should use the same face, whether its a function or a 'variable'. It seems more logical, since if I want to make both "foo" and "bar" use the same bold and highly visible face (since both are top-level defs), then e.g. in my c code I get local variables and function arguments highlighted with the same face.I guess the correct hierarchy would be: top-level-definition-face -> (function-face, var-face[1]). It would be nice to have a separate space for def-like keywords as well (so a user could highlight "defn", but not "do" or "let").
[1]: technically defn also creates a var; what's the best short name for a top-level definition that is not a function? Do we actually need/want this distinction at all? I don't really see how it's useful.
The text was updated successfully, but these errors were encountered: