@codemirror/language-data

Language metadata and dynamic loading for every language mode in the CodeMirror 6 editor

Library
npm
v6.5.2
13stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
26/100Needs Attention
Development Activity12
Maintenance0
Community20
Maturity60
Momentum12

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
68/100Good
Architecture75
Code Quality70
Innovation60
Learning Curve65

@codemirror/language-data is the language registry for CodeMirror 6. Rather than bundling every language package into your editor, it exposes a single languages array of LanguageDescription objects, one per supported language, each carrying filename/extension matchers and a dynamic import() loader for that language’s actual mode package. This lets an editor offer language auto-detection and a full language picker while only downloading the parser code a user actually needs.

What You Get

  • A languages array of LanguageDescription entries covering ~40 languages, ready to feed into a language-picker UI
  • LanguageDescription.matchFilename and matchLanguageName helpers for auto-detecting a language from a file path or name
  • Dynamic import()-based lazy loading so unused language packages never ship to the browser
  • A single dependency surface that transitively pulls in the full set of official @codemirror/lang-* packages for convenience installs

Common Use Cases

  • Building a browser-based code editor (like an in-browser IDE or playground) that needs to auto-detect a file’s language from its extension
  • Populating a ‘change language’ dropdown in a CodeMirror-based editor without manually importing every language package
  • Loading syntax highlighting and language support on demand to keep initial bundle size small in a documentation or notebook tool
  • Powering multi-language snippet or gist editors where the language isn’t known until runtime

Under The Hood

Architecture The entire package is a single 1,000-line file, src/language-data.ts, that constructs one flat languages array of LanguageDescription.of({...}) calls, each entry pairing a name, filename/extension regex, optional MIME/alias list, and a load function that returns import('@codemirror/lang-x'). There is no runtime logic beyond this declarative table plus the LanguageDescription class it re-exports from @codemirror/language; matching (matchFilename, matchLanguageName) is delegated entirely to that upstream class. Tech Stack Written in TypeScript, built with CodeMirror’s shared @codemirror/buildhelper tool, and shipped as both ESM (dist/index.js) and CJS (dist/index.cjs) with bundled .d.ts types. Its dependencies list every official @codemirror/lang-* package (JSON, Python, Rust, SQL, YAML, etc.) plus @codemirror/legacy-modes, but none of them are imported eagerly — they only load through the dynamic import() inside each entry’s load function. Code Quality There are no dedicated unit tests in this repository; correctness is exercised indirectly via CodeMirror’s shared cm-runtests harness used across the monorepo-like family of @codemirror/* packages. The single source file is consistent and readable — one repeated object-literal pattern per language — which keeps the risk surface low despite the absence of local tests. API Design The public surface is minimal and ergonomic: import languages and call LanguageDescription.matchFilename(languages, filename) to get a matching description, then .load() to lazily fetch the actual language support. No configuration objects, no build-step wiring, and no boilerplate beyond that one call — the tradeoff is that customizing the language list (adding a custom language) means constructing your own LanguageDescription array rather than extending this one.

Used by 11 apps in this directory

TypeScript
95%
Apache 2.0

AionUi

AI Agents · Productivity

32,102

Free, open-source Cowork desktop app that unifies Claude Code, Codex, Gemini CLI, and 20+ AI agents into a single platform with multi-agent teams, 24/7 cron automation, and zero-config built-in agent.

View details
88
Repo Health
76
Technical
66
Dependency
Built with
TypeScript95%
Updated today
Go
60%
Apache 2.0

Apache Answer

Community

15,652

Open-source Q&A platform for communities, help centers, and knowledge bases with AI assistant and plugin extensibility

View details
85
Repo Health
78
Technical
69
Dependency
Built with
Go60%
TypeScript36%
Updated 2 days ago
Go
83%
MIT

Gitea

Devops · Developer Tools · Project Management

57,487

Self-hosted DevOps in a single Go binary — Git hosting, GitHub Actions-compatible CI/CD, and 30+ package registries without any SaaS dependency.

View details
93
Repo Health
79
Technical
65
Dependency
Built with
Go83%
Updated today
Go
61%
Apache 2.0

Harness Open Source

Developer Tools · Devops · Code Editors

38,017

A unified open source DevOps platform combining Git hosting, CI/CD pipelines, cloud development environments, and artifact registries in a single self-hosted system.

View details
89
Repo Health
79
Technical
65
Dependency
Built with
Go61%
TypeScript34%
Updated 2 days ago
TypeScript
76%
Other

Joplin

Note Taking

56,003

The privacy-first, open-source note-taking app with end-to-end encrypted sync, AI assistance, and a powerful plugin ecosystem across every platform.

View details
93
Repo Health
87
Technical
62
Dependency
Built with
TypeScript76%
JavaScript15%
Updated yesterday
Go
41%
AGPL 3.0

listmonk

Marketing · Blogging

22,989

High-performance, self-hosted newsletter and mailing list manager packaged as a single binary with built-in analytics, transactional messaging, and multi-channel delivery.

View details
90
Repo Health
74
Technical
68
Dependency
Built with
Go41%
Vue24%
JavaScript19%
Updated yesterday
Python
61%
Apache 2.0

marimo

Developer Tools · Data Engineering

22,393

A reactive Python notebook that eliminates hidden state, runs reproducibly, and deploys as a web app or script — stored as pure Python, built for the AI era.

View details
90
Repo Health
91
Technical
66
Dependency
Built with
Python61%
TypeScript37%
Updated today
TypeScript
76%
AGPL 3.0

massCode

Developer Tools · Productivity · Code Editors

6,959

A free, local-first developer workspace unifying snippets, notes, HTTP requests, calculations, drawings, and dev tools in one desktop app.

View details
86
Repo Health
87
Technical
64
Dependency
Built with
TypeScript76%
Vue22%
Updated 2 days ago
Python
37%
Other

Open WebUI

AI Assistants · AI Agents

149,204

The extensible, privacy-first AI platform that runs Ollama, OpenAI, and any LLM backend behind a polished, feature-packed web interface.

View details
91
Repo Health
75
Technical
66
Dependency
Built with
Python37%
Svelte33%
JavaScript22%
Updated today

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search