redguardtoo / wucuo

Fastest solution to spell check camel case code or plain text
122 stars 4 forks source link

Not highlight incorrect words in some files #20

Open shy-robin opened 1 year ago

shy-robin commented 1 year ago

It works well in .js and .txt files.

image

However, when I switch to .json , .html, or .ts files , it seems not work.

image
redguardtoo commented 1 year ago

(setq wucuo-debug t), reproduce the issue , send me the log info in message buffer.

shy-robin commented 1 year ago

(setq wucuo-debug t), reproduce the issue , send me the log info in message buffer.

image
shy-robin commented 1 year ago

(setq wucuo-debug t), reproduce the issue , send me the log info in message buffer.

The screenshot above is messages buffer of .ts file. Below is .json.

image
redguardtoo commented 1 year ago

I think it's treesit uses different font face which is not included in wucuo-font-faces-to-check.

You can add the missing font face into wucuo-font-faces-to-check, or wucuo-personal-font-faces-to-check (recommend).

BTW, use command wucuo-current-font-face. to detect font face at point.

redguardtoo commented 1 year ago

7ca440a support tree-sitter-hl-mode (Chen Bin)

shy-robin commented 1 year ago

I think it's treesit uses different font face which is not included in wucuo-font-faces-to-check.

You can add the missing font face into wucuo-font-faces-to-check, or wucuo-personal-font-faces-to-check (recommend).

BTW, use command wucuo-current-font-face. to detect font face at point.

Thank you very much! I use wucuo-current-font-face to detect font face under the cursor and it shows tree-sitter-hl-face:comment. Then I use (setq wucuo-personal-font-faces-to-check '(tree-sitter-hl-face:comment)) to add missing font faces. When I restart emacs, it works! In addition, I wonder if there is a convenient way to add missing font faces because now I need to add tree-sitter-hl-face:comment for comment, and tree-sitter-hl-face:variables for variables, and tree-sitter-hl-face:strings for strings in json , and so on. Is there a easy way to add all missing font faces ?

redguardtoo commented 1 year ago

I've already do the setup for tree-sitter in latest commit. So it should work out of box now.

You can use (setq wucuo-personal-font-faces-to-check '(face1 face2 face3 ...)) to add other missing font faces .

shy-robin commented 1 year ago

I got it. I will update this package. Thanks!