Commit Graph
10605 Commits
Author SHA1 Message Date
Piotr Osiewicz d69b07bafd Add tooltip to recent projects button
Z-2545
2023-07-07 16:30:19 +02:00
Piotr Osiewicz abf3b4a54e chore: Replace lazy_static Mutex with const. (#2693)
Mutex::new() is const-stable as of Rust 1.63.

Release Notes:
- N/A
2023-07-07 15:07:12 +02:00
Antonio Scandurra 79ece8a86e Skip key down event if preceded by its key equivalent version (#2692)
Fixes
https://linear.app/zed-industries/issue/Z-2552/pressing-two-keystrokes-in-rapid-succession-ignores-the-latter

Previously, we would only track whether the previous key down event was
a key equivalent. However, this could cause issues when pressing certain
keystrokes in rapid succession, e.g.:

- Pressing `shift-right` (to select a character, dispatched as a key
equivalent)
- Pressing a character (with or without `shift` held down, dispatched as
a key down)

This would cause GPUI to ignore the second event because it was preceded
by a key equivalent event. With this commit, we track the last key
equivalent event, and skip the key down event only if it matches the
last key equivalent event.

Release Notes:

- Fixed a bug that could cause certain keystrokes performed in rapid
succession to incorrectly get ignored.
2023-07-07 12:13:32 +02:00
Antonio Scandurra 318deed25b Skip key down event if preceded by its key equivalent version
Previously, we would only track whether the previous key down event
was a key equivalent. However, this could cause issues when pressing
certain keystrokes in rapid succession, e.g.:

- Pressing `shift-right` (to select a character)
- Pressing a character (with or without `shift` held down)

This would cause GPUI to ignore the second event because it was
preceded by a key equivalent event. With this commit, we track the
last key equivalent event, and skip the key down event only if it
matches the last key equivalent event.
2023-07-07 12:02:08 +02:00
KCaverly c03dda1a0c fixed bug on absolute vs relative path 2023-07-06 17:15:41 -04:00
KCaverly 6f1e988cb9 updated embedding treesitter query for python 2023-07-06 16:36:28 -04:00
KCaverly 7d634f66e2 updated vector_store to include extra context for semantic search modal 2023-07-06 16:33:54 -04:00
Kirill Bulatov 4ab2b8b24b Restart LSP server on corresponding initialization_options change (#2690)
Inlay hints depend on LSP server settings, but servers do not update the
initialization options and query hints with old settings.

Generally, we cannot know whether a certain option can be changed
without server restart, which the name of the options implies too, so be
on the safe side and restart the server.
Hints will update automatically after the server either sends a /refresh
request or reports its work progress end after startup.

Release Notes:

- Fixed LSP server not restarting after `initialization_options`
settings changes
2023-07-06 23:32:34 +03:00
Kirill Bulatov e6ec0af743 Remove redundant hint kind checks in tests 2023-07-06 23:27:25 +03:00
Kirill Bulatov fff65968bf Restart LSP server on initialization options change 2023-07-06 23:27:22 +03:00
KCaverly e57f6f21fe reindexing update to appropriately accomodate for buffer delay and persistent pending files list 2023-07-06 15:26:43 -04:00
Piotr Osiewicz 3ca0170264 Z 1332/show search results in scrollbar (#2687)
This PR adds highlighting of search results to the scrollbar.

Release Notes:

- Added highlighting of search results to the scrollbar.
2023-07-06 19:28:21 +02:00
KCaverly a86b6c42c7 corrected batching order and managed for open ai embedding errors 2023-07-06 11:11:39 -04:00
Nate Butler 793eff1695 Update scrollbar selection style 2023-07-06 10:54:47 -04:00
Antonio Scandurra b4ed0347b4 Filter out non-json files when loading conversations (#2688)
Fixes
https://linear.app/zed-industries/issue/Z-2540/filter-out-non-conversation-files-from-the-assistant-history
2023-07-06 16:51:52 +02:00
Kirill Bulatov 2c7e5e0671 Clip find preceding boundary (#2689)
Fixes inability to do `alt + left arrow` when an inlay with `Bias::Left`
is right to the left of the caret.

Release Notes:

- N/A
2023-07-06 17:24:03 +03:00
Kirill Bulatov 11ae99fbd6 Add a test 2023-07-06 17:16:34 +03:00
Antonio Scandurra 708852aa00 Clip left when finding preceding (line) boundary
This fixes an issue that was causing `alt-left` to not move the cursor
when it was located right after an inlay hint with a `Left` bias.
2023-07-06 16:25:27 +03:00
Kirill Bulatov 348c93e8bb Show inlay hints on startup for every language server with work events (#2686)
Closes https://linear.app/zed-industries/issue/Z-2537/inlay-hint-issues

Language servers such as typescript-language-servers report a single
work event, ending right after server's startup.

Other servers might send more similar event, also during startup. The
rest of the events are diagnostic-related and we filter them out.

React on such events with /refresh-like hint update, that will check
only the visible part of the editor for hints and might be replaced by
other /refresh requests, if needed.

Release Notes:

- N/A
2023-07-06 16:18:22 +03:00
Antonio Scandurra 5408275c7a Filter out non-json files when loading conversations 2023-07-06 14:38:05 +02:00
Piotr Osiewicz 3e245fec90 Save a flushing line instead of discarding it 2023-07-06 13:52:03 +02:00
Piotr Osiewicz 5e7d9dc718 Add hunk merging 2023-07-06 13:31:45 +02:00
Piotr Osiewicz b66453e771 fixup! Do not render multiple hunks for the same line 2023-07-06 12:11:08 +02:00
Kirill Bulatov 0b0a161626 Show inlay hints on startup for every language server with work events
Language servers such as typescript-language-servers report a single
work event, ending right after server's startup.

Other servers might send more similar event, also during startup.
The rest of the events are diagnostic-related and we filter them out.

React on such events with /refresh-like hint update, that will check
only the visible part of the editor for hints and might be replaced by
other /refresh requests, if needed.
2023-07-06 13:10:59 +03:00
Piotr Osiewicz 492b849ea1 Do not render multiple hunks for the same line 2023-07-06 12:09:33 +02:00
Piotr Osiewicz 8ced7ab00a Merge branch 'main' into Z-1292/show_search_results_in_scrollbar 2023-07-06 11:43:44 +02:00
Kirill Bulatov c298cf7527 Use less padding for typescript parameter hints (#2684)
Part of https://linear.app/zed-industries/issue/Z-2537/inlay-hint-issues

Release Notes:

- N/A
2023-07-06 11:23:20 +03:00
Kirill Bulatov 1936bdebb3 Use less padding for typescript parameter hints 2023-07-06 11:16:39 +03:00
Antonio Scandurra dd6629416c Fix panic when saved conversations directory changes (#2685)
Fixes
https://linear.app/zed-industries/issue/Z-2542/deleting-assistant-conversations-with-zed-open-can-cause-a-crash

We were updating the view's state but missed a `notify`, which caused
the `UniformList` responsible for rendering the saved conversations to
panic when some files were deleted.

Release Notes:

- Fixed a crash that could happen when deleting a saved assistant
conversation from the filesystem.
2023-07-06 10:06:43 +02:00
Antonio Scandurra f6c96ec892 Fix panic when saved conversations directory changes
We were updating the view's state but missed a `notify`, which caused
the `UniformList` responsible for rendering the saved conversations
to panic when some files were deleted.
2023-07-06 09:53:34 +02:00
Mikayla Maki 801f41e68e Move audio dependency to dev 2023-07-05 12:15:56 -07:00
Mikayla Maki 8b8bafef22 Remove spurious audio depedency 2023-07-05 12:05:16 -07:00
Mikayla Maki 594b6e8d64 collab 0.16.0 2023-07-05 11:47:17 -07:00
Joseph T. Lyons 6a15ae9c01 v0.95.x dev 2023-07-05 14:17:37 -04:00
Nate Butler 76873c508a Z-2276/Z-2275: Project & Branch switchers (#2662)
This PR adds project and branch switchers in top left corner. 

Release Notes:
- Added a project & branch switcher under project name.
2023-07-05 13:09:40 -04:00
Piotr Osiewicz b80281e556 cargo fmt 2023-07-05 18:57:06 +02:00
Nate ButlerandPiotr Osiewicz 1baa13561d Update project & git menus to be Toggleable<Interactive<ContainedText>>
Co-Authored-By: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2023-07-05 12:50:56 -04:00
KCaverly afccf608f4 updated both embed and parsing tasks to be multi-threaded. 2023-07-05 12:39:08 -04:00
Nate Butler de01fa1794 Update collaboration sounds, add sounds to screensharing (#2679)
Updates all collab sounds, add screen sharing sounds.

Release Notes:

- Improved collaboration sounds for joining and leaving a call, muting
and unmuting the mic.
- Added a sound when you start and stop screen sharing.
2023-07-05 12:30:47 -04:00
Piotr Osiewicz 0e0d78df84 Do not render recent paths in toolbar's project switcher 2023-07-05 18:04:40 +02:00
Piotr OsiewiczandAntonio ec47464bba branch_list: Show match count on the right hand side of a header.
Co-authored-by: Antonio <antonio@zed.dev>
2023-07-05 16:56:08 +02:00
Piotr OsiewiczandAntonio 85add260f6 Track regions instead of clicks.
Get rid of superfluous params in RenderParams related to hover & click state.

Co-authored-by: Antonio <antonio@zed.dev>
2023-07-05 16:48:52 +02:00
KCaverly eff0ee3b60 enabled batching for embedding calls 2023-07-05 10:02:42 -04:00
Kirill Bulatov 91a94d299e Simplify inlay map data (#2683)
Current logic does not need to access inlays by id in O(1), future
dynamic hints would need to know which hint they hover at, but that will
be done using binary search over the position's anchor we hover on;
nothing else seems to need this HashMap in the near future.

Because of that removal, no need to store `InlayId` apart from the
`Inlay`, hence remove the `InlayProperties` struct entirely.
This allows to eliminate a few generics along the way.

Release Notes:

- N/A
2023-07-05 16:31:47 +03:00
Piotr OsiewiczandAntonio cc88bff1ff Fix click-through behaviour of git panel
Co-authored-by: Antonio <antonio@zed.dev>
2023-07-05 15:25:33 +02:00
Kirill Bulatov d7f6b5e1a0 Remove InlayProperties 2023-07-05 16:17:14 +03:00
Kirill Bulatov 6ba1c3071a Simplify inlay map data 2023-07-05 15:23:56 +03:00
Piotr Osiewicz 8b3b1a6074 fixup! Remove stacks from branch list header 2023-07-05 14:08:21 +02:00
Piotr OsiewiczandAntonio 64b77bfa8d Remove stacks from branch list header
Co-authored-by: Antonio <antonio@zed.dev>
2023-07-05 14:04:16 +02:00
Antonio Scandurra 5505ebf4bc Support assistant: quote selection on multibuffers (#2682)
Fixes
https://linear.app/zed-industries/issue/Z-2430/assistant-quote-selection-does-not-work-in-multi-buffer

Release Notes:

- Added support for invoking `assistant: quote selection` (`cmd->`) when
editing a multi-buffer.
2023-07-05 11:49:03 +02:00