This allows the registration of such buffers in the project, which is necessary
to correctly support `::save_buffer_as` and opens the door to sharing untitled
buffers with guests in the future.
Note that, for now, this disallows guests to create untitled buffers in the
current window and will create a new window instead. This is because we don't
yet have a global way of allocating a buffer's remote id (nor a way of saving
such buffers in the host's worktree) and we instead rely on the local model ID,
which could clash with the host's buffer IDs.
I think we should revisit this once guests can share their untitled buffers
with the host and other remote peers, as well as once we start keying
operations by entry id.
Antonio Scandurra
created
d8ef3a5
Support formatting in fake LSP capabilities
Antonio Scandurra
created
46da80d
Use LSP range formatting when document formatting is not available
Antonio Scandurra
created
dc5a09b
Merge pull request #525 from zed-industries/preserve-worktrees
Click to expand commit body
Grow worktrees monotonically when sharing and move most messages to the background
Antonio Scandurra
created
7c42005
Observe selection set lamport timestamps when deserializing buffer
Antonio Scandurra
created
bcd5c28
Allow receiving diagnostic updates out of order
Antonio Scandurra
created
e78661c
Merge pull request #532 from zed-industries/handle-language-server-failure
Click to expand commit body
Avoid infinite loop when a language server fails to start
Max Brunsfeld
created
1965813
Avoid infinite loop when a language server fails to start
We don't use them, and they add a lot of noise to the test output
when running all tests in the workspace.
Max Brunsfeld
created
15312d0
Merge pull request #526 from zed-industries/json
Click to expand commit body
Add basic JSON support
Max Brunsfeld
created
3c242a4
Wait for LSP capabilities to be initialized before checking them
Max Brunsfeld
created
78d96a0
Make fake language servers have full capabilities
Max Brunsfeld
created
9999862
Enable formatting feature of JSON language server
Click to expand commit body
The feature doesn't work yet because the JSON language server
only supports *range* formatting, not document formatting.
We need to adjust our code to inspect the server's capabilities
and send range formatting requests instead when needed.
We're going to hold off on doing this right now, because it
will create merge conflicts with the `preserve-worktrees`
branch (#525)
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Max Brunsfeld
and
Nathan Sobo
created
81627a0
Avoid sending unhandled LSP requests to JSON language server
bf1153c
Add syntax highlighting/auto-indent/outlines for JSON files
Click to expand commit body
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Max Brunsfeld
and
Nathan Sobo
created
556d9cc
Correctly defer undo operations when messages arrive out of order
Click to expand commit body
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
Antonio Scandurra
,
Nathan Sobo
, and
Max Brunsfeld
created
410ee12
Maintain remote worktrees correctly when building updates
Click to expand commit body
This accidentally regressed in 53327e2.
Antonio Scandurra
created
c613b22
Ignore diagnostics received for invisible worktrees
Antonio Scandurra
created
d0d6916
Move code action and completion edit messages to the background
Antonio Scandurra
created
14d26ee
Move several buffer-related messages to the background
Antonio Scandurra
created
1c14168
Ensure no two worktrees can point to the same root path
Click to expand commit body
This could happen because there was a pause between creating the worktree
and adding it to the list of tracked local worktrees, and so we might end
up adding the same worktree twice when calling `create_local_worktree` in
rapid succession.
Antonio Scandurra
created
d171d8c
Change the definition of `check_invariants`
Click to expand commit body
- On the host, ensure that only one worktree can exist for a given absolute
path. Asserting about buffers was cool but I think should be tackled in the
context of leaning more on entry ids for collaboration (vs. buffer ids).
- On the guest, ensure that all the opened buffers don't contain deferred
operations.
Antonio Scandurra
created
53327e2
Ensure worktree is registered/shared synchronously