Commit Graph
39175 Commits
Author SHA1 Message Date
Keith Simmons 5c67560264 Use NonZeroU32 to ensure settings tabsize cannot be zero 2022-06-23 12:55:38 -07:00
Max Brunsfeld bfc7913315 Merge pull request #1228 from zed-industries/python
Add Python support
2022-06-23 11:25:18 -07:00
Max Brunsfeld 4a0487b81d Treat .pyi files as Python 2022-06-23 11:14:11 -07:00
Max Brunsfeld b5b88d35e1 Syntax-highlight Python project symbols and completions 2022-06-23 11:14:01 -07:00
Max Brunsfeld daada15dbc Upgrade tree-sitter-python for error recovery improvement 2022-06-23 11:13:30 -07:00
Antonio ScandurraandNathan Sobo 4f4829ba11 Use BTreeMap in Server so we release memory when maps are cleared
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-06-23 18:02:17 +02:00
Antonio Scandurra 70f3be0230 Merge pull request #1232 from zed-industries/language-defaults
Don't override top-level settings with language defaults
2022-06-23 16:48:08 +02:00
Antonio ScandurraandNathan Sobo c737c7c3f7 Don't override top-level settings with language defaults
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-06-23 16:40:57 +02:00
Antonio Scandurra b1d3767c8d Merge pull request #1231 from zed-industries/prompt-to-save-on-window-close
Prompt user to save changed buffers when closing window via the mouse
2022-06-23 14:44:20 +02:00
Antonio Scandurra 056d8c0342 Improve testing of window edit state 2022-06-23 14:41:47 +02:00
Antonio Scandurra d0a3f73907 Update window edited status when pane item is removed 2022-06-23 14:28:10 +02:00
Antonio Scandurra b38b508447 Add test to verify closing window via the mouse 2022-06-23 14:18:53 +02:00
Antonio Scandurra ae5c838ee4 Always prevent window from closing and manually invoke Workspace::close
This ensures we ask the user to save their state if there are unsaved
changes.
2022-06-23 11:44:14 +02:00
Antonio Scandurra c9c8abfed6 Introduce ViewContext::on_window_should_close
This is a new callback that can be used to interrupt closing the window
when the user has unsaved changes.
2022-06-23 11:43:19 +02:00
Antonio Scandurra 0fe62ab0ab Set window's edited = true when there are unsaved changes 2022-06-23 10:59:50 +02:00
Antonio Scandurra f293f7e831 Merge pull request #1230 from zed-industries/wrap-panic
Fix panic when `Text` contained carriage returns
2022-06-23 10:28:01 +02:00
Antonio Scandurra 85c06cc33b Fix panic when Text contained carriage returns 2022-06-23 10:21:21 +02:00
Antonio Scandurra 650d908ca9 Merge pull request #1227 from zed-industries/maintain-keepalive-under-high-message-volume
Maintain keepalive under high message volume
2022-06-23 07:56:17 +02:00
Max Brunsfeld 7aeaeafd8d Integrate pyright language server 2022-06-22 16:58:19 -07:00
Max Brunsfeld 3527013928 Add python outline and bracket queries 2022-06-22 16:28:09 -07:00
Max Brunsfeld 30b3af39a8 Make python indent query more general
Upgrade Tree-sitter for a query bugfix that I found while
writing this indent query.
2022-06-22 16:18:52 -07:00
Max Brunsfeld 744749e8af Prioritize keepalive pings over incoming message handling in Peer 2022-06-22 14:44:05 -07:00
Max Brunsfeld 3184e97d0e Remove redundant run_until_parked call in Foreground::advance_clock 2022-06-22 14:43:21 -07:00
Max Brunsfeld 449dc27aeb Enable env log in peer tests 2022-06-22 14:42:20 -07:00
Max Brunsfeld c6da8adbf7 Merge pull request #1225 from zed-industries/fix-randomized-test-failure
Don't wait for host's worktree updates if they disconnected
2022-06-22 11:01:25 -07:00
Antonio ScandurraandMax Brunsfeld 1a3d3f300c Don't wait for host's worktree updates if they disconnected
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-06-22 19:45:55 +02:00
Antonio ScandurraandMax Brunsfeld ef93cd59f7 Remove stray log statement when contacts are updated
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-06-22 19:40:52 +02:00
Antonio Scandurra 02df1b69e5 Merge pull request #1224 from zed-industries/forward-deadlock
Prevent deadlocks when two clients perform a request to each other
2022-06-22 19:04:07 +02:00
Antonio Scandurra 3be9dd77ef Remove non-determinism from Peer caused by smol's timeout helper 2022-06-22 18:39:12 +02:00
Antonio Scandurra 167f14bf28 Ensure receive timeout is triggered before waiting on disconnection 2022-06-22 18:02:42 +02:00
Antonio Scandurra 6503c48787 Use Arc<Deterministic> to understand which await points are parking 2022-06-22 17:39:34 +02:00
Antonio Scandurra 5df2cf8bc5 💄 2022-06-22 15:06:22 +02:00
Antonio Scandurra 3f0cfb4ae6 Use a FuturesUnordered to process foreground messages
This prevents deadlocks when e.g., client A performs a request to client B and
client B performs a request to client A. If both clients stop processing further
messages until their respective request completes, they won't have a chance to
respond to the other client's request and cause a deadlock.

