mirror of
https://github.com/Nexoniarz/YAPF.git
synced 2026-11-02 20:44:27 +00:00
- yapf_encode() / yapf_free_buffer(): encode to memory; yapf_save uses it - yapf.c also compiles as C++ - `yapf compare`: size and decode speed of the original format vs YAPF, with a lossless check - bindings with tested examples: C++ (header-only), C# (P/Invoke), Rust (crate, builds the C code), Go (cgo), Java (FFM API, Java 22+), Zig (@cImport), LuaJIT (FFI), TypeScript types for the JS port; Python now encodes in memory - docs/LANGUAGES.md and examples/ with measured results - KDE Dolphin thumbnail plugin (KF6, CMake) - README: honest status for Photoshop / VS Code / Figma (not run in the apps yet) and macOS (cross-compiled only), platform table Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1.2 KiB
1.2 KiB
YAPF Image Preview for VS Code
Click any .yapf file in VS Code to see the image.
- Checkerboard behind transparent pixels.
- Click to switch between fit to window and 100 %; Ctrl + scroll to zoom (pixels stay sharp when enlarged).
- Picker for every mip level stored in the file.
- Info bar: size, channels, sRGB / linear, GPU format hint, file size and compression ratio, decode time.
- Reloads automatically when the file changes on disk.
Decoding runs in plain JavaScript inside the preview; no native code.
Install
-
From a release: download
yapf-preview.vsix, then in VS Code run Extensions: Install from VSIX… (orcode --install-extension yapf-preview.vsix). -
From source (needs Node.js):
cd extensions/vscode npm run package # → yapf-preview-1.0.0.vsix code --install-extension yapf-preview-1.0.0.vsix
Should work in VS Code 1.75+ and VS Code–based editors such as VSCodium.
Status
The .vsix packages cleanly, and the preview code was tested in a browser
engine (headless Chromium) with real files: correct pixels, mip picker,
error message for corrupt files. It has not yet been run inside VS Code
itself.