Reputation: 507
In Visual Studio 2022, you can add the directive // Ignore Spelling: WordToIgnore
in a file to ignore said word. Is there a way to do this globally for the solution? I do not want to add it to the Ignore Words File because I do not want to affect other solutions. I also would like to not add this line of code to every file that I want it in.
Upvotes: 2
Views: 1320
Reputation: 4562
The Visual Studio Spell Checker extension defines an Ignore Spelling Directive in the form // Ignore Spelling: WordToIgnore
so I assume you are using this extension.
Visual Studio Spell Checker allows configuration options using the .editorconfig
file. To add an .editorconfig
file to the solution, right click on the solution and select Add -> New EditorConfig.
Here are two ways to add words to the spell checkers ignore list:
.editorconfig
file and select Spell Checker
Congiuration.IgnoredWords.dic
..editorconfig
file and select Spell Checker
Congiuration.IgnoredWords.dic
.Note: the Ignored Words File file can have any name, placed at any location and does not need to be added using the solution.
See:
Spell Checker Settings (.editorconfig file):
Upvotes: 1
Reputation: 62110
A claim made within this question is in direct conflict with fact:
There is no such thing as a // Ignore Spelling:
"directive" in Visual Studio 2022.
I have never seen such a "directive" being mentioned in any documentation I have read, (and I have read a lot,) and an attempt to try to include such a directive within my code to see if by any miracle it works was just a waste of time: of course, it does not work.
Maybe some plugin used by the author supports such a "directive".
(Perhaps "Visual Studio Spell Checker" by EWSoftware.)
Which means that the answer that the author is seeking must lie within the documentation of that plugin.
Visual Studio 2022 comes with its own built-in spell checker, which is configurable via .editorconfig, and which can be configured to learn ("exclude" in microsoft parlance) words at the solution scope or even at the project scope. However, I cannot recommend using the Visual Studio 2022 built-in spell checker, because it does not work for me.)
Upvotes: 0