Commit Graph
39175 Commits
Author SHA1 Message Date
Joseph T. Lyons 33bf2b2518 Remove code block for GitHub release notes
Discord can directly render the Markdown now.
2023-07-08 18:03:18 -04:00
Conrad Irwin 385cc12725 Rebuild vim search experience on refactored code 2023-07-07 15:57:54 -06:00
Conrad IrwinandAntonio 04e5a0f3a5 Make search less magic
Co-Authored-By: Antonio <antonio@zed.dev>
2023-07-07 15:57:54 -06:00
Conrad Irwin 2cdf99a37b Better waiting in tests 2023-07-07 15:57:54 -06:00
Conrad Irwin 1b1c0d472f vim: ? to search backwards, and /<enter> to repeat search 2023-07-07 15:57:52 -06:00
Conrad Irwin a58c6fc5e4 vim: add gD to go to type definition 2023-07-07 15:57:37 -06:00
Conrad Irwin b4a01fb7dd vim: add */#/g*/g# for jumping to next word
As in vim, this toggles the normal search experience.
2023-07-07 15:57:35 -06:00
Conrad Irwin 23ccb140d5 vim: Enter/n/N to navigate search results 2023-07-07 15:57:14 -06:00
Conrad Irwin 6e6b7b87ca vim: Don't enter visual mode in search/go to definition
Fixes: zed-industries/community#1514
Contributes: zed-industries/community#1284
2023-07-07 15:56:37 -06:00
Conrad Irwin 21402356fa search: Allow running a search with different options
Refactor search options to use bitflags so that we can represent
the entire set of settings in one place.
2023-07-07 15:56:37 -06:00
Conrad Irwin 5978a6b221 vim: indent in visual mode uses only one <
Fixes: zed-industries/community#1562
2023-07-07 15:56:35 -06:00
Conrad Irwin eff7089db8 vim: { } to navigate by paragraph (#2668)
As part of this I added `assert_shared_state()` to the
NeovimBackedTestContext so that it is more like a drop-in replacement
for the VimTestContext.

The remaining part of zed-industries/community#682 is adding bracket
matching to plain text. It looks like the current logic requires there
to be a tree sitter language for the language in order to support
bracket matching. I didn't fix this in this PR because I was unsure
whether to try and work around that, or to try and add a plain text tree
sitter language.

Release Notes:

- vim: support `{` and `}` for paragraph motion
([#470](https://github.com/zed-industries/community/issues/470)).
- vim: fix `%` at the end of the line
([#682](https://github.com/zed-industries/community/issues/682)).
2023-07-07 14:59:06 -06:00
Conrad Irwin d9d5f16fb0 vim: keymap tweaks (#2674)
A few small tweaks to fix some of the community issues

Release Notes:

- vim: Fix `escape` in command palette
([#1347](https://github.com/zed-industries/community/issues/1347)).
- vim: Allow `^` as a motion in actions
([#856](https://github.com/zed-industries/community/issues/856)).
- vim: Allow `ctrl-c` to exit visual mode
([#1447](https://github.com/zed-industries/community/issues/1447)).
2023-07-07 14:58:01 -06:00
Julia eb6179d05f Prevent duplicate instances by coordinating via a socket (#2691)
We've been getting a bunch of panics from duplicate app instances
competing over the local sqlite DB. After chatting with @mikayla-maki we
determined it was probably best to add our own mechanism to prevent
duplicates rather than just relying on the OS. My logic is that we'd
need to build a system like this eventually for Windows/Linux anyway so
it's more appealing than reworking our local DB access to be able to
cooperate with another process while likely isn't something we want to
support anyway.

I attempted to keep this mechanism conservative so in the case of
another program interfering with it we should fail somewhat gracefully
and still continue to launch, albeit without the ability to prevent
another instance from launching.

Fixes
https://linear.app/zed-industries/issue/Z-2435/thread-background-executor-1-panicked-at-could-not-send-write-action

Release Notes:
- Added a mechanism to prevent duplicate Zed instances from launching to
avoid a crash.
2023-07-07 14:38:55 -04:00
KCaverly 29b37b3a27 merged main 2023-07-07 14:24:29 -04:00
Julia cea119ea52 Avoid checking for duplicate instance when local DB is disabled 2023-07-07 14:20:39 -04:00
Julia 3d71d19775 Use different port and handshake for different release channels 2023-07-07 14:20:39 -04:00
Julia 5f1e58b1f9 Prevent duplicate instances by coordinating via a socket 2023-07-07 14:19:44 -04:00
Piotr Osiewicz dcb76ffb97 fixup! vcs: Add 'create branch' button 2023-07-07 18:37:53 +02:00
Piotr Osiewicz ac0900bfcb vcs: Add 'create branch' button 2023-07-07 18:36:55 +02:00
Piotr Osiewicz d148c67cd0 Add tooltip to recent projects button
Z-2545
2023-07-07 16:30:19 +02:00
Piotr Osiewicz fc1830dd9b 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 ddf85f8845 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 c6a5293f7b 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 d72122b981 fixed bug on absolute vs relative path 2023-07-06 17:15:41 -04:00
KCaverly b6d428b575 updated embedding treesitter query for python 2023-07-06 16:36:28 -04:00
KCaverly ebdda2aa65 updated vector_store to include extra context for semantic search modal 2023-07-06 16:33:54 -04:00
Kirill Bulatov 3eeeb90c45 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 4e5a620d1c Remove redundant hint kind checks in tests 2023-07-06 23:27:25 +03:00
Kirill Bulatov c463e0dc55 Restart LSP server on initialization options change 2023-07-06 23:27:22 +03:00
KCaverly 9a5449b801 reindexing update to appropriately accomodate for buffer delay and persistent pending files list 2023-07-06 15:26:43 -04:00
Piotr Osiewicz 203a1c0a0e 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 71dbc29334 corrected batching order and managed for open ai embedding errors 2023-07-06 11:11:39 -04:00
Nate Butler affdd9655e Update scrollbar selection style 2023-07-06 10:54:47 -04:00
Antonio Scandurra 5c22738625 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 b39f9aad11 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 9f000ab185 Add a test 2023-07-06 17:16:34 +03:00
Antonio Scandurra 89e1eb4edd 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 4cf0d4f737 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 f4274c1df1 Filter out non-json files when loading conversations 2023-07-06 14:38:05 +02:00
Piotr Osiewicz 9260f5d093 Save a flushing line instead of discarding it 2023-07-06 13:52:03 +02:00
Piotr Osiewicz 6022da58f3 Add hunk merging 2023-07-06 13:31:45 +02:00
Piotr Osiewicz 850e35f5cb fixup! Do not render multiple hunks for the same line 2023-07-06 12:11:08 +02:00
Kirill Bulatov 0ad7efb1b2 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 f3899e3246 Do not render multiple hunks for the same line 2023-07-06 12:09:33 +02:00
Piotr Osiewicz a5afd99a66 Merge branch 'main' into Z-1292/show_search_results_in_scrollbar 2023-07-06 11:43:44 +02:00
Kirill Bulatov 3d8a473e45 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 19c11a9a49 Use less padding for typescript parameter hints 2023-07-06 11:16:39 +03:00
Antonio Scandurra c292524797 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 c64695b58a 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