Variable: diff-hl-global-modes
diff-hl-global-modes is a customizable variable defined in diff-hl.el.
Value
(not image-mode)
Documentation
Modes for which diff-hl-mode(var)/diff-hl-mode(fun) is automagically turned on.
This affects the behavior of global-diff-hl-mode(var)/global-diff-hl-mode(fun).
If nil, no modes have diff-hl-mode(var)/diff-hl-mode(fun) automatically turned on.
If t, all modes have diff-hl-mode(var)/diff-hl-mode(fun) enabled.
If a list, it should be a list of major-mode symbol names for
which it should be automatically turned on. The sense of the list
is negated if it begins with not. As such, the default value
(not image-mode)
means that diff-hl-mode(var)/diff-hl-mode(fun) is turned on in all modes except for
image-mode buffers. Previously, diff-hl-mode(var)/diff-hl-mode(fun) caused worse
performance when viewing such files in certain conditions.
Source Code
;; Defined in /nix/store/cfz56rl3lp066226i0bmmgiicls3gcq7-emacs-packages-deps/share/emacs/site-lisp/elpa/diff-hl-20261001.135/diff-hl.el
(defcustom diff-hl-global-modes '(not image-mode)
"Modes for which `diff-hl-mode' is automagically turned on.
This affects the behavior of `global-diff-hl-mode'.
If nil, no modes have `diff-hl-mode' automatically turned on.
If t, all modes have `diff-hl-mode' enabled.
If a list, it should be a list of `major-mode' symbol names for
which it should be automatically turned on. The sense of the list
is negated if it begins with `not'. As such, the default value
(not image-mode)
means that `diff-hl-mode' is turned on in all modes except for
`image-mode' buffers. Previously, `diff-hl-mode' caused worse
performance when viewing such files in certain conditions."
:type '(choice (const :tag "none" nil)
(const :tag "all" t)
(set :menu-tag "mode specific" :tag "modes"
:value (not)
(const :tag "Except" not)
(repeat :inline t (symbol :tag "mode"))))
:group 'diff-hl)