editor

Slatewave for VSCode

Calm, high-contrast syntax colors tuned for long coding sessions.

Latest release
0.0.9 · last month
Last commit
3 weeks ago
TS analytics.ts ×
TS shiki.ts ×
TS github.ts ×
TS format.ts 1 ×
M README.md
// src/lib/github.ts
import { mkdir, readFile, writeFile } from 'node:fs/promises';
import { join } from 'node:path';

const CACHE_DIR = join(process.cwd(), 'node_modules', '.cache', 'slatewave-github');
const TTL_MS = 30 * 60 * 1000;

export interface RepoMeta {
  stars: number;
  pushedAt: string;
  defaultBranch: string;
  openIssues: number;
  latestRelease: Release | null;
}

export interface Release {
  tag: string;
  name: string;
  publishedAt: string;
  url: string;
}

const memory = new Map<string, Promise<unknown>>();

function cacheKey(parts: string[]): string {
  return parts.join('__').replace(/[^a-zA-Z0-9_]/g, '_');
}

async function readCache<T>(key: string): Promise<T | null> {
  try {
    const raw = await readFile(join(CACHE_DIR, `${key}.json`), 'utf8');
    const parsed = JSON.parse(raw) as { data: T; at: number };
    if (Date.now() - parsed.at < TTL_MS) return parsed.data;
  } catch {
    /* no cache yet */
  }
  return null;
}
main* 2 0 33 +0 ~4 −63
Ln 29, Col 23 Spaces: 2 UTF-8 LF TypeScript ⚡ Prettier

About this theme

A Slatewave palette applied to VSCode and Cursor, with carefully weighted token colors and balanced UI chrome.

Slatewave for VSCode applies the canonical Slatewave palette to editor syntax, workbench chrome, and diff views. Designed to stay legible during long sessions without flattening out semantic color meaning.

Install

Don't have the CLI yet? Install the Slatewave CLI →

  • Slatewave CLI

    One command on macOS, Linux, or Windows — wraps `code --install-extension` and tracks the install in slatewave's state so `slatewave uninstall vscode` reverses it cleanly later.

    slatewave install vscode
  • Marketplace

    Open ↗

    Install from the Visual Studio Marketplace in VSCode or Cursor.

  • VSCode CLI

    Install from an existing VSCode or Cursor instance using the `code` (or `cursor`) command-line tool.

    code --install-extension kevinlangleyjr.slatewave
  • OpenVSX

    Open ↗

    Browse Slatewave on the Open VSX gallery — useful if you've pointed VSCode at OpenVSX, or just prefer the open registry. Click **Download** on the extension page, then drag the .vsix into VSCode or use the CLI command below.

  • VSIX from OpenVSX (CLI)

    Install the downloaded .vsix from the shell — works with vanilla VSCode and any VSCode-compatible CLI tool.

    code --install-extension ~/Downloads/slatewave-*.vsix
  • Manual

    Clone the repo and symlink into your VSCode extensions directory.

    1. git clone https://github.com/kevinlangleyjr/vscode-slatewave
    2. Copy the folder into `~/.vscode/extensions/`
    3. Restart VSCode and pick Slatewave from the command palette