vscode-spell-checker icon indicating copy to clipboard operation
vscode-spell-checker copied to clipboard

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

Open justin-romano opened this issue 8 years ago • 9 comments

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

justin-romano avatar Nov 13 '17 01:11 justin-romano

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.

Jason3S avatar Nov 13 '17 16:11 Jason3S

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.

justin-romano avatar Nov 13 '17 21:11 justin-romano

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

Jason3S avatar Nov 15 '17 21:11 Jason3S

"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 avatar Nov 15 '17 23:11 justin-romano

punch that duck @Jason3S :D

justin-romano avatar Nov 17 '17 01:11 justin-romano

I would really like to see this feature as well!

danielcrk avatar Jun 19 '18 12:06 danielcrk

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

acestronautical avatar Jul 22 '19 21:07 acestronautical

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

Jason3S avatar Jul 29 '19 06:07 Jason3S

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

Jason3S avatar Jul 29 '19 06:07 Jason3S