Skip to content

netromdk/annotate-depth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 

Repository files navigation

MELPA

Annotate Depth mode [Emacs]

annotate-depth-mode annotates buffer if indentation depth is beyond threshold (see annotate-depth-threshold which defaults to 5). An idle timer is started when entering the mode and disabled when exiting it. The face annotate-depth-face is applied at indentation level and to end-of-line for each line on or beyond threshold.

Usage:

(add-hook 'prog-mode-hook 'annotate-depth-mode)

The threshold can be fine-tuned for specific modes if necessary:

(add-hook 'annotate-depth-mode-hook
            (lambda ()
              (if (equal major-mode 'emacs-lisp-mode)
                  (setq-local annotate-depth-threshold 10)
                (when (equal major-mode 'c++-mode)
                  (setq-local annotate-depth-threshold 4)))))

About

Annotate buffer if indentation depth is beyond threshold in Emacs.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published