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
/**
* 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;
}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.
- macOS — `git clone https://github.com/kevinlangleyjr/sublime-text-slatewave.git "$HOME/Library/Application Support/Sublime Text/Packages/Slatewave"`
- Linux — `git clone https://github.com/kevinlangleyjr/sublime-text-slatewave.git "$HOME/.config/sublime-text/Packages/Slatewave"`
- 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).
- Preferences → Select Color Scheme… → Slatewave
- Preferences → Select Theme… → Slatewave
- Or run "Slatewave — Activate Color Scheme & Theme" from the palette