-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Color identifiers mode #2930
Color identifiers mode #2930
Conversation
Hmm, how does this play with rainbow-identifiers, which is on the same key binding? spacemacs/layers/colors/packages.el Line 46 in b8f3d39
|
Oops, I noticed it free but I didnt load all packages before doing so. I will revise the bindings. |
What are the differences with https://github.com/Fanael/rainbow-identifiers (in the colors layer) ? |
rainbow-identifiers seems to color all unique text in the buffer with different colors. color-identifiers-mode on the other hand, recognizes variable in the source and colors only the variables in the source. I should add this to the color package though. Will do that now... |
59a7ace
to
68327cf
Compare
:defer t | ||
:init | ||
(progn | ||
(spacemacs|diminish color-identifiers-mode "C " "C ") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first C has got to be Ⓒ (compare
spacemacs/spacemacs/packages.el
Line 221 in d993a02
(spacemacs|diminish aggressive-indent-mode " Ⓘ" " I")))) |
I think we should form an opinion which identifier coloring package is better and include only one by default. @Ralesi's description above sounds like color-identifiers-mode is more sensible than rainbow-identifiers. To that end I tried this PR locally, but toggling it with |
68327cf
to
b772e70
Compare
@mbertheau, this mode is relatively unobtrusive, it will not change the text for common patterns, unless it recognizes it as a variable. Look at a |
b772e70
to
90e8eda
Compare
@Ralesi can you make a screenshot with rainbow identifier as well so we can compare ? I see an advantage of |
@Ralesi: I see it now, thanks :) I'll try with |
@Ralesi Can you add something such that color-identifiers can be toggled on globally for all new buffers? |
|
Does this only work for elisp or understands color-identifiers a notion of "variables" in other languages too? |
@kritzcreek, currently, it supports Scala (scala-mode2), JavaScript (js-mode and js2-mode), Ruby, Python, Emacs Lisp, Clojure, C, C++, and Java out of the box. |
@Ralesi so does it still provide colored identifiers for other languages? The docs don't say anything about that. And that would be quite the regression from rainbow-identifiers. |
We could have both packages and use color identifiers for the supported languages and then rainbow identifiers for the rest. Best of both worlds Sent from my Windows Phone From: Christoph Hegemannmailto:notifications@github.com @ralesihttps://github.com/ralesi so does it still provide colored identifiers for other languages? The docs don't say anything about that. And that would be quite the regression from rainbow-identifiers. — |
We can also modify |
90e8eda
to
70451cc
Compare
70451cc
to
2cb4561
Compare
Thank you ! 👍 Cherry-picked into develop branch, you can safely delete your branch. |
Add color identifiers mode, toggled by
SPC t C i
.