# Collaborative editing: Zed editor and conflict-free replicated data type (CRDT) abstract data type

**URL:** <https://discourse.julialang.org/t/collaborative-editing-zed-editor-and-conflict-free-replicated-data-type-crdt-abstract-data-type/110415>\
**Category:** Offtopic\
**Tags:** editors\
**Created:** [February 19, 2024, 6:44pm UTC](https://discourse.julialang.org/t/collaborative-editing-zed-editor-and-conflict-free-replicated-data-type-crdt-abstract-data-type/110415 "2024-02-19T18:44:47Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)\
**Post date:** [February 19, 2024, 6:44pm UTC](https://discourse.julialang.org/t/collaborative-editing-zed-editor-and-conflict-free-replicated-data-type-crdt-abstract-data-type/110415/1 "2024-02-19T18:44:47Z")

</div>

> **[We Have to Start Over: From Atom to Zed - Zed Blog](https://zed.dev/blog/we-have-to-start-over)**
>
> Thorsten interviews co-founders Nathan, Max, Antonio in about the vision and the technological choices behind Zed, how they went from Atom and Electron to Rust and GPUs with Zed.

Zed editor from the people that made Atom editor (at the time the main Julia editor):

> **[Zed - Code at the speed of thought](https://zed.dev/)**
>
> Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

> Save time and keystrokes by generating code with AI. Zed supports GitHub Copilot out of the box, and you can use GPT-4 to generate or refactor code by pressing ctrl-enter and typing a natural language prompt.

The Zed editor is very intriguing, supports many languages, most recently adding for Zig and OCaml, but the Julia issue for LSP is still open. You can still edit Julia without LSP support, as text, but it would be better to have it, and it may be an easy addition.

It will support Linux and Windows, but right now only supports macOS so I can’t try it, and it IS open source by now. It’s unclear to me if it provides VS Code compatibility, for extensions, or ever will e.g. Julia’s. Extensions are a TODO, so would you miss many from VS Code, or just a few? Which?

If you look at the site for Zed editor you will see benchmark claims, very fast, and low memory use, compared to other IDEs (not low mem use really versus editors e.g. vi).

It’s based on very intriguing tech, e.g. CRDT and more, and if you only need to edit locally it may be overkill. VS Code, and others already have AI features, but to work collaboratively CRDT seems very intriguing. I hadn’t heard of that class of (distributed) data types, only _eventual consistency_, though maybe it is overkill over consensus or other tech?

[Do you really need editors built like games, at 120 FPS…?]

> **[Zed - Code at the speed of thought](https://zed.dev/blog/120fps)**
>
> Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

The tech is independently intriguing:

> **[About CRDTs • Conflict-free Replicated Data Types](https://crdt.tech/)**
>
> Resources and community around CRDT technology — papers, blog posts, code and more.

> **[1805.06358.pdf](https://arxiv.org/pdf/1805.06358.pdf)**
>
> 151.25 KB

> conflict-free replicated data type (CRDT) is an abstract data type, with a well defined interface, designed to be replicated at multiple processes and exhibiting the following properties: (i) any replica can be modified without coordinating with another replicas; (ii) when any two replicas have received the same set of updates, they reach the same state, deterministically, by adopting mathematically sound rules to guarantee state convergence

[https://inria.hal.science/inria-00555588/document](https://inria.hal.science/inria-00555588/document)

> Replication is a fundamental concept of distributed systems, well studied by the distributed algorithms community. Much work focuses on maintaining a global total order of operations[24] even in the presence of faults [8].  
> […]  
> An alternative approach, _eventual consistency_ or _optimistic replication_, is attractive to practioners [37, 41].  
> […]  
> In this paper, we study a simple, theoretically sound approach to eventual consistency. We propose the concept of a _convergent_ or _commutative replicated data type_ (CRDT), for which some simple mathematical properties ensure eventual consistency. A trivial example of a CRDT is a replicated counter, which converges because the increment and decrement operations commute (assuming no overflow). Provably, replicas of any CRDT converge to a common state that is equivalent to some correct sequential execution.  
> […]  
> Since, by design, a CRDT does not use consensus, the approach has strong limitations; nonetheless, some interesting and non-trivial CRDTs are known to exist. For instance, we previously published Treedoc, a sequence CRDT designed for co-operative text editing [32].
> 
> Previously, only a handful of CRDTs were known.

[https://zed.dev/blog/ai-continues-to-impress](https://zed.dev/blog/ai-continues-to-impress)

Gemini 1.5 AI can now read very large codebases, so AI is very important going forward:

---

<div class="post-metadata">

**Author:** ![e3c6](https://avatars.discourse-cdn.com/v4/letter/e/e79b87/32.png) [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Post date:** [February 19, 2024, 7:37pm UTC](https://discourse.julialang.org/t/collaborative-editing-zed-editor-and-conflict-free-replicated-data-type-crdt-abstract-data-type/110415/2 "2024-02-19T19:37:41Z")

</div>

> <https://github.com/zed-industries/zed/issues/5197>
>
> \### Check for existing issues
> 
> \- \[X\] Completed
> 
> \### Language
> 
> Julia
> 
> \### Tree Si…tter parser link
> 
> https://github.com/tree-sitter/tree-sitter-julia
> 
> \### Language server link
> 
> https://github.com/julia-vscode/LanguageServer.jl
> 
> \### Misc notes
> 
> It would be really useful to have support for the Julia language (https://julialang.org). Not much to say except that it's one of the rising stars in the world of scientific computing. I used it for research at uni and now I use it at work.

---

<div class="post-metadata">

**Author:** ![sylvaticus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sylvaticus/32/203883_2.png) [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Post date:** [February 19, 2024, 9:20pm UTC](https://discourse.julialang.org/t/collaborative-editing-zed-editor-and-conflict-free-replicated-data-type-crdt-abstract-data-type/110415/3 "2024-02-19T21:20:53Z")

</div>

I am using code-server and while the Live Share is great for _live_ co-editing, still the editing is active only while host is in session, looking for a way to get it permanently.  
Also,I believe , the guest does’r jave access to the fun tion in the code…

---

<div class="post-metadata">

**Author:** ![LaurentPlagne](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/laurentplagne/32/10103_2.png) [@LaurentPlagne](https://discourse.julialang.org/u/LaurentPlagne)\
**Post date:** [February 20, 2024, 12:40am UTC](https://discourse.julialang.org/t/collaborative-editing-zed-editor-and-conflict-free-replicated-data-type-crdt-abstract-data-type/110415/4 "2024-02-20T00:40:31Z")

</div>

zed looks super cool and the conversation is very intersting : thank you for the link !

---

<div class="post-metadata">

**Author:** ![photor](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/photor/32/14343_2.png) [@photor](https://discourse.julialang.org/u/photor)\
**Post date:** [February 20, 2024, 2:43am UTC](https://discourse.julialang.org/t/collaborative-editing-zed-editor-and-conflict-free-replicated-data-type-crdt-abstract-data-type/110415/5 "2024-02-20T02:43:23Z")

</div>

Is that mature enough for daily use of Julia programing?

---

<div class="post-metadata">

**Author:** ![e3c6](https://avatars.discourse-cdn.com/v4/letter/e/e79b87/32.png) [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Post date:** [February 20, 2024, 6:46am UTC](https://discourse.julialang.org/t/collaborative-editing-zed-editor-and-conflict-free-replicated-data-type-crdt-abstract-data-type/110415/6 "2024-02-20T06:46:47Z")

</div>

It’s an open issue. Zed does not support Julia yet

---

<div class="post-metadata">

**Author:** ![liuyxpp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/liuyxpp/32/9870_2.png) [@liuyxpp](https://discourse.julialang.org/u/liuyxpp)\
**Post date:** [February 20, 2024, 7:20am UTC](https://discourse.julialang.org/t/collaborative-editing-zed-editor-and-conflict-free-replicated-data-type-crdt-abstract-data-type/110415/7 "2024-02-20T07:20:44Z")

</div>

No. I tried it last month, and even the basic syntax highlighting is not supported for Julia.

---

<div class="post-metadata">

**Author:** ![e3c6](https://avatars.discourse-cdn.com/v4/letter/e/e79b87/32.png) [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Post date:** [February 20, 2024, 7:41am UTC](https://discourse.julialang.org/t/collaborative-editing-zed-editor-and-conflict-free-replicated-data-type-crdt-abstract-data-type/110415/8 "2024-02-20T07:41:05Z")

</div>

But please do comment / thumbs up on that open issue, to express your interest. That might nudge developers into prioritizing (or not) Julia support sometime in the future.

---

<div class="post-metadata">

**Author:** ![e3c6](https://avatars.discourse-cdn.com/v4/letter/e/e79b87/32.png) [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Post date:** [February 21, 2024, 10:31pm UTC](https://discourse.julialang.org/t/collaborative-editing-zed-editor-and-conflict-free-replicated-data-type-crdt-abstract-data-type/110415/9 "2024-02-21T22:31:02Z")

</div>

> <https://github.com/zed-industries/zed/pull/8133>
>
> !\[Screenshot from 2024-02-21 19-01-35\](https://github.com/zed-industries/zed/ass…ets/9824244/463ac969-d831-41a1-a92c-83e2429ade78)
> 
> IIUC, language grammars will soon move to extensions but the lsp updater/starter is not yet writable as an extension?
> I can wait and reopen as a language extension when those become available.
> 
> Release Notes:
> 
> \- Add support for the Julia programming language (#5197).

---

<div class="post-metadata">

**Author:** ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)\
**Post date:** [February 21, 2024, 11:16pm UTC](https://discourse.julialang.org/t/collaborative-editing-zed-editor-and-conflict-free-replicated-data-type-crdt-abstract-data-type/110415/10 "2024-02-21T23:16:05Z")

</div>

Great! Maybe I induced someone to make that Julia PR, or at least you giving the link to it. It was less trivial than I thought, with many files added e.g. non-trivial “crates/zed/src/languages/julia.rs” and Scheme files (those seemed though rather trivial).

If only I could also influence someone making the Zed Linux port (for me; and Windows port, those are non-Julia specific, and already open issues on)

---

<div class="post-metadata">

**Author:** ![Pangoraw](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pangoraw/32/24719_2.png) [@Pangoraw](https://discourse.julialang.org/u/Pangoraw)\
**Post date:** [February 25, 2024, 12:33pm UTC](https://discourse.julialang.org/t/collaborative-editing-zed-editor-and-conflict-free-replicated-data-type-crdt-abstract-data-type/110415/11 "2024-02-25T12:33:53Z")

</div>

> If only I could also influence someone making the Zed Linux port (for me; and Windows port, those are non-Julia specific, and already open issues on)

For context, the PR was developed only on Linux because I don’t have access to a mac. So Zed on Linux is already a thing (although with rough edges).

---

<div class="post-metadata">

**Author:** ![piechologist](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/piechologist/32/27662_2.png) [@piechologist](https://discourse.julialang.org/u/piechologist)\
**Post date:** [February 26, 2024, 9:24am UTC](https://discourse.julialang.org/t/collaborative-editing-zed-editor-and-conflict-free-replicated-data-type-crdt-abstract-data-type/110415/12 "2024-02-26T09:24:36Z")

</div>

The Zed team moved all open language issues (including the Julia one mentioned above) to the [extensions repo](https://github.com/zed-industries/extensions) this morning. I fear your PR won’t be merged into the main repo.

Would you mind wrapping the tree-sitter grammar into an extension and adding the LSP later?

---

<div class="post-metadata">

**Author:** ![Markus\_Hauschel](https://avatars.discourse-cdn.com/v4/letter/m/7ba0ec/32.png) [@Markus\_Hauschel](https://discourse.julialang.org/u/Markus_Hauschel)\
**Post date:** [July 10, 2024, 7:22pm UTC](https://discourse.julialang.org/t/collaborative-editing-zed-editor-and-conflict-free-replicated-data-type-crdt-abstract-data-type/110415/13 "2024-07-10T19:22:54Z")

</div>

Zed is officially available on linux now [Linux when? Linux now.](https://zed.dev/blog/zed-on-linux)

---

<div class="post-metadata">

**Author:** ![nsajko](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nsajko/32/221187_2.png) [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Post date:** [July 10, 2024, 7:41pm UTC](https://discourse.julialang.org/t/collaborative-editing-zed-editor-and-conflict-free-replicated-data-type-crdt-abstract-data-type/110415/14 "2024-07-10T19:41:32Z")

</div>

It’s already packaged in the Arch official repos! That said, I’m fine with (VS) Code.

---

<div class="post-metadata">

**Author:** ![ShalokShalom](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/shalokshalom/32/52462_2.png) [@ShalokShalom](https://discourse.julialang.org/u/ShalokShalom)\
**Post date:** [August 9, 2024, 12:41pm UTC](https://discourse.julialang.org/t/collaborative-editing-zed-editor-and-conflict-free-replicated-data-type-crdt-abstract-data-type/110415/15 "2024-08-09T12:41:46Z")

</div>

It should be available with Julia support right now:

> **[GitHub - JuliaEditorSupport/zed-julia: Julia support for Zed.](https://github.com/JuliaEditorSupport/zed-julia)**
>
> Julia support for Zed.

---

<div class="post-metadata">

**Author:** ![liu20001028](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/liu20001028/32/211762_2.png) [@liu20001028](https://discourse.julialang.org/u/liu20001028)\
**Post date:** [September 8, 2024, 11:58am UTC](https://discourse.julialang.org/t/collaborative-editing-zed-editor-and-conflict-free-replicated-data-type-crdt-abstract-data-type/110415/16 "2024-09-08T11:58:20Z")

</div>

why the julia eprl didnt use

---

<div class="post-metadata">

**Author:** ![liu20001028](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/liu20001028/32/211762_2.png) [@liu20001028](https://discourse.julialang.org/u/liu20001028)\
**Post date:** [September 8, 2024, 12:17pm UTC](https://discourse.julialang.org/t/collaborative-editing-zed-editor-and-conflict-free-replicated-data-type-crdt-abstract-data-type/110415/17 "2024-09-08T12:17:13Z")

</div>

ZED didnt ues in julia lts EPRL alway connecting and “queued”

---

<div class="post-metadata">

**Author:** ![DNF](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dnf/32/10191_2.png) [@DNF](https://discourse.julialang.org/u/DNF)\
**Post date:** [September 8, 2024, 3:15pm UTC](https://discourse.julialang.org/t/collaborative-editing-zed-editor-and-conflict-free-replicated-data-type-crdt-abstract-data-type/110415/18 "2024-09-08T15:15:08Z")

</div>

I tried Zed with the Julia plug-in, but couldn’t figure out what the features are. The last time I tried (two weeks ago), it didn’t even have syntax highlighting.

---

<div class="post-metadata">

**Author:** ![jishnub](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jishnub/32/33620_2.png) [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Post date:** [September 13, 2024, 11:41am UTC](https://discourse.julialang.org/t/collaborative-editing-zed-editor-and-conflict-free-replicated-data-type-crdt-abstract-data-type/110415/19 "2024-09-13T11:41:11Z")

</div>

I find this surprising, since it definitely did for me. In fact, I think the extension for zed wraps the Julia language server that the vscode extension uses as well.

---

<div class="post-metadata">

**Author:** ![piechologist](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/piechologist/32/27662_2.png) [@piechologist](https://discourse.julialang.org/u/piechologist)\
**Post date:** [September 13, 2024, 9:19pm UTC](https://discourse.julialang.org/t/collaborative-editing-zed-editor-and-conflict-free-replicated-data-type-crdt-abstract-data-type/110415/20 "2024-09-13T21:19:34Z")

</div>

> [@jishnub](#):
>
> In fact, I think the extension for zed wraps the Julia language server that the vscode extension uses as well.

That’s correct, both the VSC and Zed extensions wrap LanguageServer.jl. Syntax highlighting in VSC is done with regex patterns but Zed uses a Tree-sitter parser (the one that comes with neovim).

Highlighting should really work out of the box. Disclaimer: I’ve committed to the Tree-sitter part—you can blame me for that 😉.
