Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark words from built-in dictionary to be flagged #1498

Closed
MeAmAnUsername opened this issue Nov 3, 2021 · 7 comments
Closed

Mark words from built-in dictionary to be flagged #1498

MeAmAnUsername opened this issue Nov 3, 2021 · 7 comments

Comments

@MeAmAnUsername
Copy link

MeAmAnUsername commented Nov 3, 2021

There are a few English words that I do not want to use in my document. It is a formal document, so no contractions like aren't, we've. I also keep mixing up therefore ("because of") and therefor ("in front of there"), so I'd like to flag therefor.
How exactly should I mark words from the built-in dictionary to be flagged?

@Jason3S provides instructions in #117 (comment) (and those same instructions are in the README on the main page) but they do not work for me.

I do not have a cSpell.json in the root directory of my project.
I have the following .vscode/cSpell.json:

{
    "version": "0.1",
    "language": "en",
    "words": [
        <omitted for brevity>
    ],
    "flagWords": [
        "aren't",
        <omitted for brevity>
        "therefor"
    ]
}

But Test aren't test therefor test test is not flagged.

It still is not flagged after adding

"cSpell.flagWords": [
    "therefor",
    "aren't"
]

to .vscode/settings.json. That section is darker than the rest of that file, so I guess that means those settings are ignored.

It does flag tesqfd, so the extension is active.

@Jason3S
Copy link
Collaborator

Jason3S commented Nov 3, 2021

@MeAmAnUsername,

flagWords is the correct setting.

image

Using the VS Code Preferences UI:
image

Being darker than the rest seems concerning. Please me sure the settings.json file is valid. The same thing for the .vscode/cSpell.json file.

@Jason3S
Copy link
Collaborator

Jason3S commented Nov 3, 2021

You can also try running:

npx cspell trace therefor

It will show you if it is considered flagged.

image

Note: this command will NOT look in .vscode/settings.json, but it will look in .vscode/cSpell.json.

@MeAmAnUsername
Copy link
Author

Turns out I'm using Spell Right instead of Code Spell Checker, but when I googled "spell right vscode remove word from dictionary" it showed this repository as the first result.
I don't know where the cSpell file came from.

Thanks for the quick replies.

@MeAmAnUsername
Copy link
Author

I switched to Spell Checker because Spell Right cannot flag words from the dictionary.
Spell Checker does not flag everything here:
image

I would expect it to flag everything except Test and test. Does it split on ' and not flag words shorted than 2 letters?

My .vscode/cSpell.json:

{
    "version": "0.2",
    "language": "en",
    "words": [
        <omitted>
    ],
    "flagWords": [
        <omitted>
        "therefor",
        <omitted>
        "they'd",
        "they'll",
        "they're",
        "they've",
        <omitted>
        "therefor"
    ]
}
MBP:dir user$ npx cspell trace therefor
bash: npx: command not found

Would this work even if I did install nodeJS? Where does it get the cspell package?

@Jason3S
Copy link
Collaborator

Jason3S commented Nov 4, 2021

@MeAmAnUsername,

There seems to be an issue when part of the word is considered correct. I opened a new issue with the library that does the checking.

It is strange that Node isn't already installed on your MBP. Even so, you would need Node and NPM to run the npx command. Node 16 should work just fine.

@Jason3S
Copy link
Collaborator

Jason3S commented Nov 5, 2021

I'm going to close this issue, because it is possible to mark words as forbidden except if they are made of parts too short for it to care. I opened a new issue with the library to take care of that.

@Jason3S Jason3S closed this as completed Nov 5, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2022

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants