Commit Graph
39175 Commits
Author SHA1 Message Date
Nathan Sobo 52eabf6231 Eliminate ToFoldPoint trait
Just make it a method on FoldMap
2022-03-09 20:49:18 -07:00
Max Brunsfeld ee786ee05f Reload the app settings whenever ~/.zed/settings.json changes 2022-03-09 18:00:09 -08:00
Max BrunsfeldandKeith Simmons ed16cf0355 Start work on loading settings from a file
Co-Authored-By: Keith Simmons <keith@zed.dev>
2022-03-09 17:59:29 -08:00
Keith Simmons c24e0bb8a4 Switch to using mouse navigation events instead of other in order to get rid of opaque button id 2022-03-09 15:04:04 -08:00
Max Brunsfeld 12ae1a6a9d Merge pull request #572 from zed-industries/receive-timeout-tweaks
Reset receive timeout only on reads from the websocket connection, not writes
2022-03-09 11:49:08 -08:00
Max BrunsfeldandKeith Simmons 51ba8f9846 Reset receive timeout only on reads from websocket connection, not writes
Also, increase the receive timeout to 30 seconds. We'll still respond immediately
to explicit disconnection, but when there are temporary network blips that
delay pings, we think we should err on the side of keeping the connection
alive. This is in response to a false positive 'host disconnected' state
that we observed when pairing today, while the host (Keith) still clearly
had a working internet connection, because we were screen sharing.

Co-Authored-By: Keith Simmons <keith@zed.dev>
2022-03-09 11:27:47 -08:00
Keith Simmons cdffdf9a66 Merge pull request #565 from zed-industries/eager-theme-selector
Make theme selector eagerly display the selected theme
2022-03-09 11:00:28 -08:00
Keith Simmons 492eea86be formatting fixes 2022-03-09 10:42:27 -08:00
Keith Simmons ce49c2909b Make theme selector match other selector styling 2022-03-09 10:40:30 -08:00
Keith Simmons 9945398adf ensure that we set original theme when dismissing theme selector and fix some minor edge cases 2022-03-09 10:34:52 -08:00
Antonio Scandurra 49b3d39a97 Merge pull request #569 from zed-industries/refine-autoclose
Refine bracket auto-closing behavior
2022-03-09 16:28:35 +01:00
Antonio Scandurra 0ea33c560f Merge pull request #568 from zed-industries/delegation
Notify all language servers when a buffer gets saved
2022-03-09 16:24:46 +01:00
Antonio Scandurra d86c2488eb 💄 2022-03-09 15:44:58 +01:00
Antonio Scandurra e9d64e7668 Surround selections with brackets when they are non-empty 2022-03-09 15:41:54 +01:00
Antonio Scandurra 8e4b5183a5 Autoclose bracket only if next char is whitespace or the end of a pair 2022-03-09 15:38:17 +01:00
Antonio Scandurra 180c7dabff Split language server initialization from construction
This gives clients a chance to register to notifications.
2022-03-09 12:31:21 +01:00
Antonio Scandurra fd5218858d Remove delegate support from GPUI
We added this because we thought it would save some allocations when
sending operations given that we could move them to the delegate upon
notifying it, but the reality is that we serialize operations and that
only requires a reference.
2022-03-09 10:48:52 +01:00
Antonio Scandurra b1001b0759 Notify all language servers only when a buffer is saved
Other notifications such as opening, closing or changing a document
are still tied to the buffer's language.
2022-03-09 10:44:03 +01:00
Keith Simmons 8585bc9e56 Make theme selector eagerly display the selected theme 2022-03-08 18:42:31 -08:00
Max Brunsfeld bfc721db27 Assign buffer's completion triggers from LSP capabilities
Also, make LanguageServer::new() async. The future resolves
once the server is initialized.
2022-03-08 17:41:52 -08:00
Keith SimmonsMax BrunsfeldNathan Sobo
b737df955d Add missing mouse button events and mouse history navigation
Co-Authored-By: Max Brunsfeld
Co-Authored-By: Nathan Sobo
2022-03-08 15:45:36 -08:00
111d5305ea Remove language servers from buffers
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
Co-Authored-By: Keith Simmons <keith@zed.dev>
2022-03-08 15:16:07 -08:00
Antonio Scandurra b130318ee7 Move DidSaveTextDocument notification from Buffer to Project 2022-03-08 11:35:54 +01:00
Antonio Scandurra f752458c55 Remove unused CloseBuffer message 2022-03-08 11:17:20 +01:00
Antonio Scandurra a26a8fca8a Send buffer operations via the Project instead of Worktree 2022-03-08 11:11:25 +01:00
Antonio Scandurra 533a7c103f Implement {ModelHandle,ViewHandle}::become_delegate 2022-03-08 09:30:32 +01:00
Nathan Sobo 19103d3388 WIP: Start on a delegation... like events, but single consumer that takes ownership of event 2022-03-08 09:01:57 +01:00
Antonio Scandurra e5532c21cd v0.19.0 2022-03-08 08:18:51 +01:00
Nathan Sobo 1fc5a1e124 Merge pull request #560 from zed-industries/login-shell-env
Populate environment from shell
2022-03-07 18:04:11 -07:00
1cd9a3244a Populate environment from shell
Co-Authored-By: Keith Simmons <keith@zed.dev>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-07 16:39:50 -08:00
Max Brunsfeld cbbce54587 Merge pull request #542 from zed-industries/guest-disconnections
Send heartbeats in both directions so the server can detect when clients disconnect
2022-03-07 15:52:35 -08:00
a5c807cd7a Reset peer's receive timeout when a message is received
* Make advance_clock more realistic by waking timers in order,
  instead of all at once.
