Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax highlighting extremely barebones #1314

Closed
tjohnman opened this issue Sep 23, 2024 · 1 comment
Closed

Syntax highlighting extremely barebones #1314

tjohnman opened this issue Sep 23, 2024 · 1 comment

Comments

@tjohnman
Copy link

tjohnman commented Sep 23, 2024

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 and web-mode-variable-name-face). All the rest is default-face. Including numbers, accessed properties, operators, parentheses, and brackets.
This is using no customization or special loading (simply require the package and add-to-list 'auto-mode-alist it). It happens with about five different themes I tested (both default ones and third-party).

Screenshot_2024-09-23_14-48-57

@fxbois
Copy link
Owner

fxbois commented Sep 23, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants