editor

Slatewave for Sublime Text

A full Sublime color scheme plus UI theme, with a one-shot activation command.

Stars
★ 1
Latest release
0.0.3 · 2 months ago
Last commit
3 weeks ago
github.ts ×
+
/**
 * Build-time GitHub metadata fetchers.
 *
 * Public-repo data only. Unauthenticated requests are rate-limited to
 * 60/hour per IP; set GITHUB_TOKEN in .env (or the CI environment) to
 * raise that to 5000/hour.
 *
 * Results are cached to `node_modules/.cache/slatewave-github/` with a
 * 30-minute TTL so dev hot-reloads don't burn API quota.
 */
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;
  body: string;
  isPrerelease: boolean;
}

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;
}
Line 58, Column 14
main 2 Spaces: 2 TypeScript

About this theme

Both halves of a Sublime Text theme — Slatewave.sublime-color-scheme for syntax, and Slatewave.sublime-theme for sidebar, tabs, status bar, quick panel, and auto-complete chrome — activated together via a single command palette entry.

Slatewave for Sublime Text ships both a color scheme and a UI theme so every pixel — from editor tokens to the status bar, quick panel, and auto-complete kind labels — reads in the Slatewave palette. The color scheme works standalone if you want to keep a different UI theme.

A bundled Slatewave: Activate Color Scheme & Theme palette command flips both at once, so you don’t have to set them separately.

A Package Control listing is in flight; until then, the clone path above is the install.

Install

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

  • Slatewave CLI

    Install with the Slatewave family CLI — one command, every theme.

    slatewave install sublime-text
  • Clone

    Clone into Sublime's Packages directory. The path differs by platform.

    1. macOS — `git clone https://github.com/kevinlangleyjr/sublime-text-slatewave.git "$HOME/Library/Application Support/Sublime Text/Packages/Slatewave"`
    2. Linux — `git clone https://github.com/kevinlangleyjr/sublime-text-slatewave.git "$HOME/.config/sublime-text/Packages/Slatewave"`
    3. Windows — `git clone https://github.com/kevinlangleyjr/sublime-text-slatewave.git "%APPDATA%\Sublime Text\Packages\Slatewave"`
  • Activate

    Once installed, pick the theme from Sublime's settings (or use the bundled command palette entry).

    1. Preferences → Select Color Scheme… → Slatewave
    2. Preferences → Select Theme… → Slatewave
    3. Or run "Slatewave — Activate Color Scheme & Theme" from the palette