This arrangement ensures we will attempt to process earlier messages first, but fall
back to processing messages arrived later in the spirit of making progress.
2022-06-22 15:04:17 +02:00
Antonio Scandurra 2f9b21b943 Add test demonstrating hang when peers wait on each other's response 2022-06-22 14:41:14 +02:00
Antonio Scandurra dfca87861a Merge pull request #1223 from zed-industries/update-metadata-when-worktrees-are-removed
Update project metadata when releasing a worktree's weak handle
2022-06-22 10:50:44 +02:00
Antonio Scandurra b62f125aa9 Update project metadata when releasing a worktree's weak handle
When a project was getting unshared, we would remove invisible worktrees
from the project's state without notifying the server, which was causing
the randomized tests to fail.

This commit calls `Project::remove_worktree` when a worktree's handle gets
released. Doing so ensures that we update both our local metadata database
as well as the state on the server.
2022-06-22 10:26:10 +02:00
Max Brunsfeld 0e85cba7dd Start work on Python support 2022-06-21 17:04:54 -07:00
Keith Simmons 6a9f3b8c0b Merge pull request #1216 from zed-industries/hover-context-menu-fix
Don't trigger hover popover action when mouse is over context menu
2022-06-21 13:43:24 -07:00
Keith Simmons 757263be5d Add comment linking to long term plan 2022-06-21 12:38:27 -07:00
Max Brunsfeld b9431522f9 Merge pull request #1217 from zed-industries/fix-lsp-statuses-for-guests
Report running language servers when sharing project for the first time
2022-06-21 11:50:58 -07:00
Antonio Scandurra 5135e64f96 Merge pull request #1215 from zed-industries/suggest-upgrade-on-reconnect
Show upgrade required message when reconnecting after a protocol change
2022-06-21 20:41:36 +02:00
Antonio ScandurraandMax Brunsfeld e4981d98ab Report running language servers when sharing project for the first time
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-06-21 20:39:54 +02:00
Max BrunsfeldandAntonio Scandurra c47abf1d47 Add failing test for replication of lsp statuses
Co-authored-by: Antonio Scandurra <me@as-cii.com>
2022-06-21 11:27:08 -07:00
Keith Simmons 6f0e2f163a Don't trigger hover popover action when mouse is over context menu 2022-06-21 11:23:25 -07:00
Antonio Scandurra 216481ca21 Merge pull request #1214 from zed-industries/fix-error-on-empty-worktree-update
Fix error when worktree has no file extensions
2022-06-21 20:08:20 +02:00
Max BrunsfeldandAntonio Scandurra a9fa5ec14a Fix error when worktree has no file extensions
Co-authored-by: Antonio Scandurra <me@as-cii.com>
2022-06-21 11:02:13 -07:00
Keith Simmons a299dbfd39 Merge pull request #1213 from zed-industries/hover-dismiss-fix
hide hover on editor blur
2022-06-21 10:47:52 -07:00
Keith Simmons 1ed49ac974 hide hover on editor blur 2022-06-21 10:37:59 -07:00
Max BrunsfeldandAntonio Scandurra a323afac3f Show upgrade required message when reconnecting after a protocol change
Co-authored-by: Antonio Scandurra <me@as-cii.com>
2022-06-21 10:26:34 -07:00
Antonio Scandurra 490c0f4e88 Merge pull request #1212 from zed-industries/persist-project-activity
Add an API that returns the most active zed users and the projects where they've been active
2022-06-21 18:16:29 +02:00