I am using Emacs 25.3.1 under MS Windows 64-bit, Everything seems working fine except the web-mode
. If I try to edit an HTML file there is no syntax highlighting, when mixing PHP and HTML only the PHP code fragments are colored, the HTML parts are in black/gray color scheme.
My .emacs
file looks like this under (package-initialize)
:
(require 'web-mode)
(add-to-list 'auto-mode-alist '("\\.phtml\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.tpl\\.php\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.html\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.html?\\'" . web-mode))
(setq web-mode-engines-alist '(("php" . "\\.html\\'")))
The last line was added, as it was required by fxbois, but it doesn't solve the issue.
web-mode-enable-element-content-fontification
. There are many more options forweb-mode
. TryM-x customize-group RET web-mode RET
.