# @git-diff-view/lowlight

> @git-diff-view/lowlight

Latest version **0.1.8** (published 2026-10-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install @git-diff-view/lowlight
pnpm add @git-diff-view/lowlight
yarn add @git-diff-view/lowlight
bun add @git-diff-view/lowlight
```

## Health

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

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

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.1.8 |
| Published | 2026-10-15 |
| First published | 2024-03-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 349.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 742 |
| Author | MrWangJustToDo |
| Maintainers | mrwang555 |
| Keywords | highlight, virtual dom highlight |

## Links

- npm: https://www.npmjs.com/package/@git-diff-view/lowlight
- Repository: https://github.com/MrWangJustToDo/git-diff-view
- Homepage: https://mrwangjusttodo.github.io/git-diff-view
- Issues: https://github.com/MrWangJustToDo/git-diff-view/issues
- npm.io page: https://npm.io/package/@git-diff-view/lowlight

## Dependencies (3)

- [lowlight](https://npm.io/package/lowlight.md) ^3.3.0
- [@types/hast](https://npm.io/package/@types/hast.md) ^3.0.0
- [highlight.js](https://npm.io/package/highlight.js.md) ^11.11.0

## Alternatives

- [@oh-my-pi/pi-natives](https://npm.io/package/@oh-my-pi/pi-natives.md) — 51.8K weekly downloads
- [@capgo/capacitor-light-sensor](https://npm.io/package/@capgo/capacitor-light-sensor.md) — 3.0K weekly downloads
- [@heyhuynhgiabuu/pi-diff](https://npm.io/package/@heyhuynhgiabuu/pi-diff.md) — 492 weekly downloads
- [@lotsa/verdant-lang-asm](https://npm.io/package/@lotsa/verdant-lang-asm.md) — 38 weekly downloads
- [new-era-syntax](https://npm.io/package/new-era-syntax.md) — 20 weekly downloads

## Recent versions

- 0.1.8 (latest) — 2026-10-15
- 0.1.7 — 2026-07-13
- 0.1.6 — 2026-06-21
- 0.1.5 — 2026-05-26
- 0.1.4 — 2026-05-18
- 0.1.3 — 2026-03-19
- 0.1.2 — 2026-03-12
- 0.1.1 — 2026-03-05
- 0.1.0 — 2026-03-04
- 0.0.40 — 2026-02-26
- 0.0.39 — 2026-02-04
- 0.0.38 — 2026-02-04
- 0.0.37 — 2026-02-04
- 0.0.36 — 2026-01-08
- 0.0.35 — 2025-10-20
- … 26 more at https://npm.io/package/@git-diff-view/lowlight/versions

## README

# @git-diff-view/lowlight

> Built-in syntax highlighter for @git-diff-view using lowlight

[![npm version](https://img.shields.io/npm/v/@git-diff-view/lowlight)](https://www.npmjs.com/package/@git-diff-view/lowlight)
[![npm downloads](https://img.shields.io/npm/dm/@git-diff-view/lowlight)](https://www.npmjs.com/package/@git-diff-view/lowlight)

This package is the **default syntax highlighter** built into [@git-diff-view/core](../core). It uses [lowlight](https://github.com/wooorm/lowlight) (highlight.js wrapper) for syntax highlighting.

## Features

- ✅ Built into @git-diff-view/core by default
- ✅ No additional installation required
- ✅ Based on highlight.js
- ✅ Supports 190+ languages
- ✅ Fast and lightweight
- ✅ Works in browser and Node.js

## Usage

No explicit setup needed - it's automatically used by @git-diff-view/core:

```typescript
import { DiffFile } from "@git-diff-view/core";

const file = new DiffFile(/* ... */);
file.init();  // Automatically uses lowlight for syntax highlighting
```

## When to Use

This is the default highlighter and suitable for most use cases.

Consider [@git-diff-view/shiki](../shiki) if you need:
- More accurate syntax highlighting
- VSCode-compatible themes
- Better language grammar support

Consider [@git-diff-view/lezer](../lezer) if you need:
- Pure JS LR parsers (no WASM)
- Constrained runtimes such as Lynx
- Customizable Lezer tag colors

## Related Packages

- [@git-diff-view/core](https://www.npmjs.com/package/@git-diff-view/core) - Core package that includes this
- [@git-diff-view/shiki](https://www.npmjs.com/package/@git-diff-view/shiki) - Shiki highlighter
- [@git-diff-view/lezer](https://www.npmjs.com/package/@git-diff-view/lezer) - Lezer highlighter
- [lowlight](https://github.com/wooorm/lowlight) - Underlying library
- [highlight.js](https://highlightjs.org/) - Language definitions

## License

MIT © [MrWangJustToDo](https://github.com/MrWangJustToDo)

---
_Source: https://npm.io/package/@git-diff-view/lowlight · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
