A Language Server Protocol (LSP) implementation for resolving conflicts in the jj version control system.
jj-lsp enhances your development workflow by providing specialized editor integration for working with jj conflicts. Unlike traditional VCS tools, jj keeps conflicts as part of the codebase until they're resolved, which makes an LSP approach particularly valuable.
- ✅ Conflict Detection: Automatically identifies and highlights merge conflicts in your files
- ✅ Code Actions: Quickly resolve conflicts with editor actions to accept specific changes
- ✅ Diagnostics: Clear error messages for conflicts that need resolution
- 🔜 Folding Ranges: Collapse conflict sections for better readability
- 🔜 Code Lenses: One-click conflict resolution (similar to VSCode git integration)
- 🔜 Hover Information: Rich markdown representation of conflicts
cargo install jj-lsp
Configure your editor to use jj-lsp as a language server for files in jj repositories. Specific setup instructions vary by editor.
demo_lsp.mov
This LSP is currently being developed with Zed as the primary editor target, but should work with any LSP-compatible editor.
Some planned features require LSP capabilities that may not be supported by all editors:
textDocument/foldingRange- For folding conflicts and changestextDocument/codeLens- For adding action buttons above conflictstextDocument/semanticTokens- For background coloring of changes
The goal is to provide an experience similar to VSCode's git integration:
I believe jj's approach to conflicts (never failing rebases, keeping conflicts as part of the code) deserves specialized tooling. This LSP aims to make working with conflicts as natural as working with any programming language.
This project is currently in active development, and I welcome contributions:
- File issues for bugs or feature requests
- Submit pull requests
- Reach out with feedback or suggestions via email or Discord
# Clone the repository
git clone https://github.com/nilskch/jj-lsp.git
cd jj-lsp
# Build the project
cargo build
# Run tests
cargo testThis project is licensed under the MIT License.