Max Brunsfeld
97d044e1a0
Upgrade time crates to silence warning on Rust 1.59
2022-02-25 10:39:44 -08:00
Max Brunsfeld and Antonio Scandurra
868e66f385
Eliminate RwLock around LanguageServer's outbound message channel
...
We observed a deadlock when quitting zed. The main thread was attempting
to acquire a write lock to this outbound message sender. We weren't able
to understand exactly how this occurred, but we removed the use of a
lock there, so this shouldn't happen anymore.
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2022-02-25 10:04:57 -08:00
Antonio Scandurra and Max Brunsfeld
c9b3061f85
Reuse a previous project find whenever possible
...
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2022-02-25 18:30:28 +01:00
Antonio Scandurra and Max Brunsfeld
55ec98b42c
Don't assume that cloning on split will reuse the same underlying model
...
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2022-02-25 18:30:04 +01:00
Antonio Scandurra and Nathan Sobo
15852294ea
Don't share query editor state after project find has been split
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-02-25 18:10:48 +01:00
Antonio Scandurra
4a781d0ef5
Don't focus query editor if there are matches on tab switch
2022-02-25 17:23:03 +01:00
Antonio Scandurra
d15fb9c3dc
Use the new split pane's navigation history when cloning an item
2022-02-25 17:22:30 +01:00
Antonio Scandurra
332cd1039c
Allow splitting project find and maintain the searches in sync
2022-02-25 16:20:02 +01:00
Antonio Scandurra
573965cfdf
Don't report a buffer when it doesn't contain any matches
2022-02-25 15:40:19 +01:00
Antonio Scandurra
531fab9035
Always sync before clearing or removing excerpts from MultiBuffer
...
We don't have any test that proves this is needed but seems good nonetheless.
2022-02-25 15:36:43 +01:00
Antonio Scandurra
7522fa71a4
Gracefully handle passing an empty set of ranges to push_excerpts
2022-02-25 15:36:16 +01:00
Antonio Scandurra and Nathan Sobo
240e42d2ff
Refine project find's UX
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-02-25 15:27:34 +01:00
Nathan Sobo
fc14d8f50a
Toggle focus between query editor and results on cmd-shift-F
2022-02-25 05:04:45 -07:00
Antonio Scandurra
34b4858a06
Open searched buffers in parallel
2022-02-25 12:29:50 +01:00
Antonio Scandurra
434cced397
Focus results editor when project find matches are updated
2022-02-25 12:17:25 +01:00
Antonio Scandurra
687f680ad9
Avoid extra smol::channel when iterating through snapshot paths
2022-02-25 11:49:33 +01:00
Antonio Scandurra
7a38350567
Add a fast path for when the search query is empty
2022-02-25 10:58:45 +01:00
Antonio Scandurra
91841d9ff5
Focus query editor when deploying project-find
2022-02-25 10:58:32 +01:00
Antonio Scandurra
b98ece275b
Respect field editor background, color and selection styling
2022-02-25 10:48:22 +01:00
Antonio Scandurra
f2d7451ca2
Use Project::search in ProjectFind and show search results
2022-02-25 10:32:45 +01:00
Max Brunsfeld
28745a3e5a
Merge branch 'main' into project-find
2022-02-24 17:22:09 -08:00
Max Brunsfeld
6bfaab2c5e
Merge pull request #482 from zed-industries/c-support
...
Add C support with clangd
2022-02-24 17:16:55 -08:00
Max Brunsfeld
78edd9a5d5
Merge pull request #492 from zed-industries/editor-settings
...
Provide editor styling information separately from editor settings
2022-02-24 17:16:38 -08:00
Max Brunsfeld and Nathan Sobo
20d923b53e
Provide editor styling information separately from editor settings
...
* Since regular editors' font sizes and families are controlled by
the settings and not the theme, don't store a dummy text style in
the theme. Instead, only store a font color, and synthesize
the text style for regular editors using both the theme and the
settings.
* Style single-line and auto-height editors (now called "field
editors") using a single function that takes the entire theme and
selects a relevant sub-object.
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-02-24 16:42:00 -08:00
3beb95c18b
WIP: Start sketching in ProjectFindView
...
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2022-02-24 19:07:00 +01:00
Antonio Scandurra
6a245eefca
Start on a regex implementation of SearchQuery
2022-02-24 16:33:31 +01:00
Antonio Scandurra
6d3faa82a7
Extract a search module
2022-02-24 15:55:13 +01:00
Antonio Scandurra
ed43e81f58
Implement a basic project-wide search using Aho-Corasick
2022-02-24 15:33:56 +01:00
Antonio Scandurra
22c9529d2f
WIP: Remove ripgrep and start matching query for paths ourselves
2022-02-24 12:33:28 +01:00
Antonio Scandurra
ee2ccf65b7
WIP
2022-02-24 11:57:53 +01:00
Antonio Scandurra
b4ae8f5e3c
Start on project-wide find
2022-02-24 11:57:53 +01:00
Antonio Scandurra
5710fbf627
Merge pull request #486 from zed-industries/background-highlights
...
Move `GetDocumentHighlights` to the background and fix collaboration race conditions
2022-02-24 10:17:28 +01:00
Antonio Scandurra
8ee20849d1
Fix warning
2022-02-24 09:52:25 +01:00
Antonio Scandurra
9782b6cd31
Store ops if buffer handle can't be upgraded and buffer requests are in-flight
2022-02-24 09:32:31 +01:00
Max Brunsfeld
19f37c00b1
Store operations for unknown buffers when there are outstanding buffer RPC requests
2022-02-23 20:35:05 -08:00
Max Brunsfeld
cd202e4e12
Open buffers from definitions request in random collab test
...
Don't try to open buffers from the weak worktrees directly, as this is
expected to fail if the host drops the buffer for that worktree.
2022-02-23 20:35:05 -08:00
Max Brunsfeld
96474a111f
Make client log message format more consistent
2022-02-23 18:18:52 -08:00
Max Brunsfeld
5a544fa808
Remove unused pending_updates field from RemoteWorktree
2022-02-23 16:59:39 -08:00
Max Brunsfeld
551d493c05
Tweak logging in random collaboration test
2022-02-23 16:27:34 -08:00
Max Brunsfeld
043b45e9d4
Improve logging around handling RPC requests on client
2022-02-23 15:37:51 -08:00
Max Brunsfeld and Nathan Sobo
d9d10dffe3
Fix race conditions with LSP requests that return buffers
...
* Avoid panic when registering a buffer that was previously open,
and whose weak handle was still present in the open_buffers map.
* Avoid releasing any buffers while a request is outstanding which
could return a reference to a buffer.
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
2022-02-23 15:26:01 -08:00
ab28a5bb54
Remove ShareWorktree message
...
Instead, create an empty worktree on guests when a worktree is first *registered*, then update it via an initial UpdateWorktree message.
This prevents the host from referencing a worktree in definition RPC responses that hasn't yet been observed by the guest. We could have waited until the entire worktree was shared, but this could take a long time, so instead we create an empty one on guests and proceed from there.
We still have randomized test failures as of this commit:
SEED=9519 MAX_PEERS=2 ITERATIONS=10000 OPERATIONS=7 ct -p zed-server test_random_collaboration
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com >
Co-Authored-By: Antonio Scandurra <me@as-cii.com >
2022-02-23 11:56:09 -07:00
Antonio Scandurra
7a0e8560a3
WIP
2022-02-23 19:04:22 +01:00
58206d413c
Remove update_id from worktree update messages
...
We don't need this anymore because worktree updates are foreground
messages.
Co-Authored-By: Nathan Sobo <nathan@zed.dev >
Co-Authored-By: Max Brunsfeld <max@zed.dev >
2022-02-23 18:35:25 +01:00
Antonio Scandurra
02f215d953
Move document highlights RPC message to the background
2022-02-23 16:16:02 +01:00
Antonio Scandurra
919a280fab
Pass an AsyncAppContext to fake language server request handlers
2022-02-23 16:14:36 +01:00
Nathan Sobo
9c99b82bc4
Bump protocol version
2022-02-23 06:33:31 -07:00
Nathan Sobo
172cb2bea2
v0.17.0
2022-02-23 06:26:45 -07:00
Antonio Scandurra
9a6d65ee76
Merge pull request #483 from zed-industries/document-highlights
...
Show document highlights from the language server when moving the cursor
2022-02-23 10:38:15 +01:00
Max Brunsfeld
3adefbd6fb
Add C support with clangd
2022-02-22 17:21:21 -08:00