Skip to content

Commit bbb0664

Browse files
Move using a custom dictionary to file under 'docs'
This is more consistent with the other dictionary examples and how-tos. Signed-off-by: Daniel F. Dickinson <[email protected]>
1 parent 10d6425 commit bbb0664

File tree

2 files changed

+33
-32
lines changed

2 files changed

+33
-32
lines changed

README.md

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -16,41 +16,10 @@ repos:
1616
## How-To Guides and Configuration Examples
1717
1818
* [Use Dictionaries from `cspell-dicts`](docs/use-dictionaries-from-cspell-dicts.md)
19+
* [Use a Custom Dictionary](docs/use-a-custom-dictionary.md)
1920
* [Use a Different Dictionary Based Upon the Filename](docs/file-or-folder-based-overrides.md)
2021
* [Example `pre-commit` Setup for French](docs/pre-commit-example-setup-for-french.md)
2122

22-
### Setup Custom Dictionary
23-
24-
To use a custom dictionary with the `pre-commit` hook, create either a `cspell.config.yaml` or `cspell.json` file in your project's root directory.
25-
26-
`cspell.config.yaml`
27-
28-
```yaml
29-
dictionaryDefinitions:
30-
- name: myWords
31-
path: ./path/to/cSpell_dict.txt
32-
addWords: true
33-
dictionaries:
34-
- myWords
35-
```
36-
37-
`cSpell.json`
38-
39-
```json
40-
{
41-
"dictionaryDefinitions": [
42-
{
43-
"name": "myWords",
44-
"path": "./path/to/cSpell_dict.txt",
45-
"addWords": true
46-
}
47-
],
48-
"dictionaries": ["myWords"]
49-
}
50-
```
51-
52-
If you installed the [Code Spell Checker extension](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker) for VS Code, this can be done automatically from the command palette by running "Spell: Create a CSpell configuration file".
53-
5423
## Install from GitHub
5524

5625
This repo also allows installing the `cspell-cli` directly from GitHub:

docs/use-a-custom-dictionary.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Setup Custom Dictionary
2+
3+
To use a custom dictionary with the `pre-commit` hook, create either a `cspell.config.yaml` or `cspell.json` file in your project's root directory.
4+
5+
`cspell.config.yaml`
6+
7+
```yaml
8+
dictionaryDefinitions:
9+
- name: myWords
10+
path: ./path/to/cSpell_dict.txt
11+
addWords: true
12+
dictionaries:
13+
- myWords
14+
```
15+
16+
`cSpell.json`
17+
18+
```json
19+
{
20+
"dictionaryDefinitions": [
21+
{
22+
"name": "myWords",
23+
"path": "./path/to/cSpell_dict.txt",
24+
"addWords": true
25+
}
26+
],
27+
"dictionaries": ["myWords"]
28+
}
29+
```
30+
31+
If you installed the [Code Spell Checker extension](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker) for VS Code, this can be done automatically from the command palette by running "Spell: Create a CSpell configuration file".
32+

0 commit comments

Comments
 (0)