streetsidesoftware / cspell

A Spell Checker for Code!
https://cspell.org
MIT License
1.23k stars 92 forks source link

Allow users to forbid phrases #3790

Open calvinballing opened 1 year ago

calvinballing commented 1 year ago

Is your feature request related to a problem? Please describe. It would be nice to be able to forbid phrases instead of only words. Say that we are trying to disallow writing note book in favor of notebook.

Describe the solution you'd like Allow some syntax for forbidding phrases. This could be something like:

In a custom word list: !note book

In words section of cspell configuration:

"words": [
    "!note book
],

In flagWords section of cspell configuration: "flagWords": ["note book"]

(Note that this syntax proposal conflicts with the proposal here: https://github.com/streetsidesoftware/cspell/issues/3777)

Describe alternatives you've considered Could also have a separate concept of phrases if necessary:

In words section of cspell configuration:

"phrases": [
    "!note book
],

New flagPhrases section of cspell configuration: "flagPhrases": ["note book"]

mateusoliveira43 commented 1 year ago

Plus one ++ I am looking forward for this feature :smile: