JJ LSP Follow Up

matklad Tools

Summary

The author describes how the upcoming LSP 3.18 Text Document Content Request feature enables a less hacky implementation of Magit-style UX for jj (Jujutsu VCS) by providing virtual documents.

<header> <h1>JJ LSP Follow Up</h1> <time class="meta" datetime="2026-03-05">Mar 5, 2026</time> </header> <p>In <a href="https://matklad.github.io/2024/12/13/majjit-lsp.html"><em>Majjit LSP</em></a>, I described an idea of implementing <a href="https://magit.vc">Magit</a> style UX for <a href="https://www.jj-vcs.dev">jj</a> once and for all, leveraging LSP protocol. I’ve learned today that the upcoming 3.18 version of LSP has a feature to make this massively less hacky: <a href="https://microsoft.github.io/language-server-protocol/specifications/lsp/3.18/specification/#workspace_textDocumentContent" class="display"><em>Text Document Content Request</em></a></p> <p>LSP can now provide virtual documents, which aren’t actually materialized on disk. So this:</p> <figure> <img alt="" src="https://github.com/user-attachments/assets/f65cedf9-5fa8-4506-b8bb-2e55e1ee1913" width="856" height="620"> </figure> <p>can now be such a virtual document, where highlighting is provided by semantic tokens, things like “check out this commit” are code actions, and “goto definition” jumps from the diff in the virtual file to a real file in the working tree.</p> <p>Exciting!</p>
Original Article
View Cached Full Text

Cached at: 05/16/26, 03:33 AM

# JJ LSP Follow Up Source: [https://matklad.github.io/2026/03/05/jj-lsp-followup.html](https://matklad.github.io/2026/03/05/jj-lsp-followup.html) Mar 5, 2026In[*Majjit LSP*](https://matklad.github.io/2024/12/13/majjit-lsp.html), I described an idea of implementing[Magit](https://magit.vc/)style UX for[jj](https://www.jj-vcs.dev/)once and for all, leveraging LSP protocol\. I’ve learned today that the upcoming 3\.18 version of LSP has a feature to make this massively less hacky:[*Text Document Content Request*](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.18/specification/#workspace_textDocumentContent) LSP can now provide virtual documents, which aren’t actually materialized on disk\. So this: ![](https://github.com/user-attachments/assets/f65cedf9-5fa8-4506-b8bb-2e55e1ee1913)can now be such a virtual document, where highlighting is provided by semantic tokens, things like “check out this commit” are code actions, and “goto definition” jumps from the diff in the virtual file to a real file in the working tree\. Exciting\!

Similar Articles

Conversations with JJ

Lobsters Hottest

The author shares their experience using the jj version control tool alongside Git for improving PR clean-up workflows, highlighting its features like history editing and undo, while noting some usability issues.

jj v0.41.0 is out

Lobsters Hottest

Jujutsu (jj) v0.41.0 is released, introducing updates to the experimental version control system designed for improved usability and conflict handling.

jj v0.43.0 released

Lobsters Hottest

Jujutsu v0.43.0, a Git-compatible version control system designed for ease of use and powerful history rewriting, has been released with updates.

jujutsu v0.42.0 released

Lobsters Hottest

Jujutsu (jj) version control system has released v0.42.0. Jujutsu is an open-source VCS that uses Git as a storage backend while providing a more ergonomic interface with features inspired by Mercurial, Sapling, and Darcs.

Beyond jj: config & tools ecosystem

Lobsters Hottest

This talk from JJ Con 2026 summarizes the jj version control system's configuration and tools ecosystem, covering built-in features and external scripts.