fxbois / web-mode

web template editing mode for emacs
https://web-mode.org
GNU General Public License v3.0
1.64k stars 260 forks source link

Disable ALL syntax coloring #1196

Closed sh4r1k7 closed 2 years ago

sh4r1k7 commented 3 years ago

How do I achieve this? Here's what I have so far - I'm hoping I don't have to do this for every -keywords var, but so far even the ones I tried aren't really working except javascript (css and html still show through):

(dolist (hook '(emacs-lisp-mode-hook
                web-mode-hook))
  (add-hook 'emacs-lisp-mode-hook (lambda () (font-lock-mode -1))))
(add-hook 'web-mode-hook (lambda () (setq web-mode-skip-fontification t)))

(setq web-mode-javascript-font-lock-keywords nil
      web-mode-css-font-lock-keywords nil
      web-mode-skip-fontification t
      web-mode-html-font-lock-keywords nil)
fxbois commented 2 years ago

put (font-lock-mode -1) in your web-mode-hook

sh4r1k7 commented 2 years ago

Sorry, forgot to mention that disabling font-lock-mode (in my prog-mode-hook) didn't work hence why I resorted to the above because it seems web-mode uses other fontification methods?