* Don't advance the clock when simulating random delays.

Co-Authored-By: Keith Simmons <keith@zed.dev>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-07 15:33:43 -08:00
Max Brunsfeld 63aea5f6d2 Add Keith to zed.toml 2022-03-07 15:20:16 -08:00
Antonio ScandurraandNathan Sobo 079a53cd59 WIP: Introduce a read timeout
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-07 17:08:12 +01:00
Nathan Sobo dee7663965 Merge pull request #545 from zed-industries/halt-global-actions
Halt keystroke dispatch when a global action is dispatched
2022-03-06 09:57:48 -07:00
Nathan Sobo 8f7656397c Halt keystroke dispatch when a global action is dispatched 2022-03-06 09:46:33 -07:00
Antonio Scandurra 6e2d4d2f99 Merge pull request #543 from zed-industries/fix-closing-items
Ensure `active_item_index` doesn't go off the end when closing items
2022-03-05 15:03:05 +01:00
Antonio Scandurra b19c323ea4 Ensure active_item_index doesn't go off the end when closing items
This fixes a bug introduced in #538, where closing the current tab would hide
all the other tabs, if the current tab was the last one.

Also, this commit manually sets the active item index instead of calling
`Pane::activate_item`: even though this introduces a little bit of duplication,
it prevents us from mistakenly calling `deactivate` on the wrong item. This would
happen because `activate_item` looks at `self.active_item_index` to determine
which item to deactivate before setting the new one. However, that index is
potentially invalid because `::close_items` manipulates the `item_views` vector,
so `activate_item` could end up calling `deactivate` on an item view that was
not active in the first place.
2022-03-05 10:52:55 +01:00
Antonio Scandurra 3c4f60c5e9 Merge pull request #538 from zed-industries/close-inactive-items
Implement close inactive items
2022-03-05 10:35:22 +01:00
Max Brunsfeld 86d1ba1d65 Fix errors from conditional compilation in timer functions 2022-03-04 17:16:17 -08:00
Max Brunsfeld 310269e0d6 Adjust test connection to treat the half-open state more realistically
When a network connection is lost without being explicitly closed by the
other end, writes to that connection will error, but reads will just wait
indefinitely.

This allows the tests to exercise our heartbeat logic.
2022-03-04 16:47:55 -08:00
b2112ad40e Send websocket pings from both the client and the server
Remove the client-only logic for sending protobuf pings.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-03-04 15:21:18 -08:00
Max BrunsfeldandNathan Sobo 8e64d68d04 Make timer method available on both foreground and background executors
Also, make it return a static future.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-04 13:54:07 -08:00
Max BrunsfeldandNathan Sobo 8529a10317 Put vector clock serialization logic alongside other serialization logic
This way, the `clock` crate doesn't depend on the `rpc` crate.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-04 13:54:07 -08:00
Max BrunsfeldandNathan Sobo 3420f41715 Move Network test helper from util crate into text crate
This way, `util` does not depend on `clock`.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-03-04 13:54:07 -08:00
Nathan Sobo 7788091086 Merge pull request #537 from zed-industries/disconnected-status
Render overlay after remote project becomes read-only
2022-03-04 10:39:43 -07:00
9d679d3dff Use the macOS standard binding instead of VS Code's
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-03-04 10:39:11 -07:00
5472b19b46 Implement close inactive items action
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2022-03-04 10:36:51 -07:00
Nathan Sobo 07a018e001 Merge branch 'main' into disconnected-status 2022-03-04 10:07:26 -07:00
Nathan SoboandAntonio Scandurra e6815f2bde Fix tests after font update
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2022-03-04 10:06:21 -07:00