-
-
Notifications
You must be signed in to change notification settings - Fork 117
docs: Update for available languageIds #8367
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
Merged
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
bbadb57
docs: availasble languages update
mrksbnc d709d8a
new docu page createdfor prog lang dictionaries
mrksbnc c346121
Merge branch 'main' into feat/8202-docs-lang-list-update
mrksbnc 10f798c
feat: new table component
mrksbnc faaaf3d
[autofix.ci] apply automated fixes
autofix-ci[bot] 7cd84c3
Merge branch 'main' into feat/8202-docs-lang-list-update
mrksbnc 7ba27b3
chore: PR comment update
mrksbnc 51853f5
chore: PR comment update
mrksbnc c3364ea
chore: PR comment update
mrksbnc a2f365a
chore: pnpm version update & available languages
mrksbnc 71b3838
[autofix.ci] apply automated fixes
autofix-ci[bot] f7ae7fe
Merge branch 'main' into feat/8202-docs-lang-list-update
mrksbnc c82e7e2
component and doc rework
mrksbnc b1cfc88
[autofix.ci] apply automated fixes
autofix-ci[bot] e0a10af
chore: typo update
mrksbnc c1b84a7
Update package.json
Jason3S 79566a4
Add tabbed cofnig
Jason3S 5ca6c1c
Make sure the site will build when deployed
Jason3S 160505c
Rename to file-types
Jason3S 32aa7b2
Merge branch 'main' into feat/8202-docs-lang-list-update
Jason3S 8b5e692
Update file-types.mdx
Jason3S 431c7c8
Re-order the sidebar under configuration
Jason3S File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,12 @@ | ||
| { | ||
| "json.schemas": [{ | ||
| "fileMatch": [ | ||
| "cspell.json", ".cspell.json", "cSpell.json" | ||
| ], | ||
| "url": "./cspell.schema.json" | ||
| }] | ||
| "json.schemas": [ | ||
| { | ||
| "fileMatch": [ | ||
| "cspell.json", | ||
| ".cspell.json", | ||
| "cSpell.json" | ||
| ], | ||
| "url": "./cspell.schema.json" | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| export { | ||
| fileTypeDefinitions, | ||
| findMatchingFileTypes as findMatchingFileTypes, | ||
| getFileTypesForExt, | ||
| isBinaryExt, | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,98 @@ | ||
| --- | ||
| title: 'File Types and Extensions' | ||
| sidebar_position: 12 | ||
| sidebar_label: File Types | ||
| --- | ||
|
|
||
| import Tabs from '@theme/Tabs'; | ||
| import TabItem from '@theme/TabItem'; | ||
|
|
||
| import { FileTypeTable } from '@site/src/components/FileTypeTable'; | ||
|
|
||
| # File Types and Extensions | ||
|
|
||
| This page provides a reference for how CSpell associates file extensions with file type IDs (also called `languageId` in configuration files for historical reasons). | ||
|
|
||
| ## Understanding File Type Ids | ||
|
|
||
| :::info Terminology Note | ||
| In CSpell configuration files, the field is called `languageId` for historical reasons (to match VSCode's convention). However, this refers to **file types** (like `javascript`, `python`, `markdown`), not spoken languages (like English, German or Spanish). | ||
| ::: | ||
|
|
||
| ## How CSpell Determines File Types | ||
|
|
||
| CSpell uses file extensions and filenames to determine the file type, which then influences: | ||
| 1. Which dictionaries are enabled | ||
| 2. Which patterns and rules apply | ||
| 3. Whether the file should be spell-checked | ||
|
|
||
| ## Usage Examples | ||
|
|
||
| ### Using Overrides | ||
|
|
||
| Force a specific file type for certain file patterns: | ||
|
|
||
| <Tabs> | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I added this to give an example of how to have config tabs. I think a new ConfigTabs component would be useful: <ConfigTabs value={{ overrides: [] }} formats={['yaml', 'json', 'esm' ]} >
</ConfigTabs> |
||
| <TabItem value="yaml" label="cspell.config.yaml"> | ||
| ```yaml | ||
| overrides: | ||
| - filename: "**/*.xyz" | ||
| languageId: javascript # Treat .xyz files as JavaScript | ||
| ``` | ||
| </TabItem> | ||
| <TabItem value="json" label="cspell.json"> | ||
| ```json | ||
| { | ||
| "overrides": [ | ||
| { | ||
| "filename": "**/*.xyz", | ||
| "languageId": "javascript" | ||
| } | ||
| ] | ||
| } | ||
| ``` | ||
| </TabItem> | ||
| </Tabs> | ||
|
|
||
|
|
||
| ### Using Language Settings | ||
|
|
||
| Apply specific settings based on file type: | ||
|
|
||
|
|
||
| <Tabs> | ||
| <TabItem value="yaml" label="cspell.config.yaml"> | ||
| ```yaml | ||
| languageSettings: | ||
| - languageId: python,javascript | ||
| dictionaries: | ||
| - html | ||
| - lorem-ipsum | ||
| ``` | ||
| </TabItem> | ||
| <TabItem value="json" label="cspell.json"> | ||
| ```json | ||
| { | ||
| "languageSettings": [ | ||
| { | ||
| "languageId": "python,javascript", | ||
| "dictionaries": ["html", "lorem-ipsum"] | ||
| } | ||
| ] | ||
| } | ||
| ``` | ||
| </TabItem> | ||
| </Tabs> | ||
|
|
||
|
|
||
| ## Related Documentation | ||
|
|
||
| - [Language Settings](./language-settings.mdx) - Configure settings per file type | ||
| - [Overrides](./overrides.md) - Override settings for specific files | ||
| - [Searching Dictionaries](../dictionaries/searching-dictionaries.md) - Find which dictionaries contain words | ||
|
|
||
| ## Supported File Types | ||
|
|
||
| The table below shows the mapping between file extensions/filenames and their associated file type Ids. | ||
|
|
||
| <FileTypeTable /> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we might want to export a "clean" version of the definitions instead of the raw data. The raw table is designed to allow contributors to easily add new extensions.
I'll take care of this.