diffs Skill

Use when an app uses @pierre/diffs to render or edit code files, diffs, patches, merge conflicts, or CodeView review surfaces, including React, vanilla JavaScript, SSR, workers, annotations, selection, and custom Shiki languages or themes.

Install
npx skills add 'https://github.com/pierrecomputer/pierre/tree/main/skills/diffs'
Download bundle ↓
View on GitHub
← Back to SKILL.md

Recipe: register custom highlighting

Register a language or theme before the first surface uses it:

import { registerCustomLanguage, registerCustomTheme } from '@pierre/diffs';

registerCustomLanguage(
  'my-language',
  () => import('./my-language.tmLanguage.json'),
  ['myext']
);

registerCustomTheme('my-theme', () => import('./my-theme.json'));

Set file.lang to the custom language name. Set options.theme to the custom theme name. Use registerCustomCSSVariableTheme when CSS variables supply the theme colors.

Referenced from SKILL.md