A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/ankurdave/color-identifiers-mode below:

ankurdave/color-identifiers-mode: Emacs minor mode to highlight each source code identifier uniquely based on its name

Color Identifiers is a minor mode for Emacs that highlights each source code identifier uniquely based on its name. It is inspired by a post by Evan Brooks.

Currently it supports Scala (scala-mode2), JavaScript (js-mode and js2-mode), Ruby, Python, Emacs Lisp, Clojure, C, C++, Rust, Java, and Go. You can add support for your favorite mode by modifying color-identifiers:modes-alist and optionally calling color-identifiers:set-declaration-scan-fn.

Check out the demo.

It picks colors adaptively to fit the theme:

Use M-x color-identifiers:regenerate-colors after a theme change.

Color Identifiers is in MELPA. First set up MELPA:

(package-initialize)
(add-to-list 'package-archives
             '("melpa" . "https://melpa.org/packages/") t)
(package-refresh-contents)

Then install it:

(package-install 'color-identifiers-mode)

Finally, visit a supported file and type M-x color-identifiers-mode.

If you like it, enable it for all supported files by adding the following to your init file:

(add-hook 'after-init-hook 'global-color-identifiers-mode)

After having made changes to color-identifiers-mode.el you can test for regressions by running ninja tests. It checks lack of byte-compilation warnings and color-highlighting in various modes.

Improvements to the tests or the core mode are always welcome!


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4