Skip to content

Emacs minor mode to highlight each source code identifier uniquely based on its name

Notifications You must be signed in to change notification settings

Schnouki/color-identifiers-mode

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 

Repository files navigation

Color Identifiers Mode

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 only supports js-mode and scala-mode2, but support for other modes is forthcoming. You can add support for your favorite mode by modifying color-identifiers:modes-alist.

Check out the demo.

Screenshot of Color Identifiers Mode on Scala

It picks colors adaptively to fit the theme:

Different Themes

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

Installation

Color Identifiers is in MELPA. First set up MELPA:

(package-initialize)
(add-to-list 'package-archives
             '("melpa" . "http://melpa.milkbox.net/packages/") t)
(package-refresh-contents)

Then install it:

(package-install 'color-identifiers-mode)

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

If you like it, enable it for all Scala files:

(add-hook 'scala-mode-hook 'color-identifiers-mode)

About

Emacs minor mode to highlight each source code identifier uniquely based on its name

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Emacs Lisp 100.0%