cspell-dicts icon indicating copy to clipboard operation
cspell-dicts copied to clipboard

Instructions for enabling one of these dictionaries in vscode

Open asklar opened this issue 6 months ago • 3 comments

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 avatar Dec 29 '23 03:12 asklar

@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 --->

Jason3S avatar Dec 29 '23 10:12 Jason3S

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

asklar avatar Dec 29 '23 20:12 asklar

I'll make a change to the dictionary to make it easier to add new terms.

Jason3S avatar Dec 30 '23 08:12 Jason3S