I have set multiple modes to not show display-line-number-mode
and recently I added compilation-mode
to that list, but the compilation-mode
still shows line numbers. Here is the relevant code,
;; Disable line numbers for some modes
(dolist (mode '(org-mode-hook
term-mode-hook
shell-mode-hook
treemacs-mode-hook
eshell-mode-hook
vterm-mode-hook
compilation-mode ;; <----
telega-root-mode-hook
telega-chat-mode-hook
erc-mode-hook))
(add-hook mode (lambda () (display-line-numbers-mode 0))))
What am I doing wrong here?
compilation-mode-hook
?(display-line-numbers-mode -1)
-hook
. Thanks!