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
languageId: refers to file types (like javascript, python, markdown), not spoken languages (like English, German or Spanish).
For historical reasons languageId was chosen to match VSCode's Language Identifiers in meaning.
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:
- Which dictionaries are enabled
- Which patterns and rules apply
- Whether the file should be spell-checked
Usage Examples
Using Overrides
Force a specific file type for certain file patterns:
- cspell.config.yaml
- cspell.json
overrides:
- filename: "**/*.xyz"
languageId: javascript # Treat .xyz files as JavaScript
{
"overrides": [
{
"filename": "**/*.xyz",
"languageId": "javascript"
}
]
}
Using Language Settings
Apply specific settings based on file type:
- cspell.config.yaml
- cspell.json
languageSettings:
- languageId: python,javascript
dictionaries:
- html
- lorem-ipsum
{
"languageSettings": [
{
"languageId": "python,javascript",
"dictionaries": ["html", "lorem-ipsum"]
}
]
}
Related Documentation
- Language Settings - Configure settings per file type
- Overrides - Override settings for specific files
- Searching Dictionaries - Find which dictionaries contain words
Supported File Types
The table below shows the mapping between file extensions/filenames and their associated file type Ids.
ada.adb, .adsapiblueprint.apib, .apiblueprintargdown.ad, .adown, .argdn, .argdownasciidoc.adoc, .asc, .asciidocbat.bat, .cmdbazel.bazel, .bzlbibtex.bibbicep.bicepc.c, .icache_files.DS_Store, .cspellcache, .eslintcacheclojure.clj, .cljc, .cljs, .cljx, .clojure, .edncmakeCMakeLists.txt.cmakecodeownerscodeownerscoffeescript.coffee, .cson, .icedcpp.c++, .c++m, .cc, .ccm, .cpp, .cppm, .cxx, .cxxm, .h, .h++, .h.in, .hh, .hpp, .hpp.in, .hxx, .ii, .inl, .ino, .ipp, .ixx, .mm, .tpp, .txxcpp_embedded_latexcsharp.cake, .cs, .csxcss.csscuda-cpp.cu, .cuhdart.dartdhall.dhalldiff.diff, .patch, .rejdockercompose*docker*compose*.yaml, *docker*compose*.yml, compose.*.yaml, compose.*.yml, compose.yaml, compose.ymldockerfile*.Dockerfile.*, Containerfile, Containerfile.*, Dockerfile, Dockerfile.*, Dockerfile.dev, dockerfile.containerfile, .dockerfileelisp.elelixir.ex, .exselm.elmerb.erb, .html.erb, .rhtmlfsharp.fs, .fsi, .fsscript, .fsxgit-commitCOMMIT_EDITMSG, MERGE_MSGgit-rebasegit-rebase-todogithub-issues.github-issuesgo.gogodot.gd, .godot, .tres, .tscngradle.gradlegroovyJenkinsfile, Jenkinsfile*.gradle, .groovy, .gvy, .jenkinsfile, .nfhaml.hamlhandlebars.handlebars, .hbs, .hjshaskell.hs, .lhshaxe.hxhlsl.cginc, .compute, .fx, .fxh, .hlsl, .hlsli, .psh, .vshhtml.asp, .aspx, .ejs, .htm, .html, .jshtm, .jsp, .mdoc, .rhtml, .shtml, .volt, .vue, .xht, .xhtmlignore.*ignore.git-blame-ignore-revs, .gitignore, .gitignore_global, .npmignoreini.conf, .inijade.jade, .pugjava.jav, .javajavascriptjakefile.cjs, .es6, .js, .mjs, .pacjavascriptreact.jsxjinja.j2, .jinja, .jinja2json.watchmanconfig, composer.lock.babelrc, .bowerrc, .code-profile, .css.map, .eslintrc, .geojson, .har, .ipynb, .js.map, .jscsrc, .jshintrc, .jslintrc, .json, .jsonc, .jsonld, .ts.map, .tsbuildinfo, .vuerc, .webmanifestjsonc.babelrc.json, .code-workspace, .devcontainer.json, .ember-cli, argv.json, babel.config.json, devcontainer.json, extensions.json, jsconfig-*.json, jsconfig.*.json, jsconfig.json, keybindings.json, launch.json, profiles.json, settings.json, tasks.json, tsconfig-*.json, tsconfig.*.json, tsconfig.json, typedoc.json.babelrc, .code-workspace, .color-theme.json, .eslintrc, .eslintrc.json, .hintrc, .icon-theme.json, .jsfmtrc, .jshintrc, .jsonc, .language-configuration.json, .swcrcjsonl.jsonljsx-tagsjulia.jljuliamarkdown.jmdjungle.junglekotlin.ktlatex.ctx, .ltx, .texless.lesslisp.fasl, .l, .lisp, .lspliterate haskell.lhslockCargo.lock, berksfile.lock, composer.lock, package-lock.json.locklog*.log.?.loglua.luamakefileGNUmakefile, Makefile, OCamlMakefile, makefile.mak, .mkmap.map, .css.map, .ts.map, .js.mapmarkdown.markdn, .markdown, .md, .mdown, .mdtext, .mdtxt, .mdwn, .mkd, .workbookmarkdown_latex_combinedmarkdown-mathmdx.mdxmonkeyc.mb, .mcmustache.mst, .mu, .mustache, .stachenix.nixnunjucks.nj, .njk, .nunj, .nunjs, .nunjucks, .tmpl, .tplobjective-c.mobjective-cpp.mmocaml.eliom, .eliomi, .ml, .mli, .mll, .mlypdf.pdfpem.pem, .private-key.pempem-private-key.private-key.pemperl.PL, .pl, .pm, .pod, .psgi, .tperl6.nqp, .p6, .pl6, .pm6php.ctp, .php, .php4, .php5, .phtmlplaintext.txtpowershell.ps1, .psd1, .psm1, .psrc, .psscproperties.env, gitconfig.cfg, .conf, .directory, .editorconfig, .gitattributes, .gitconfig, .gitmodules, .npmrc, .properties, .repoprotobuf.proto, .txtpb, .textproto, .textpb, .pbtxtpuppet.puppetpurescript.purspythonSConscript, SConstruct.cpy, .gyp, .gypi, .ipy, .py, .pyi, .pyt, .pyw, .rpyr.R, .r, .rhistory, .rprofile, .rtraku.nqp, .p6, .pl6, .pm6, .raku, .rakudoc, .rakumod, .rakutestrazor.cshtml, .razorrescript.res, .resirestructuredtext.rstrsaid_rsa, id_rsa.pub.pubrubyGemfile, appfile, appraisals, berksfile, berksfile.lock, brewfile, capfile, cheffile, dangerfile, deliverfile, fastfile, gemfile, guardfile, gymfile, hobofile, matchfile, podfile, puppetfile, rakefile, rantfile, scanfile, snapfile, thorfile, vagrantfile.erb, .gemspec, .podspec, .rake, .rb, .rbi, .rbx, .rjs, .rurust.rssass.sassscala.sbt, .sc, .scalascss.scsssearch-result.code-searchshaderlab.cginc, .shadershellscript.env.*, .envrc, .hushlogin, APKBUILD, PKGBUILD, bashrc_Apple_Terminal, zlogin, zlogout, zprofile, zshenv, zshrc, zshrc_Apple_Terminal.Xsession, .bash, .bash_aliases, .bash_login, .bash_logout, .bash_profile, .bashrc, .csh, .cshrc, .ebuild, .eclass, .fish, .install, .ksh, .profile, .sh, .tcshrc, .xprofile, .xsession, .xsessionrc, .yash_profile, .yashrc, .zlogin, .zlogout, .zprofile, .zsh, .zsh-theme, .zshenv, .zshrcsnippets.code-snippetssql.dsql, .sqlstylus.stylsvelte.svelteswift.swiftterraform.hcl, .tf, .tf.json, .tfvarstex.bbx, .cbx, .cls, .stytfvars.tfvarstodotodotomlCargo.lock, Cargo.toml.tomltypescript.cts, .mts, .tstypescriptreact.tsxtypst.typstvala.valavb.bas, .brs, .vb, .vba, .vbsvue.vuexml.ascx, .atom, .axaml, .axml, .bpmn, .config, .cpt, .csl, .csproj, .csproj.user, .dita, .ditamap, .dtd, .dtml, .ent, .fsproj, .fxml, .iml, .isml, .jmx, .launch, .menu, .mod, .mxml, .nuspec, .opml, .owl, .proj, .props, .pt, .publishsettings, .pubxml, .pubxml.user, .rbxlx, .rbxmx, .rdf, .rng, .rss, .shproj, .storyboard, .svg, .targets, .tld, .tmx, .vbproj, .vbproj.user, .vcxproj, .vcxproj.filters, .wsdl, .wxi, .wxl, .wxs, .xaml, .xbl, .xib, .xlf, .xliff, .xml, .xoml, .xpdl, .xsd, .xulxsl.xsl, .xsltyaml.cff, .eyaml, .eyml, .yaml, .yaml-tmlanguage, .yaml-tmpreferences, .yaml-tmtheme, .ymlzig.zigzon.zonTotal: 125 file types