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

Add `Disable cspell for this line` to 'Quick Fix…' options

Open DerZyklop opened this issue 2 years ago • 3 comments

It would be very helpful to have options for

  • Disable cspell for this line
  • Disable cspell for this entire file

Here is an example from ESlint: Screenshot 2022-03-22 at 19 14 21

For more infos about disable comments, check: https://github.com/streetsidesoftware/cspell/blob/216add0a799b61474bf55ced9ffb900fb97e4801/docs/configuration/document-settings.md#disable-checking

DerZyklop avatar Mar 22 '22 18:03 DerZyklop

There is already a snippet for disable-comments in this repo.

https://github.com/streetsidesoftware/vscode-spell-checker/blob/d89dcc83f012f4e68f910fac6ca76816071c6572/cspell.code-snippets#L42-L47

But no command for such an option.

https://github.com/streetsidesoftware/vscode-spell-checker/blob/5474a26551f3a72a66a62071726472d21bbb1fe2/package.json

DerZyklop avatar Mar 22 '22 18:03 DerZyklop

@DerZyklop,

I hear you. It would be convenient. VS Code controls the snippets and there is not way for an extension to execute a snippet.

It is not the same as the right-click menu, but the spell checker extension can help with auto completing the spelling directives. There is a setting that is off by default (it impacts auto completion), cSpell.showAutocompleteSuggestions.

While typing if it detects cspell: it will show the most common directives. For example, if you type cspell:ignore<space>, it will offer to complete with the words that are currently marked as misspelled.

Jason3S avatar Mar 28 '22 08:03 Jason3S

@Jason3S Thank you for the hint. That setting helped. Plus the Snippet that I created for it. But it still would be nice to have this Quick-Fix someday.

DerZyklop avatar May 10 '22 12:05 DerZyklop