or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

docs

index.md
tile.json

tessl/npm-cspell-dicts

Comprehensive collection of 124+ spell checking dictionaries for cspell covering programming languages, natural languages, and specialized domains.

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
npmpkg:npm/cspell-dicts@31.4.x

To install, run

npx @tessl/cli install tessl/npm-cspell-dicts@31.4.0

index.mddocs/

CSpell Dictionaries

CSpell Dictionaries is a comprehensive monorepo containing 110+ spell checking dictionary packages for the CSpell spell checker. It provides dictionaries for 40+ natural languages, 30+ programming languages, and numerous specialized domains, enabling accurate spell checking across diverse codebases and documentation.

Package Information

  • Package Name: cspell-dicts (monorepo)
  • Package Type: npm (collection of packages)
  • Language: JavaScript/TypeScript (configuration)
  • Installation: Individual packages via npm install @cspell/dict-{name} or bundle via npm install @cspell/dict-cspell-bundle

Core Imports

Bundle Package (Recommended)

For most use cases, install the comprehensive bundle:

npm install @cspell/dict-cspell-bundle
// Automatic loading via CSpell configuration
// Add to cspell.json:
{
  "import": ["@cspell/dict-cspell-bundle"]
}

Individual Dictionary Packages

All dictionary packages follow a standardized import pattern:

// Each package exports CSpell configuration
import pythonDict from "@cspell/dict-python";
import typescriptDict from "@cspell/dict-typescript";
import awsDict from "@cspell/dict-aws";

// Standard exports for all packages:
// - Default: "./cspell-ext.json"
// - Named: "./cspell" -> "./cspell-ext.json"  
// - Direct: "./cspell-ext.json"

CommonJS:

const pythonDict = require("@cspell/dict-python");
const typescriptDict = require("@cspell/dict-typescript");

Basic Usage

CSpell Configuration File (Recommended)

Add to cspell.json:

{
  "import": ["@cspell/dict-cspell-bundle"],
  "dictionaries": ["typescript", "python", "aws", "docker"]
}

Or use individual packages:

{
  "import": [
    "@cspell/dict-typescript",
    "@cspell/dict-python", 
    "@cspell/dict-aws"
  ]
}

VSCode Configuration

Add to .vscode/settings.json:

{
  "cSpell.import": ["@cspell/dict-cspell-bundle"],
  "cSpell.dictionaries": ["typescript", "python", "aws"]
}

Programmatic Usage

import { readFileSync } from 'fs';

// Load any dictionary package configuration
const dictPath = require.resolve("@cspell/dict-typescript");
const dictConfig = JSON.parse(
  readFileSync(dictPath, 'utf8')
    .replace(/\/\/.*$/gm, '')    // Remove comments
    .replace(/,\s*}/g, '}')      // Clean trailing commas
);

console.log(dictConfig.id);                    // "typescript"
console.log(dictConfig.dictionaryDefinitions); // Dictionary files
console.log(dictConfig.languageSettings);      // Language-specific rules

Architecture

The CSpell Dictionaries monorepo is organized as follows:

  • 110+ Individual Packages: Each dictionary is published as @cspell/dict-{name}
  • Standardized Exports: All packages export cspell-ext.json configuration files
  • Bundle Package: @cspell/dict-cspell-bundle includes 63 core dictionaries
  • Language Settings: Packages include syntax patterns, ignore rules, and file associations
  • Dictionary Files: Raw word lists in compressed .gz format for efficient distribution
  • Zero Dependencies: Each package is self-contained with no runtime dependencies

Package Structure Pattern

Every dictionary package follows this structure:

@cspell/dict-{name}/
├── package.json        # Package metadata
├── cspell-ext.json     # Main CSpell configuration
├── dict/              # Dictionary word files (.gz)
└── README.md          # Package documentation

Capabilities

Bundle Package

The primary entry point providing curated dictionary collections for common development scenarios.

/**
 * Main bundle package containing 63 essential dictionaries
 * Covers programming languages, web technologies, and development tools
 */
interface CSpellBundle {
  id: "cspell-bundle";
  import: string[];  // 63 dictionary package imports
  dictionaries: string[];  // Available dictionary names
}

Bundle Package

Natural Language Dictionaries

Comprehensive spell checking for 40+ natural languages including all major world languages and regional variants.

/**
 * Natural language dictionary packages
 * Pattern: @cspell/dict-{language-code}
 */
interface NaturalLanguageDict {
  /** English variants: en_us, en-gb, en-au, en-ca */
  english: string[];
  /** European: fr-fr, de-de, es-es, it-it, pt-pt, nl-nl, etc. */
  european: string[];
  /** Slavic: ru_ru, pl_pl, cs-cz, hr-hr, bg-bg, etc. */
  slavic: string[];
  /** Asian: ar, he, bn, vi-vn, id-id, etc. */
  asian: string[];
  /** Other: ca, eu, eo, la, grc */
  specialized: string[];
}

