A VSCode extension to help developers resolve Jujutsu (JJ) conflicts interactively and systematically — group related conflicts, suggest resolution order and strategy.
Adapted from the original So Many Conflicts extension by Bo Shen (@Symbolk) for the Jujutsu version control system.

Unlike Git's 3-way merge markers, JJ uses an N-way conflict format with diff sections and literal sections:
<<<<<<< Conflict 1 of N
%%%%%%% diff description
\\\\\\\ to: side [#1](https://github.com/nmindz/somanyconflicts-jj/issues/1)
+added line (added by this side)
-removed line (removed by this side)
context line (unchanged)
+++++++ side [#2](https://github.com/nmindz/somanyconflicts-jj/issues/2)
literal content of side 2
(raw lines, no prefix)
>>>>>>> Conflict 1 of N ends
Key differences from Git:
<<<<<<< — suffix is Conflict X of Y (numbered)
%%%%%%% — introduces a diff section (changes from base to side)
\\\\\\\ — optional description line after %%%%%%%
+++++++ — introduces a literal content section
>>>>>>> — suffix includes ends
- N-way conflicts: can have multiple
%%%%%%% and +++++++ sections
Features
- Group related JJ conflicts and order them topologically — related means: depending/depended, similar, or close.
- Interactively suggest the next related conflict to resolve.
- Suggest resolution strategy based on already resolved relevant conflicts.
- Full N-way conflict support — parse arbitrary numbers of diff and literal sections.
- Configurable naming: JJ-native ("Side 1", "Side 2") or Git-friendly ("Current", "Incoming").
- One-click resolution: Accept Side 1 / Side 2 / … / Accept All / Accept None CodeLens actions above each conflict block.
Language Support
- Java
- TypeScript
- JavaScript
- Python
Requirements
- OS: macOS / Linux / Windows
- VSCode: ^1.45.0
- Jujutsu (jj) installed and on PATH (for
jj resolve --list)
Installation
From VSIX (Local Build)
Build the extension package:
npx @vscode/vsce package --no-dependencies
This produces a .vsix file (e.g., somanyconflicts-jj-0.1.0.vsix).
In VSCode, open the Command Palette (Cmd+Shift+P / Ctrl+Shift+P) and run:
Extensions: Install from VSIX...
Select the generated .vsix file.
From Marketplace
Not yet published. Coming soon.
Quick Start
- Open a JJ repository with unresolved conflicts in VSCode.
- Click the merge icon in the Activity Bar, or invoke commands starting with
somany from the Command Palette.
- Start resolving by starting from the grouped and ordered related conflicts.
- Navigate and jump to related conflict blocks to resolve along the way.
- After all conflicts are resolved, run
jj resolve to finalize.
Configuration
| Setting |
Values |
Default |
Description |
somanyconflicts-jj.namingConvention |
jj-native, git-friendly |
jj-native |
How conflict sides are named. JJ-native uses "Side 1", "Side 2". Git-friendly uses "Current"/"Incoming" (2-way only). |
somanyconflicts-jj.scanMode |
jj-cli, file-scan |
jj-cli |
How to discover conflicting files. jj-cli runs jj resolve --list. file-scan scans all files for JJ markers. |
Build from Source
Prerequisites
- Node.js ≥ 18.0.0
- pnpm ≥ 8.0.0
- wasi-sdk (optional — auto-downloaded by tree-sitter-cli on first WASM build if not present)
Steps
# Clone the repository
git clone https://github.com/nmindz/somanyconflicts-jj.git
cd somanyconflicts-jj
# Install dependencies (postinstall builds tree-sitter WASM parsers)
pnpm install
# Compile TypeScript to JavaScript
pnpm run compile
# This produces dist/extension.js (bundled) and out/ (for tests)
# Launch Extension Development Host in VSCode
# Press F5 (or use the "Run Extension" launch config)
Available Scripts
| Command |
Description |
pnpm run compile |
Type-check (tsc --noEmit) + esbuild bundle → dist/ |
pnpm run check-types |
Type-check only (tsc --noEmit) |
pnpm run watch |
Continuous compilation (esbuild watch + tsc watch) |
pnpm run lint |
ESLint with cache on src/**/*.ts |
pnpm run test |
Full suite: compile + lint + Mocha via vscode-test |
pnpm run package |
Production bundle (minified, no sourcemaps) |
Package as VSIX
npx @vscode/vsce package --no-dependencies
The extension is self-contained (esbuild bundles all dependencies). The --no-dependencies flag is required since pnpm's node_modules layout isn't compatible with vsce's npm-based resolver.
Attribution
This project is a fork of So Many Conflicts, adapted for the Jujutsu version control system.
License
MIT — see LICENSE.