Skip to content

Commit ee472ce

Browse files
mnemoticJason3Sautofix-ci[bot]
authored
feat: add dictionary for the Zig programming language (#4943)
Co-authored-by: Jason Dent <Jason3S@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
1 parent 6580e7e commit ee472ce

File tree

14 files changed

+3668
-0
lines changed

14 files changed

+3668
-0
lines changed

dictionaries/zig/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Change Log
2+
3+
## 1.0.0
4+
5+
- Initial Release

dictionaries/zig/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2023-2025 Street Side Software <support@streetsidesoftware.nl>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

dictionaries/zig/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# CSpell Zig Dictionary
2+
3+
Zig dictionary for cspell.
4+
5+
This is a pre-built dictionary for use with CSpell.
6+
7+
<!--- @@inject: ../../static/requirements.md --->
8+
9+
<!--- @@inject: ./static/install.md --->
10+
11+
<!--- @@inject: ../../static/contributing.md --->
12+
13+
## License
14+
15+
MIT
16+
17+
> Some packages may have other licenses included.
18+
19+
Keywords taken from [emanspeaks/cspell-zig](https://github.com/emanspeaks/cspell-zig),
20+
licensed under the terms of the MIT license.
21+
22+
Code samples in the `samples/` directory taken from the [Zig standard library](https://github.com/ziglang/zig),
23+
licensed under the terms of the MIT license.
24+
25+
<!--- @@inject: ../../static/footer.md --->

dictionaries/zig/checksum.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
fd69c3d8eb9aabb21ca34d7732cbd11500be08ee dict/zig.txt
2+
804448ef672af46ccdfb439bbbfbba6902d51cbf src/zig.txt

dictionaries/zig/cspell-ext.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"id": "zig",
3+
"version": "0.2",
4+
"name": "Zig",
5+
"description": "Zig dictionary for cspell.",
6+
"readonly": true,
7+
"dictionaryDefinitions": [
8+
{
9+
"name": "zig",
10+
"path": "./dict/zig.txt",
11+
"description": "Zig dictionary for cspell."
12+
}
13+
],
14+
"dictionaries": [],
15+
"languageSettings": [
16+
{
17+
"languageId": "zig",
18+
"locale": "*",
19+
"includeRegExpList": [],
20+
"ignoreRegExpList": [],
21+
"patterns": [],
22+
"dictionaries": ["zig"],
23+
"dictionaryDefinitions": []
24+
},
25+
{
26+
"languageId": "zon",
27+
"locale": "*",
28+
"ignoreRegExpList": ["/\\.hash =.*/g"],
29+
"dictionaries": ["zig"]
30+
}
31+
],
32+
"overrides": [
33+
{
34+
"filename": "**/*.zig",
35+
"languageId": "zig"
36+
},
37+
{
38+
"filename": "**/*.zon",
39+
"languageId": "zon"
40+
}
41+
]
42+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/streetsidesoftware/cspell/main/packages/cspell-tools/cspell-tools.config.schema.json
2+
3+
targets:
4+
- name: 'zig'
5+
sources:
6+
- filename: 'src/zig.txt'
7+
maxDepth: 1 # This is set to 1 to prevent initial builds from taking too long.
8+
format: 'plaintext'
9+
targetDirectory: './dict'
10+
generateNonStrict: false
11+
compress: false
12+
checksumFile: true

dictionaries/zig/cspell.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"version": "0.2",
3+
"files": [
4+
"**/*.{md,txt}"
5+
],
6+
"dictionaries": [
7+
"zig"
8+
],
9+
"import": [
10+
"./cspell-ext.json"
11+
],
12+
"words": [
13+
"emanspeaks"
14+
]
15+
}

dictionaries/zig/dict/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Dict Directory
2+
3+
NOTE: This directory contains generated content. Please edit [src](../src/README.md) files.

dictionaries/zig/dict/zig.txt

Lines changed: 93 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dictionaries/zig/package.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"name": "@cspell/dict-zig",
3+
"version": "1.0.0",
4+
"description": "Zig dictionary for cspell. -- Private until verified",
5+
"private": true,
6+
"publishConfig": {
7+
"access": "public",
8+
"provenance": true
9+
},
10+
"exports": {
11+
".": "./cspell-ext.json",
12+
"./cspell": "./cspell-ext.json",
13+
"./cspell-ext.json": "./cspell-ext.json"
14+
},
15+
"scripts": {
16+
"build": "cross-env NODE_OPTIONS=--max_old_space_size=8192 cspell-tools-cli build",
17+
"test": "head -n 1000 \"src/zig.txt\" | cspell -c ./cspell-ext.json \"--locale=*\" \"--languageId=zig\" stdin",
18+
"prepublishOnly": "echo OK",
19+
"prepare:dictionary": "pnpm run build"
20+
},
21+
"repository": {
22+
"type": "git",
23+
"url": "https://github.com/streetsidesoftware/cspell-dicts"
24+
},
25+
"keywords": [
26+
"cspell",
27+
"cspell-ext",
28+
"zig",
29+
"Zig",
30+
"dictionary",
31+
"spelling"
32+
],
33+
"author": "Street Side Software",
34+
"contributors": [],
35+
"license": "MIT",
36+
"bugs": {
37+
"url": "https://github.com/streetsidesoftware/cspell-dicts/issues"
38+
},
39+
"homepage": "https://github.com/streetsidesoftware/cspell-dicts/blob/main/dictionaries/zig#readme",
40+
"devDependencies": {},
41+
"dependencies": {},
42+
"files": [
43+
"dict/zig.txt",
44+
"cspell-ext.json",
45+
"*.js",
46+
"*.d.ts"
47+
]
48+
}

0 commit comments

Comments
 (0)