vscode-spell-checker
vscode-spell-checker copied to clipboard
Add option to only spell check in comments, either for the current workspace or for all
I only want to enable spell-checking in my comments for a given language. I feel like VSCode makes it possible to tell which type of text each chunk is (hence, the parsing for syntax highlighting).
This feature is fundamental. in Vim, you can specify spellcheck directly on the syntax files with @NoSpell for example:
syntax match typeName '[a-zA-Z0-9_]\+' contains=@NoSpell
Ah several dupes or close: https://github.com/streetsidesoftware/vscode-spell-checker/issues/150 | https://github.com/streetsidesoftware/vscode-spell-checker/issues/116 | https://github.com/streetsidesoftware/vscode-spell-checker/issues/150
@cirosantilli,
Yes, they are all related or near duplicates.
Extensions do not have access to VS Code's syntax highlighting. It would be necessary to add a grammar parser for each file type. The intent is to add a language parser to CSpell (the library used to do the spell checking).
I'd also have a look at how spellright does it: https://marketplace.visualstudio.com/items?itemName=ban.spellright they seem to allow a bit of control, though it might be simplistic not sure.