MCPcopy Index your code
hub / github.com/KazariEX/plain-shiki

github.com/KazariEX/plain-shiki @v0.3.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.3.2 ↗ · + Follow
23 symbols 53 edges 14 files 0 documented · 0% 1 cross-repo links updated 8mo agov0.3.2 · 2025-11-02★ 90
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Plain Shiki

version downloads license

Highlight your plaintext in any container via Shiki.

By using the CSS Custom Highlight API, code can be highlighted on plain text nodes without rich text. It will help you get the lightest code editor.

Installation

pnpm i plain-shiki

Usage

  1. Firstly, create any element that can contain text nodes, e.g. `

`

  1. Add the contenteditable attribute to this element. If you don't mind the compatibility of the target browser, you can specify its value as plaintext-only

  2. Write the following code:

import { createPlainShiki } from "plain-shiki";
import { createHighlighterCore } from "shiki/core";
import { createJavaScriptRegexEngine } from "shiki/engine-javascript.mjs";
import grammarTs from "shiki/langs/typescript.mjs";
import vitesseDark from "shiki/themes/vitesse-dark.mjs";
import vitesseLight from "shiki/themes/vitesse-light.mjs";

const shiki = await createHighlighterCore({
  langs: [grammarTs],
  themes: [vitesseLight, vitesseDark],
  engine: createJavaScriptRegexEngine(),
});

const el = document.querySelector(".plain-shiki") as HTMLElement;

createPlainShiki(shiki).mount(el, {
  lang: "ts",
  themes: {
    light: "vitesse-light",
    dark: "vitesse-dark",
  },
});

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Function 17
Interface 6

Languages

TypeScript100%

Modules by API surface

src/index.ts12 symbols
src/utils.ts3 symbols
src/diff.ts3 symbols
src/types.ts2 symbols
test/diff.test.ts1 symbols
playground/app/utils/index.ts1 symbols
playground/app/components.d.ts1 symbols

Used by 1 indexed graphs manifest dependencies, hub-wide

For agents

$ claude mcp add plain-shiki \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page