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

Add Win32 API names dictionary #708

Merged
merged 15 commits into from Oct 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions dictionaries/swift/package.json
Expand Up @@ -34,6 +34,8 @@
"url": "https://github.com/streetsidesoftware/cspell-dicts/issues"
},
"homepage": "https://github.com/streetsidesoftware/cspell-dicts/blob/main/packages/swift#readme",
"devDependencies": {},
"dependencies": {},
"files": [
"swift.txt.gz",
"cspell-ext.json",
Expand Down
5 changes: 5 additions & 0 deletions dictionaries/win32/CHANGELOG.md
@@ -0,0 +1,5 @@
# Change Log

## 1.0.0

- Initial Release
21 changes: 21 additions & 0 deletions dictionaries/win32/LICENSE
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2017-2020 Jason Dent <jason@streetsidesoftware.nl>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
48 changes: 48 additions & 0 deletions dictionaries/win32/README.md
@@ -0,0 +1,48 @@
# Cspell Win32 Dictionary

Win32 dictionary for cspell.

This is a pre-built dictionary for use with cspell.

## Installation

Global Install and add to cspell global settings.

```sh
npm install -g @cspell/dict-win32
cspell link add @cspell/dict-win32
```

## Uninstall from cspell

```sh
cspell link remove @cspell/dict-win32
```

## Manual Installation

Manual installation is useful if you want to include this dictionary as part of your CI/CD lint process.

```
npm i @cspell/dict-win32
```

The `cspell-ext.json` file in this package should be added to the import section in your `cspell.json` file.

```javascript
{
// …
"import": ["@cspell/dict-win32/cspell-ext.json"],
// …
}
```

# Dictionary Development

See: [How to Create a New Dictionary](https://github.com/streetsidesoftware/cspell-dicts#how-to-create-a-new-dictionary)

## License

MIT

> Some packages may have other licenses included.
44 changes: 44 additions & 0 deletions dictionaries/win32/cspell-ext.json
@@ -0,0 +1,44 @@
// cSpell Settings
{
"id": "win32",
"version": "0.2",
"name": "Win32",
"description": "Win32 dictionary for cspell.",
"readonly": true,
// List of dictionary files to add to the global list of dictionaries
"dictionaryDefinitions": [
{
"name": "win32",
"path": "./win32.txt.gz",
"description": "Win32 dictionary for cspell."
}
],
// Dictionaries to always be used.
// Generally left empty
"dictionaries": [],
// Language Rules to apply to matching files.
// Files are matched on `languageId` and `local`
"languageSettings": [
{
// VSCode languageId. i.e. typescript, java, go, cpp, javascript, markdown, latex
// * will match against any file type.
"languageId": "*",
// Language locale. i.e. en-US, de-AT, or ru. * will match all locales.
// Multiple locales can be specified like: "en, en-US" to match both English and English US.
"locale": "*",
// By default the whole text of a file is included for spell checking
// Adding patterns to the "includeRegExpList" to only include matching patterns
"includeRegExpList": [],
// To exclude patterns, add them to "ignoreRegExpList"
"ignoreRegExpList": [],
// regex patterns than can be used with ignoreRegExpList or includeRegExpList
// Example: "pattern": [{ "name": "mdash", "pattern": "&mdash;" }]
// This could be included in "ignoreRegExpList": ["mdash"]
"patterns": [],
// List of dictionaries to enable by name in `dictionaryDefinitions`
"dictionaries": ["win32"],
// Dictionary definitions can also be supplied here. They are only used iff "languageId" and "local" match.
"dictionaryDefinitions": []
}
]
}
12 changes: 12 additions & 0 deletions dictionaries/win32/cspell.json
@@ -0,0 +1,12 @@
{
"version": "0.2",
"files": [
"**/*.{md,txt}"
],
"dictionaries": [
"win32"
],
"import": [
"./cspell-ext.json"
]
}
46 changes: 46 additions & 0 deletions dictionaries/win32/package.json
@@ -0,0 +1,46 @@
{
"name": "@cspell/dict-win32",
"version": "1.0.0",
"description": "Win32 dictionary for cspell. -- Private until verified",
"private": true,
"publishConfig": {
"access": "public"
},
"exports": {
".": "./cspell-ext.json",
"./cspell": "./cspell-ext.json",
"./cspell-ext.json": "./cspell-ext.json"
},
"scripts": {
"build": "cross-env NODE_OPTIONS=--max_old_space_size=8192 cspell-tools-cli compile \"src/win32.txt\" -o .",
"test": "head -n 1000 \"src/win32.txt\" | cspell -v -c ./cspell-ext.json \"--local=*\" \"--languageId=*\" stdin",
"prepublishOnly": "yarn test",
"prepare": "yarn run build"
},
"repository": {
"type": "git",
"url": "git+https://github.com/streetsidesoftware/cspell-dicts.git"
},
"keywords": [
"cspell",
"cspell-ext",
"Win32",
"Win32",
"dictionary",
"spelling"
],
"author": "Jason Dent",
"license": "MIT",
"bugs": {
"url": "https://github.com/streetsidesoftware/cspell-dicts/issues"
},
"homepage": "https://github.com/streetsidesoftware/cspell-dicts/blob/main/packages/Win32#readme",
"devDependencies": {},
"dependencies": {},
"files": [
"win32.txt.gz",
"cspell-ext.json",
"*.js",
"*.d.ts"
]
}