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

Add option to only spell check in comments, either for the current workspace or for all

Open brandonmcconnell opened this issue 2 years ago • 4 comments

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).

brandonmcconnell avatar May 19 '23 17:05 brandonmcconnell

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

cirosantilli avatar Jul 26 '24 21:07 cirosantilli

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 avatar Jul 26 '24 21:07 cirosantilli

@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).

Jason3S avatar Aug 03 '24 08:08 Jason3S

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.

cirosantilli avatar Aug 04 '24 04:08 cirosantilli