-
-
Notifications
You must be signed in to change notification settings - Fork 646
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
Introduce custom-face-1
/custom-face-2
facility
#3646
base: master
Are you sure you want to change the base?
Conversation
I'll need some specific use-cases to be able to evaluate the usefulness of this proposal as DSLs come in many flavors and I don't see immediately how a couple of extra faces will make a big difference for them. Might also be useful to have this as some generic mechanism - e.g. some macro that will define a matching face, instead of hardcoding some faces. Admittedly this will make theming a more manual process, but I doubt that will be a big deal for most people. |
As for examples:
I could use some pseudo-code to fully grasp the idea. |
Something like:
And this would create some face based on |
Can give that a shot - would seem nice as I wasn't sure of how many 'slots' we should offer. I take it that we'd go ahead with that? |
Yeah, if it's flexible I'm OK with it. |
Context
DSLs and libraries with special semantics aren't uncommon in the Clojure world.
Users of those may want some extra highlighting rules, with different faces, that apply to just those DSLs.
Those extra faces allow to:
CIDER by default gives a relatively small palette of faces to be possibly applied, so stuff either won't get any particular font-locking, or the applied font-locking will overlap with Clojure font-locking (e.g. N different things all use
font-lock-variable-name-face
), hindering the desired distinction.Changes
Introduce two new faces and two customizable 'categorizers' that when set, decide whether a given symbol should use one of the custom faces.
Example
The user would simply use something like:
And then one's theme can be customized to use the produced faces:
Status
Generally ready and functional, except for the addition of a user manual + changelog entry.
I also plan to provide a little more metadata from cider-nrepl (in an efficient manner).
Tweaks welcome.
Cheers - V