Skip to content

Latest commit

 

History

History
120 lines (85 loc) · 5.05 KB

File metadata and controls

120 lines (85 loc) · 5.05 KB

GitBlms

English | 简体中文

GitBlms is a VS Code extension that brings a GoLand-style inline Git blame experience into the editor.

Home

1.0.3 Highlights

  • Custom primary annotation color with accessible OKLCH age buckets
  • Separate light/dark theme tones with automatic readable text color
  • Color settings grouped together in VS Code Settings
  • GoLand-inspired left-side blame column with stable layout
  • Age-based color buckets that make new and old code easy to scan at a glance
  • Hover details for author, commit time, hash, and summary
  • git blame --contents - support for unsaved editor content
  • Dedicated configurable style for uncommitted lines
  • Optional current-author highlight color that keeps age buckets but uses your own accent palette
  • Built-in Chinese and English runtime text, plus a custom extension icon
  • Gutter color indicators that show on each wrapped line for visual continuity with word wrap enabled
  • Dynamic username width with configurable maximum annotation width

Preview

GitBlms preview

Features

  • Stable left-side blame column that shows date and author per line
  • Bucketed age colors that emphasize visual contrast instead of a simple alpha fade
  • Gutter color indicators that show on each wrapped line for visual continuity with word wrap enabled
  • Hover-only commit details on the blame area to avoid blocking the code editor
  • Large-file guardrails and blame caching to reduce performance cost
  • Configurable maximum annotation width for compact blame layout
  • Custom primary blame color with automatic OKLCH age buckets, light/dark theme tones, and readable text contrast

Install

  1. Install the extension from the packaged .vsix file or your release artifact.
  2. Open a Git-managed workspace in VS Code.
  3. Run Git: Toggle Inline Git Blame from the command palette.

Default keybinding:

  • Windows / Linux: Ctrl+Alt+B
  • macOS: Cmd+Alt+B

Commands

  • Git: Toggle Inline Git Blame
  • Git: Show Inline Git Blame
  • Git: Hide Inline Git Blame
  • Git: Open Commit Details

Configuration

Setting Default Description
git-blms.enabled false Enables inline blame annotations globally
git-blms.colorScheme "blue" Annotation palette: blue, green, purple, custom
git-blms.customColor "#3b82f6" Primary annotation color used when colorScheme is custom. GitBlms generates readable light/dark theme age buckets from this color instead of using it directly as a flat background
git-blms.dateFormat "absolute" relative or absolute timestamp display
git-blms.maxLineCount 5000 Skip blame rendering for very large files
git-blms.cacheTimeout 60000 Blame cache lifetime in milliseconds
git-blms.maxAnnotationWidth 22 Maximum total width of the annotation (time + separator + username). Time uses 10 display width, separator uses 2. Username uses the remaining space dynamically.
git-blms.uncommittedColor "#2ea043" Color for uncommitted lines. Use hex to get a picker or inline preview in Settings
git-blms.highlightCurrentAuthor false Highlights lines authored by the current Git user with a separate accent color
git-blms.currentAuthorColor "#d97706" Accent color for current-user committed lines. Use hex to get a picker or inline preview in Settings
git-blms.language "auto" UI language: auto, zh-CN, en

Notes

VS Code decorations can render a stable info column before code and provide hover details, but they cannot fully reproduce GoLand's clickable gutter text. Easy Git therefore takes the closest practical approach:

  • A fixed blame column before code
  • Time-bucketed colors with stronger contrast
  • Commit actions through hover links and the command palette

Development

Update the root VERSION file before packaging. The packaging scripts sync that value into package.json and package-lock.json.

npm install
npm run compile
npm test

Press F5 to launch the extension development host.

Open VSX Publishing

The repo includes a PowerShell helper script for Open VSX publishing:

npm run package:vsix
npm run publish:openvsx

If you need to create the publisher namespace first:

npm run publish:openvsx:namespace

The script reads the token from OPENVSX_TOKEN or OVSX_PAT, and it also supports passing -Token manually to ./scripts/publish-openvsx.ps1.

GitHub Actions

The repository includes an automated Open VSX workflow at .github/workflows/publish-openvsx.yml.

  • Trigger: pushing a tag like v1.0.1
  • Manual trigger: GitHub Actions workflow_dispatch
  • Required secret: OPENVSX_TOKEN

Once OPENVSX_TOKEN is configured in the repository secrets, pushing a new version tag will automatically lint, test, package, and publish the extension to Open VSX.