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

Option to ignore words #146

Closed
WickyNilliams opened this issue Oct 12, 2017 · 17 comments
Closed

Option to ignore words #146

WickyNilliams opened this issue Oct 12, 2017 · 17 comments

Comments

@WickyNilliams
Copy link

There are some words that I do not wish to be identified as misspellings. I could, of course, add these to the dictionary which would stop the warnings. But then these words would be offered as suggestions for other misspellings - which I do not want. Therefore an option to ignore some words is required.

@Jason3S
Copy link
Collaborator

Jason3S commented Oct 12, 2017

Thank you for bringing this up. The setting exists, it is just not well documented. At the moment, there isn't any UI to add words to the ignore list.

There are three possible ways:

  1. Add it in your document that is being checked:
    // cspell:ignore colourings
  2. In the Workspace settings: cSpell.ignoreWords.
    Example:
    "cSpell.ignoreWords": ["colourings"]
  3. In cspell.json located in the root of your workspace:
    It is:
    "ignoreWords": ["colourings"]

@Jason3S Jason3S added the FAQ label Oct 12, 2017
@WickyNilliams
Copy link
Author

Excuse the delay. Good to know it already exists :) Do you plan on adding some UI for this?

@Jason3S
Copy link
Collaborator

Jason3S commented Dec 16, 2017

I will add it as a F1 command.
I will need to think about how to add it to the right-click menu. Since it is not configurable via an api, it is hard to give people the option to use it or not.

@WickyNilliams
Copy link
Author

Why is it not configurable via API?

@Jason3S
Copy link
Collaborator

Jason3S commented Jan 22, 2018

In VS Code (as of a couple of months ago), you have to define the menu items in advance via the package.json file.

    "contributes": {
        "menus": {
            "editor/context": [...]
        }
    }

Which makes it hard to add dynamic items to the context menu.

@WickyNilliams
Copy link
Author

Hmm... perhaps I'm missing something, but how is ignoring any different to "Add: [word] to dictionary" actions? They seem dynamic?

@ChildishGiant
Copy link

ChildishGiant commented Jul 26, 2018

Is there any update on adding this to right click? I also cannot find this in F1.

@Spenhouet
Copy link

I don't like the "ignore by list in the settings" approach.
I would like the exact same workflow as the global dictionary provides.
The only difference that the ignore words are a seperate list of the dictionary and are not used for suggestions.

@LaurentOngaro
Copy link

Please can you add this options.
It's very painfull to edit settings.json just to add ignored words.
Many thanks

@courtneyaschwartz
Copy link

@Jason3S Sorry, is this available? (Issue is "Open", but the label is "Done/Fixed"...?)

@courtneyaschwartz
Copy link

Not sure if this will be the fix I'm looking for. But basically instead of this:
"ignoreWords" : ["hte" //plus a hundred others]

I need like this:

"ignoreWordsDictionary": "ignored-words-dict",
"ignoreWordsDictionaryDefinitions": [ {"name": "ignored-words-dict", "path": "./cspell_ignored.txt"}]

(Re-use an external ignore list across multiple projects, I guess like Spenhouet. Don't want to suggest my ignored list as corrections, hence not loaded as a regular dictionary.)

Is something like this being added? Or just a UI for ignoreWords...?

@Jason3S
Copy link
Collaborator

Jason3S commented Jan 25, 2020

@courtneyaschwartz At the moment there is only UI to add it to the ignoreWords list.

I agree, a dictionary option would be very useful.

@KeyuanHuang
Copy link

I'm glad that there's an 'Ignore Word' command in right click menu now. But I feel it inconvenient that I have to press enter after 'Ignore Word'... Maybe removing this 'press enter' step is better, because right click won't causs mistakes often so it might be unnecessary to require a confirmation. Even if you ignore a word by mistake, you can delete the word in .vscode/settings.json.

@moreati
Copy link

moreati commented Aug 19, 2021

But I feel it inconvenient that I have to press enter after 'Ignore Word'

I'm finding "press enter to confirm" is skipped if I select the word before right clicking.

@Jason3S
Copy link
Collaborator

Jason3S commented Aug 20, 2021

@moreati,

There is a new version coming out soon. The behavior of the right-click menu has changed.
Please try it out: Releases.

@Jason3S Jason3S added this to the v2 milestone Aug 20, 2021
@Jason3S Jason3S modified the milestones: v2, v2.0.X Sep 18, 2021
@Jason3S
Copy link
Collaborator

Jason3S commented Nov 22, 2021

I'm going to close this as "fixed". Documentation could be better, but it is possible to ignore words. It is even possible to setup a dictionary of words to be ignored, but not suggested.

@Jason3S Jason3S closed this as completed Nov 22, 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.
Projects
None yet
Development

No branches or pull requests

8 participants