Natural Languages

Programming Language Dictionaries

Specialized dictionaries for 30+ programming languages with syntax awareness and framework support.

/**
 * Programming language dictionary packages  
 * Pattern: @cspell/dict-{language}
 */
interface ProgrammingLanguageDict {
  /** Web: typescript, html, css, vue, svelte */
  web: string[];
  /** Systems: rust, golang, cpp, csharp, fsharp */
  systems: string[];
  /** General: python, java, scala, kotlin, swift, ruby, php */
  general: string[];
  /** Functional: haskell, elixir, clojure, elisp */
  functional: string[];
  /** Scripting: bash, shell, powershell */
  scripting: string[];
}

Programming Languages

Technology & Framework Dictionaries

Domain-specific dictionaries for cloud platforms, development tools, and popular frameworks.

/**
 * Technology and framework dictionary packages
 * Pattern: @cspell/dict-{technology}
 */
interface TechnologyDict {
  /** Cloud: aws, google, docker, k8s, terraform */
  cloud: string[];
  /** Frameworks: dotnet, django, flutter, node, npm */
  frameworks: string[];
  /** Tools: git, vim, latex, markdown, makefile, sql */
  tools: string[];
}

Technologies & Frameworks

Specialized Domain Dictionaries

Dictionaries for specific industries, scientific fields, and specialized terminology.

/**
 * Specialized domain dictionary packages
 * Pattern: @cspell/dict-{domain}
 */
interface SpecializedDict {
  /** Scientific: scientific-terms-us, medicalterms, data-science */
  scientific: string[];
  /** Business: companies, public-licenses */
  business: string[];
  /** Technical: software-terms, fullstack, cryptocurrencies, filetypes */
  technical: string[];
  /** Geographic: city-names-finland, people-names */
  geographic: string[];
}

Specialized Domains

Configuration API

All dictionary packages export standardized CSpell configuration objects:

/**
 * Standard dictionary package export structure
 */
interface CSpellDictionaryConfig {
  /** Dictionary identifier */
  id: string;
  /** Configuration version */
  version: string;
  /** Display name */
  name: string;
  /** Package description */
  description: string;
  /** Dictionary definitions */
  dictionaryDefinitions: DictionaryDefinition[];
  /** Language-specific settings */
  languageSettings?: LanguageSettings[];
  /** File pattern overrides */
  overrides?: Override[];
  /** External dependencies */
  import?: string[];
}

interface DictionaryDefinition {
  /** Dictionary name */
  name: string;
  /** Path to dictionary file */
  path: string;
  /** Dictionary description */
  description: string;
}

interface LanguageSettings {
  /** Target language ID */
  languageId: string;
  /** Dictionaries to use */
  dictionaries: string[];
  /** Patterns to ignore */
  ignoreRegExpList?: string[];
  /** Syntax patterns */
  patterns?: Pattern[];
}

interface Pattern {
  /** Pattern name */
  name: string;
  /** Pattern description */
  description?: string;
  /** Regex pattern */
  pattern: string | string[];
}

interface Override {
  /** File pattern to match */
  filename: string;
  /** Dictionaries for matched files */
  dictionaries: string[];
}

Installation Patterns

Bundle Installation (Recommended)

npm install @cspell/dict-cspell-bundle

Category-Specific Installation

# Programming languages
npm install @cspell/dict-typescript @cspell/dict-python @cspell/dict-rust

# Natural languages  
npm install @cspell/dict-en_us @cspell/dict-fr-fr @cspell/dict-de-de

# Cloud & DevOps
npm install @cspell/dict-aws @cspell/dict-docker @cspell/dict-k8s

Complete Development Stack

npm install @cspell/dict-typescript @cspell/dict-node @cspell/dict-html @cspell/dict-css @cspell/dict-git @cspell/dict-docker

Types

/**
 * Type definitions for the cspell-dicts monorepo
 */
interface CSpellDictsMonorepo {
  /** Individual dictionary packages (110+) */
  packages: Record<string, CSpellDictionaryConfig>;
  /** Main bundle package */
  bundle: CSpellBundle;
  /** Package categories */
  categories: {
    naturalLanguages: string[];
    programmingLanguages: string[];
    technologies: string[];
    specialized: string[];
  };
}

/**
 * Package naming pattern: @cspell/dict-{name}
 * Configuration export: cspell-ext.json
 * Word files: dict/*.gz
 */
type DictionaryPackageName = `@cspell/dict-${string}`;
type ConfigurationFile = "cspell-ext.json";