# codemirror-lang-macaulay2

> Macaulay2 language support for CodeMirror

Latest version **0.3.2** (published 2026-11-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install codemirror-lang-macaulay2
pnpm add codemirror-lang-macaulay2
yarn add codemirror-lang-macaulay2
bun add codemirror-lang-macaulay2
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.3.2 |
| Published | 2026-11-27 |
| First published | 2025-02-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 91.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Doug Torrance |
| Maintainers | dtorrance |
| Keywords | codemirror, language, macaulay2 |

## Links

- npm: https://www.npmjs.com/package/codemirror-lang-macaulay2
- Repository: https://github.com/d-torrance/codemirror-lang-macaulay2
- Issues: https://github.com/d-torrance/codemirror-lang-macaulay2/issues
- npm.io page: https://npm.io/package/codemirror-lang-macaulay2

## Dependencies (2)

- [@codemirror/language](https://npm.io/package/@codemirror/language.md) ^6.0.0
- [@codemirror/legacy-modes](https://npm.io/package/@codemirror/legacy-modes.md) ^6.4.3

## Recent versions

- 0.3.2 (latest) — 2026-11-27
- 0.3.1 — 2026-06-11
- 0.3.0 — 2026-05-30
- 0.2.6 — 2026-05-11
- 0.2.5 — 2026-05-10
- 0.2.4 — 2026-03-01
- 0.2.3 — 2026-01-11
- 0.2.2 — 2026-01-11
- 0.2.1 — 2025-11-16
- 0.2.0 — 2025-05-16
- 0.1.1 — 2025-02-26
- 0.1.0 — 2025-02-26

## README

# Macaulay2 Language for CodeMirror

[![npm version](https://badge.fury.io/js/codemirror-lang-macaulay2.svg)](https://badge.fury.io/js/codemirror-lang-macaulay2)
[![tests](https://github.com/d-torrance/codemirror-lang-macaulay2/actions/workflows/test.yml/badge.svg)](https://github.com/d-torrance/codemirror-lang-macaulay2/actions/workflows/test.yml)

This package provides [Macaulay2](https://macaulay2.com) language support for
[CodeMirror](https://codemirror.net/).

## Installation

```bash
npm install codemirror-lang-macaulay2
```

## Usage

### CodeMirror 6

```js
import { EditorState } from "@codemirror/state";
import { EditorView } from "@codemirror/view";
import { basicSetup } from "codemirror";
import { macaulay2 } from "codemirror-lang-macaulay2";

new EditorView({
  state: EditorState.create({
    doc: "R = QQ[x,y,z,w]\nI = monomialCurveIdeal(R, {1,2,3})",
    extensions: [basicSetup, macaulay2()],
  }),
  parent: document.getElementById("editor"),
});
```

### CodeMirror 5 (legacy)

Import the legacy subpath to automatically register the `macaulay2` mode with
CodeMirror.

```js
import CodeMirror from "codemirror";
import "codemirror/addon/mode/simple";
import "codemirror-lang-macaulay2/legacy";

const editor = CodeMirror.fromTextArea(document.getElementById("editor"), {
  mode: "macaulay2",
});
```

---
_Source: https://npm.io/package/codemirror-lang-macaulay2 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
