Commit Graph
11144 Commits
Author SHA1 Message Date
Piotr OsiewiczandMikayla d38a93bbb5 Do not query db on foreground thread.
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-06-30 14:05:55 +02:00
Piotr Osiewicz d33d6377e0 Make project dropdown exclusive wrt git menu 2023-06-30 14:05:55 +02:00
Piotr Osiewicz de2a7c34d7 Project dropdown menu 2023-06-30 14:05:55 +02:00
Piotr Osiewicz 9a20f6ac23 Fix warning about unused variable 2023-06-30 14:05:55 +02:00
Piotr Osiewicz 45b6a798f3 Update toast for checkout failure 2023-06-30 14:05:55 +02:00
Piotr Osiewicz 3dcb6ee47f Trail off project/branch name 2023-06-30 14:05:55 +02:00
Piotr Osiewicz 45ac441910 Remove unnecessary imports 2023-06-30 14:05:55 +02:00
Piotr Osiewicz 418aa42ea7 Fix build after rebase 2023-06-30 14:05:55 +02:00
Piotr Osiewicz 1adbd8c6d7 Add toast for git checkout failure 2023-06-30 14:05:55 +02:00
Piotr Osiewicz 9a8f668cf1 List recent branches 2023-06-30 14:05:55 +02:00
Piotr Osiewicz cdab13dd6c Add timestamps to branches 2023-06-30 14:05:55 +02:00
Piotr Osiewicz 92a0ca0cc4 Trail off branch names 2023-06-30 14:05:55 +02:00
Piotr Osiewicz 6be3982138 Render header and footer of git menu 2023-06-30 14:05:55 +02:00
Piotr Osiewicz 4b369afbc8 WIP: git menu 2023-06-30 14:05:55 +02:00
Mikayla Maki 591d6643a2 Fix method header 2023-06-29 23:53:57 -07:00
Mikayla Maki d228dc2d8a fix failing test 2023-06-29 23:50:24 -07:00
Conrad Irwin e5b58d8682 vim: Fix edge-case in } when trailing newline is absent
Added .assert_shared_state() to NeovimBackedTestContext – although it's
not strictly necessary to show the expected behaviour in the test file
(as we can just compare to neovim's JSON recording), it makes it much
easier to understand what we're testing.
2023-06-29 23:31:22 -06:00
Conrad Irwin dd53b256cb vim: Add }/{ for start/end of paragraph
Fixes: zed-industries/community#470
2023-06-29 23:31:22 -06:00
Mikayla Maki 9cbcdeb523 Added more tests and minimal file updates 2023-06-29 18:21:35 -07:00
Mikayla Maki 6584785a50 Make path updates minimal 2023-06-29 18:15:40 -07:00
Mikayla Maki 91f2a5401c fmt and update dependency 2023-06-29 17:49:42 -07:00
Mikayla Maki 742da534a2 Fix edge case with absolute file paths 2023-06-29 17:48:01 -07:00
Mikayla Maki f416d9ef00 Add the ability to make new directories by adding slashes to a file name 2023-06-29 17:35:22 -07:00
Mikayla Maki fef68e8480 Add click out events to GPUI (#2659)
This PR adds a new mouse event type for catching when a click happens
outside of a given region.

This was added because I noticed a 'race condition' between the context
menu and the buttons which deploy a context menu. Buttons use on
an`on_click()` handler to deploy the context menu, but the context menu
was closing itself with an `on_down_out()` handler. This meant that the
order of operations was:

0. Context menu is open
1. User presses down on the button, _outside of the context menu_ 
2. `on_down_out()` is fired, closing the context menu
3. User releases the mouse
4. `click()` is fired, checks the state of the context menu, finds that
it's closed, and so opens it

You can see this behavior demonstrated with this video with a long-click
here:


https://github.com/zed-industries/zed/assets/2280405/588234c3-1567-477f-9a12-9e6a70643527

~~Switching from `on_down_out()` to `on_click_out()` means that the
click handler for the button can close the menu before the context menu
gets a chance to close itself.~~

~~However, GPUI does not have an `on_click_out()` event, hence this
PR.~~

~~Here's an example of the new behavior, with the same long-click
action:~~


https://github.com/zed-industries/zed/assets/2280405/a59f4d6f-db24-403f-a281-2c1148499413

Unfortunately, this `click_out` is the incorrect event for this to
happen on. This PR now adds a mechanism for delaying the firing of a
cancel action so that toggle buttons can signal that this on_down event
should not result in a menu closure.

Release Notes:

* Made context menus deployed from buttons toggle, instead of
hide-and-re-show, visibility on click
2023-06-29 17:33:37 -07:00
Mikayla Maki 8eca1fdbb8 fmt 2023-06-29 17:19:35 -07:00
Mikayla Maki 74fefb0002 Remove on_click_out handler from context menu
Add 'delay_cancel()' method and on_down handler to relevant buttons
2023-06-29 17:10:51 -07:00
Nate Butler ac73473cc5 Extract assistant tool buttons into tab_bar_button 2023-06-29 18:13:31 -04:00
Nate Butler c737cc7198 Add low_tokens_remaining case to the assistant 2023-06-29 17:44:47 -04:00
Nate Butler ac727f51fb Add doc comments for ColorScheme layer properties 2023-06-29 17:32:19 -04:00
Nate Butler 30251b8c22 Update assistant styles 2023-06-29 17:32:04 -04:00
Kirill Bulatov 023ede7a5c Support basic inlay hints (#2660)
Part of https://github.com/zed-industries/community/issues/138
Part of https://linear.app/zed-industries/issue/Z-477/inlay-hints

Supports LSP requests for inlay hints, LSP /refresh request to reload
them.
Reworks DisplayMap and underlying layer to unite suggestions with inlay
hints into new, `InlayMap`.
Adds a hint cache inside `Editor` that tracks buffer/project/LSP request
events, updates the hints and ensures opened editors are showing up to
date text hints on top.

Things left to do after this PR:
* docs on how to configure inlay hints
* blogpost
* dynamic hints: resolve, hover, navigation on click, etc.

Release Notes:

- Added basic support of inlay hints
2023-06-29 22:49:39 +03:00
Kirill Bulatov b56e2b4a28 Remove a flacky test, fix the failing one 2023-06-29 22:45:04 +03:00
Kirill Bulatov 3a66693941 Post-rebase fixes 2023-06-29 22:39:33 +03:00
Kirill Bulatov 4afeb64e4c Invalidate refresh tasks better 2023-06-29 22:39:18 +03:00
Kirill Bulatov 5f79eea757 Simplify the hint cache code 2023-06-29 22:39:18 +03:00
Kirill Bulatov 54a4c0d0e3 Better tests, invalidate multibuffer excerpts better 2023-06-29 22:39:18 +03:00
Kirill Bulatov 95cc88678e Simplify hint task queueing 2023-06-29 22:39:18 +03:00
Kirill Bulatov 7ae67fc0b1 More inlay hint cache tests 2023-06-29 22:39:18 +03:00
Kirill BulatovandAntonio Scandurra 379325c8c4 Use fold points to go to display map's prev/next line boundary
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:39:18 +03:00
Kirill BulatovandAntonio Scandurra 9bdbf83f2e Fix wrap map test
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:39:18 +03:00
Kirill BulatovandAntonio Scandurra 4b5e5c8206 Fix fold map tests
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:39:18 +03:00
Kirill Bulatov a92bc13f72 Add more hint tests 2023-06-29 22:39:18 +03:00
Kirill Bulatov aefc4e1748 Move highlights from fold to inlay randomized tests 2023-06-29 22:39:18 +03:00
Kirill Bulatov ff5645c43b Move hint settings on the language level 2023-06-29 22:39:18 +03:00
Kirill Bulatov 62c136a59d Theme hints and suggestions differently 2023-06-29 22:39:18 +03:00
Kirill BulatovandAntonio Scandurra 16ffe2d503 Improve inlay hint highlights
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-06-29 22:39:18 +03:00
Kirill Bulatov b85bb724fa Test inlay hint cache 2023-06-29 22:39:18 +03:00
Nate Butler b39ef4ba1b Update Hint Style
zzz
2023-06-29 22:39:17 +03:00
Kirill Bulatov 31eb20a5a6 Only skip /refresh inlay queries when vislble range is not updated 2023-06-29 22:25:50 +03:00
Kirill Bulatov 26d34594b2 Revert useless changes, simplify 2023-06-29 22:25:50 +03:00