cspell-dicts
cspell-dicts copied to clipboard
Instructions for enabling one of these dictionaries in vscode
I'm trying to enable the win32 dictionary: https://github.com/streetsidesoftware/cspell-dicts/tree/main/dictionaries/win32
I have the cspell vscode extension, but I don't see how I can enable the win32 dictionary, could you please advise?
@asklar,
Thank you for the question. It made me realize that there wasn't a CSpell dictionary extension for VSCode. I have added it: Win32 - Code Spell Checker - Visual Studio Marketplace
Getting Started
By default the win32
dictionary is enabled for C
and C++
file types. To enable it for other file types, it is necessary to add it to the dictionaries
section of the configuration or include it as an inline CSpell directive: cspell:dictionaries win32
.
Example: example.md
Sample Code:
```cpp
// Parse the command line parameters
int argc;
LPWSTR* argv = CommandLineToArgvW(GetCommandLineW(), &argc);
pSample->ParseCommandLineArgs(argv, argc);
LocalFree(argv);
```
<!--- cspell:dictionaries win32 --->
thanks @Jason3S for the quick fix! If I understand correctly, the win32 dictionary is created automatically by running a script on the Windows SDK headers and collecting the words that don't pass according to e.g. the English dictionaries.
There are some more modern terms that are missing from the platform SDK headers (e.g. NuGet, vcpkg). Would it be possible to manually add these? Alternately, we should consider additionally including the Windows App SDK to source the list of terms from: https://learn.microsoft.com/windows/apps/windows-app-sdk/
There's bound to be some "noise" in there, e.g. words that aren't actually correct that appear in comments or parameters names. For example, "annotes" is used as a parameter name for "a list of annotations". This may not be a huge deal but just pointing it out in case it is :)
cc @jonwis since he'll be interested too
I'll make a change to the dictionary to make it easier to add new terms.