streetsidesoftware / vscode-spell-checker

A simple source code spell checker for code
https://streetsidesoftware.github.io/vscode-spell-checker/
Other
1.4k stars 126 forks source link

Checker should have option to check code comments and strings only. #150

Open justin-romano opened 6 years ago

justin-romano commented 6 years ago

Not all symbols in code are real words. a lot are abbreviations and pseudo words I only want strings and comments to be spell checked

Jason3S commented 6 years ago

This is very similar to #116. It is something I want to do.

Which programming language are you using?

I intend to add a setting. But each programming language has its own definitions of a comment or string. VS Code does not expose language grammar to the extensions. Simple regular expressions work most of the time, but it is very easy to fool them. Which means I would need to implement a full on equivalent to the colorizer.

justin-romano commented 6 years ago

I would have thought that you could identify comments and strings from the syntax highlighting engine for all supported languages in vscode. I'm using TS btw.

Jason3S commented 6 years ago

Yes, me too. But the syntax highlighting interface is not exposed by VS Code.

justin-romano commented 6 years ago

"If it walks like a duck and talks like a duck, it’s a duck, right? So if this duck is not giving you the noise that you want, you’ve got to just punch that duck until it returns what you expect"

justin-romano commented 6 years ago

punch that duck @Jason3S :D

danielcrk commented 6 years ago

I would really like to see this feature as well!

acestronautical commented 5 years ago

Agreed, in fact i'm having trouble at the moment where spellcheck is happening on python source but NOT on comments. Don't know why

Jason3S commented 5 years ago

My plan is to make it a selectable choice in the UI. It will take a bit of time to work on it.

Jason3S commented 5 years ago

@Ace-Cassidy please open a new issue and any steps to reproduce. Include cspell.json or .vscode/settings.json.