Open tjohnman opened 1 month ago
I would say that web-mode is not suited for plain JS. You have many better modes for that (especially nowadays with tree-sitter). As I do not really "parse" the code, I'll never be able to offer better fontification. Web-mode is really suited for HTML embedding small blocks of heterogeneous code.
I'm experiencing extremely lacking syntax highlighting in JS and PHP (HTML and CSS are not as noticeable). As you can see in the attached image, which is a plain .js file, there are a lot of elements using the default face. Of all of them, only strings and variable names (only when being declared) show using a different face (
web-mode-javascript-string-face
andweb-mode-variable-name-face
). All the rest isdefault-face
. Including numbers, accessed properties, operators, parentheses, and brackets. This is using no customization or special loading (simply require the package andadd-to-list 'auto-mode-alist
it). It happens with about five different themes I tested (both default ones and third-party).