Commit Graph

8309 Commits

Author SHA1 Message Date
Conrad Irwin
33d7fe02ee Rewrite paste
- vim: support P for paste before
- vim: support P in visual mode for paste without overriding clipboard
- vim: fix position when using `p` on text copied outside zed
- vim: fix indentation when using `p` on text copied from zed
2023-08-22 13:27:57 -06:00
Conrad Irwin
31db5e4f62
Vim z 2819 (#2875)
Add `$` and `#` and a smoke test for vim-mode respecting the
configuration.
2023-08-22 11:38:06 -06:00
Nathan Sobo
733df38f9b Checkpoint
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-08-22 11:34:06 -06:00
Piotr Osiewicz
ccb3f6748c chore: fmt 2023-08-22 18:14:07 +02:00
Piotr Osiewicz
ccb9b5d278 Query char_kind for completion triggers.
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2023-08-22 18:12:05 +02:00
Nathan Sobo
3921278319 Add more style helpers 2023-08-22 09:16:05 -06:00
Nathan Sobo
53679ce045 Checkpoint 2023-08-22 09:07:45 -06:00
KCaverly
328b7e523c reorganized to stop the race 2023-08-22 15:01:21 +02:00
KCaverly
aabdfa210f working on initialization + index breakup 2023-08-22 14:45:27 +02:00
KCaverly
ced2b2aec3 reworked ProjectState to include additional context 2023-08-22 11:58:48 +02:00
Piotr Osiewicz
d27cebd977
Z 2819 (#2872)
This PR adds new config option to language config called
`word_boundaries` that controls which characters should be recognised as
word boundary for a given language. This will improve our UX for
languages such as PHP and Tailwind.

Release Notes:

- Improved completions for PHP
[#1820](https://github.com/zed-industries/community/issues/1820)

---------

Co-authored-by: Julia Risley <julia@zed.dev>
2023-08-22 10:35:20 +02:00
Joseph T. Lyons
a836f9c23d
Add a default_open_ai_model setting for the assistant (#2876)
[This PR has been sitting around for a
bit](https://github.com/zed-industries/zed/pull/2845). I received a bit
of mixed opinions from the team on how this setting should work, if it
should use the full model names or some simpler form of it, etc. I went
ahead and made the decision to do the following:

- Use the full model names in settings - ex: `gpt-4-0613`
- Default to `gpt-4-0613` when no setting is present
- Save the full model names in the conversation history files (this is
how it was prior) - ex: `gpt-4-0613`
- Display the shortened model names in the assistant - ex: `gpt-4`
- Not worry about adding an option to add custom models (can add in a
follow-up PR)
- Not query what models are available to the user via their api key (can
add in a follow-up PR)

Release Notes:

- Added a `default_open_ai_model` setting for the assistant (defaults to
`gpt-4-0613`).

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
2023-08-22 02:55:27 -04:00
Conrad Irwin
168a213a44 Add test for word characters in vim 2023-08-21 22:37:14 -06:00
Conrad Irwin
14fa996cdc Add # and $ for js 2023-08-21 22:36:58 -06:00
Piotr Osiewicz
42b0c5dfdd Remove comment;for real now 2023-08-22 01:04:55 +02:00
Piotr Osiewicz
bca2d02a61 Revert "Remove dead comment"
This reverts commit 046759a366.
2023-08-22 01:04:15 +02:00
Piotr Osiewicz
344a09a4f8 Rename word_boundaries to word_characters 2023-08-22 01:02:25 +02:00
Piotr Osiewicz
046759a366 Remove dead comment 2023-08-22 01:01:27 +02:00
Nathan Sobo
ff7b25c538 Checkpoint 2023-08-21 16:14:59 -06:00
Joseph T. Lyons
f66e6863fa Add channel id to call events
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2023-08-21 13:50:04 -04:00
Piotr Osiewicz
6137d88a54 Merge branch 'main' into Z-2819 2023-08-21 17:41:27 +02:00
Piotr Osiewicz
00caad2f17 ..and use it in PHP language config 2023-08-21 17:41:05 +02:00
Piotr Osiewicz
ab5bd0ac5a Use new char_kind (parameterized by language) 2023-08-21 17:39:38 +02:00
Piotr Osiewicz
3e8522b5f2 WIP: Saved state from Friday.
Co-authored-by: Julia Risley <julia@zed.dev>
2023-08-21 17:09:03 +02:00
KCaverly
3d89cd10a4 added sha1 encoding for each document 2023-08-21 16:35:57 +02:00
Kyle Caverly
bbe6d3b261
Semantic index rough edges (#2871)
Small PR aimed at improving a few edge cases for semantic indexing large
projects.

Release Notes (Preview-only).

- Batched large files with a number of documents greater than
EMBEDDINGS_BATCH_SIZE.
- Ensured that the job handle counting mechanism is consistent with
inner file batching.
- Updated tab content names for semantic search, to match text/regex
searches.
2023-08-21 13:43:08 +02:00
Piotr Osiewicz
c68b518aec chore: fix compiler warning
Co-authored-by: Kyle <kyle@zed.dev>
2023-08-21 13:31:45 +02:00
Piotr Osiewicz
67a48ec106 project_search: use search history's current entry as a tab name.
Previously the tab name for Semantic Search was not updated, as we didn't have an active query to go off of

Co-authored-by: Kyle <kyle@zed.dev>
2023-08-21 13:30:32 +02:00
Piotr Osiewicz
61041b0cd1 Do not attempt to reindex a file if previous attempts have failed.
Add doc comment to JobHandle

Co-authored-by: Kyle <kyle@zed.dev>
2023-08-21 13:23:11 +02:00
Piotr Osiewicz
1a88444f2f Increment job counter on JobClient::new
Co-authored-by: Kyle <kyle@zed.dev>
2023-08-21 13:00:56 +02:00
KCaverly
def215af9f update job handle to ensure file count is consistent
Co-authored-by: Piotr <piotr@zed.dev>
2023-08-21 12:47:43 +02:00
KCaverly
1cae4758cc manage for edge case in which file documents are larger than the allowable limit 2023-08-21 11:29:45 +02:00
Piotr Osiewicz
9ea0ed3e95
chore: remove unused features from rodio crate. (#2869)
This reduces our dep count by 1% at the expense of not supporting
playback of .flac, .mp3 and .vorbis formats. We only use .wav anyways.


Release Notes:
- N/A
2023-08-21 11:07:31 +02:00
Nathan Sobo
f4d8763d2b WIP 2023-08-19 23:16:20 -06:00
Nathan Sobo
6663d3f8eb Checkpoint 2023-08-19 22:33:28 -06:00
Nathan Sobo
afff46b335 Checkpoint 2023-08-19 21:24:28 -06:00
Nathan Sobo
2c6f692c56 Checkpoint 2023-08-19 20:29:55 -06:00
Nathan Sobo
0747131bd4 Compiling checkpoint 2023-08-19 19:51:22 -06:00
Mikayla
bfd3e53dcd
Implement component test page 2023-08-19 16:29:24 -07:00
Mikayla
e946b0a2ec
Finish building out adapters and names
Document core traits
Add start for a component storybook
2023-08-19 14:40:05 -07:00
Mikayla
bd3ab82dac
Add disclosable components into channels
Rename components to more closely match their purpose
2023-08-19 05:18:53 -07:00
Mikayla Maki
b7e03507c2
Update components.rs 2023-08-19 04:30:49 -07:00
Nathan Sobo
76993f6b57 WIP: Trying to find a composable approach to styling that plays nice with layout engine 2023-08-18 20:08:29 -06:00
Mikayla
2d37128693
Actually get it compiling, omg 2023-08-18 19:02:27 -07:00
Mikayla
3178adefde
WIP: Add disclosable channels 2023-08-18 18:11:05 -07:00
Mikayla Maki
29c339e3b4
Revert "Remove semantic search UI" (#2865)
This reverts commit c0f042b39a, where I
deleted the semantic-search related UI code.

Apologies to @KCaverly for the misunderstanding

Release Notes:

- N/A
2023-08-18 18:05:19 -07:00
Mikayla Maki
15f91f38f6
Remove potential osascript hijacking attack (#2867)
Fixes
https://linear.app/zed-industries/issue/Z-2818/security-vulnerability-dylib-injection

Release Notes:

- Fixed a potential local code-injection if a user installs the Zed CLI
for the first time with a hijacked `osascript` in their path.
2023-08-18 18:00:39 -07:00
Mikayla
d22caf5a19
Fix erorr in revert 2023-08-18 17:59:06 -07:00
Mikayla
5a356a4710
Remove potential osascript hijacking 2023-08-18 17:40:08 -07:00
Max Brunsfeld
ef9686c988
Reorganize the structure of the collab crate's db module (#2866)
This PR just moves some code around, with the goal of making it easier
to find things in the `collab::db` module. That has become a large
module. Previously, most of the logic lived in one giant `impl Database`
item in `db.rs`.

I broke up this `impl` into several different `impl` blocks, grouped by
topic, each in a different file in a folder called `queries`.

I also pulled out the macro-generated id types into their own file,
moved the `TestDb` struct into its own file, and moved the `sea_orm`
entity declarations into a folder called `tables`.

New folder structure:

```
db
├── db_tests.rs
├── ids.rs
├── queries
│   ├── access_tokens.rs
│   ├── channels.rs
│   ├── contacts.rs
│   ├── projects.rs
│   ├── rooms.rs
│   ├── servers.rs
│   ├── signups.rs
│   └── users.rs
├── queries.rs
├── tables
│   ├── access_token.rs
│   ├── channel.rs
│   ├── channel_member.rs
│   ├── channel_path.rs
│   ├── contact.rs
│   ├── follower.rs
│   ├── language_server.rs
│   ├── project.rs
│   ├── project_collaborator.rs
│   ├── room.rs
│   ├── room_participant.rs
│   ├── server.rs
│   ├── signup.rs
│   ├── user.rs
│   ├── worktree.rs
│   ├── worktree_diagnostic_summary.rs
│   ├── worktree_entry.rs
│   ├── worktree_repository.rs
│   ├── worktree_repository_statuses.rs
│   └── worktree_settings_file.rs
├── tables.rs
└── test_db.rs
```

Release Notes:

- N/A
2023-08-18 17:29:15 -07:00
Max Brunsfeld
b35aaf144b Break up Database impl into multiple files, organized by topic 2023-08-18 17:03:34 -07:00
Max Brunsfeld
e964137d79 Reorganize source files of collab::db
* Move all sea_orm tables into a 'tables' module
* Move TestDb into its own file
* Move id types into their own module
2023-08-18 16:23:33 -07:00
Mikayla
48553d7c8f
Revert "Remove semantic search UI"
This reverts commit c0f042b39a.
2023-08-18 16:18:28 -07:00
Nathan Sobo
eec39dc23c WIP 2023-08-18 17:14:29 -06:00
Mikayla Maki
cb55204e22
Move the collab panel to the left by default (#2864)
Increase the indent size on channels
Switch font UI mono

Release Notes:

- Switch the collaboration panel font to Zed's sans-mono (preview only)
- Switch the default dock side to the left (preview-only)
- Increase the indent size on the channels panel (preview-only)
2023-08-18 16:06:10 -07:00
Mikayla Maki
24fbea1557
Update collab_panel.rs 2023-08-18 15:34:35 -07:00
Mikayla
4c15f26eba
Finish rename correctly 2023-08-18 15:26:36 -07:00
Mikayla
4c3227ce2a
Fix example compile erorr 2023-08-18 15:17:24 -07:00
Mikayla
84f35d4e6b
Add pub 2023-08-18 15:12:56 -07:00
Mikayla
8ef671d7a1
Move the collab panel to the left by default
Increase the indent size on channels
Switch font UI mono
2023-08-18 15:04:22 -07:00
Conrad Irwin
f0ebbd01e6
Don't show vim mode when disabled (#2863)
Fixes vim's mode indicator showing up when vim is disabled.
2023-08-18 16:00:46 -06:00
Conrad Irwin
3ab3042e95 Don't show vim mode when disabled 2023-08-18 15:50:34 -06:00
Max Brunsfeld
1c46749ad7 Fix regression in Buffer::language_scope_at
Co-authored-by: Julia <julia@zed.dev>
2023-08-18 12:58:09 -07:00
Max Brunsfeld
08429169e2
Upgrade Tree-sitter for error recovery bug fix (#2860)
Bumps Tree-sitter for
https://github.com/tree-sitter/tree-sitter/pull/2526.

Release Notes:

- Fixed a bug where small syntax errors would mess up syntax
highlighting more than necessary when editing certain languages, like
Scheme and PHP.
2023-08-18 12:01:53 -07:00
Max Brunsfeld
09fcacdfd1 Upgrade Tree-sitter for error recovery bug fix 2023-08-18 11:31:40 -07:00
Conrad Irwin
93461d366c Fix <Enter> to go to non-whitespace character
Fixes: zed-industries/community#831
2023-08-18 12:24:39 -06:00
Conrad Irwin
e3c0e93e46 Fix cursor adjustment on scroll
Fixes: zed-industries/community#1929

Also preserves visual modes correctly.
2023-08-18 11:23:43 -06:00
Conrad Irwin
d1aa82bb48
vim visual block (#2849)
Release notes:

- vim: add Visual Block mode
([#984](https://github.com/zed-industries/community/issues/984)),
([#1415](https://github.com/zed-industries/community/issues/1415)).
- vim: add support for `a<object>` and `i<object>` in visual modes
- vim: fix scroll shortcuts (`ctrl-{f,b,d,u,e,y}`) in visual modes
- allow `shift-enter` to type a newline.
2023-08-18 09:55:40 -06:00
Piotr Osiewicz
273a8b4368 editor: Recognize '$' as a Word character.
This fixes PHP variable completion. When we were querying for completions, PHP LS returned proper matches for variables which we filtered out as our query did not include a `$` character.

Z-2819
2023-08-18 17:25:20 +02:00
Kirill Bulatov
269dad5a9c Respect completion resolve server capabilities
Only query for additional edits if the server supports it

Co-Authored-By: Julia Risley <julia@zed.dev>
2023-08-18 16:55:47 +03:00
Kyle Caverly
8451e7eb7e
Project search design (#2834)
TODO before merging: 
- [x] Re-run project search when options (case, word, regex) change

/cc @PixelJanitor 
Release Notes:
- Revamped project & buffer search UI.
- Added "Cycle Mode" command for search
2023-08-18 14:38:01 +02:00
Nathan Sobo
b910c85f7f Still need to wire up MouseMove with the new regions 2023-08-18 02:23:06 -06:00
Nathan Sobo
3709eff34b Compiling 2023-08-18 01:59:21 -06:00
Nathan Sobo
9b74dc196e Introduce Refinement trait and derive macro 2023-08-18 01:03:46 -06:00
Mikayla
66e94aa199
Make search re-query eagerly when changing modes
Fix a bug where focus could be lost when clearing the search results
2023-08-17 17:53:58 -07:00
Nathan Sobo
19ccb19c96 Compiling 2023-08-17 18:37:54 -06:00
Mikayla
c0f042b39a
Remove semantic search UI 2023-08-17 17:28:09 -07:00
Mikayla
21fa6090b8
Add action button component for rendering the search options 2023-08-17 17:28:09 -07:00
Max Brunsfeld
802911d742
Fix AppKit screen coordinate conversion leading to wrong window bounds (#2856)
Fixes
https://linear.app/zed-industries/issue/Z-1510/join-project-notification-takes-up-full-screen-on-a-second-monitor

There were multiple mistakes in the positioning of Zed's notification
windows, one of which lead to the notifications taking up the full
screen on secondary displays 😱 .
* Wrong sign for the vertical padding (moving the window *upward*
instead of downward)
* Using the screen's full frame instead of its "visible frame" (which
accounts for app menu bar)
* Wrong coordinate translation between our coordinates and AppKit's
coordinates. Regardless of which display a given window appears on, the
coordinate translation needs to use the height of the *main* display.

Release Notes:

- Fixed a bug where call notifications were accidentally full-screen on
all displays except the main display.
2023-08-17 16:24:46 -07:00
Conrad Irwin
b0ba0f8851 Fix visual objects
Adds 'a'/'i' in visual mode
2023-08-17 17:13:23 -06:00
Max Brunsfeld
cd2ef784ea Translate coordinates using the primary screen not the main screen 2023-08-17 16:12:52 -07:00
Max Brunsfeld
6eba0ef630 Return to master branch of alacritty 2023-08-17 15:31:27 -07:00
Mikayla
8630557ece
Add action button component for rendering the search options 2023-08-17 15:30:40 -07:00
Max Brunsfeld
d9ef987b04 Fix AppKit screen coordinate conversion leading to wrong window bounds 2023-08-17 15:23:28 -07:00
Conrad Irwin
d4276acab8 Give up on monospace indicator
Changing mode almost always introduces the (1 selected) text in
the status bar, so we may as well also keep the --'s for block and line
mode.
2023-08-17 16:04:55 -06:00
Conrad Irwin
eb0b2e60bb Preserve line mode selection on undo
This diverges from vim's behaviour (which collapses the
cursor to a single point on undo).
2023-08-17 15:40:27 -06:00
Conrad Irwin
59d1a5632f Fix edge-cases in visual block insert 2023-08-17 15:16:26 -06:00
Conrad Irwin
3514816ece Store some vim state per-editor
This fixes a bug where opening and closing command would reset your
selection incorrectly.
2023-08-17 14:09:47 -06:00
Nathan Sobo
24d19deb0b Compiling checkpoint 2023-08-17 14:05:18 -06:00
Nathan Sobo
f3a275d339 Revert "Add a proc macro for deriving override structs with optional fields"
This reverts commit ab9356e9d8.
2023-08-17 13:48:46 -06:00
Nathan Sobo
ab9356e9d8 Add a proc macro for deriving override structs with optional fields 2023-08-17 09:39:23 -06:00
Piotr Osiewicz
1bd7d7077a Move nav buttons to the left hand side of a tab bar.
Co-authored-by: Nate <nate@zed.dev>
2023-08-17 16:45:11 +02:00
Nathan Sobo
b95b2af3e0 Store generic mouse regions on window that contain their event type id 2023-08-17 08:37:55 -06:00
KCaverly
b7dd12e53e ensured search results are cleared appropriately while cycling modes 2023-08-17 11:11:09 +01:00
Mikayla
afebe3faf8
Merge branch 'main' into project_search_design 2023-08-17 01:56:05 -07:00
Mikayla Maki
6d3518cb50
Collab panel touch ups (#2855)
This will also fix the bug that @JosephTLyons observed where accepting a
channel invite would not show sub channels.

Release Notes:

- Offline section is now collapsed by default
- Manage members now shows full list
- Dragging of docks now follows the mouse exactly, and double clicks
reset size. (https://github.com/zed-industries/community/issues/1816)
2023-08-17 01:09:01 -07:00
Mikayla
75679291a9
Add fix for lost channel update bug 2023-08-17 00:56:21 -07:00
Conrad Irwin
7598030102 Tidy-up 2023-08-16 22:29:28 -06:00
Nathan Sobo
812d3f6af6 Get basic mouse_down and mouse_up working 2023-08-16 22:21:27 -06:00
Mikayla
5bc481112e
Add test for lost channel update 2023-08-16 20:05:21 -07:00
Mikayla
05becc75d1
Collapse offline section by default 2023-08-16 19:51:41 -07:00
Mikayla
2f16147055
Fix dock resizing 2023-08-16 19:47:54 -07:00
Mikayla
3074455386
WIP 2023-08-16 16:56:00 -07:00
Max Brunsfeld
fa0ddfa15d
Use our fork of alacritty to avoid winit dependency (#2853)
Bumps `alacritty_terminal` for
https://github.com/alacritty/alacritty/pull/7149
2023-08-16 14:54:55 -07:00
Max Brunsfeld
a5a212e1da Use our fork of alacritty to avoid winit dependency 2023-08-16 14:31:38 -07:00
Kirill Bulatov
7334bdccbf Better multibuffer tests 2023-08-16 23:38:11 +03:00
Kirill Bulatov
7fcf9022b4 Fix rebase issues 2023-08-16 23:38:11 +03:00
Nate Butler
3ed50708ac Add inlay_hint icon, update search icon, update tooltips 2023-08-16 23:38:11 +03:00
Kirill Bulatov
f9131f657e Use InlayHint instead of Inlay where appropriate 2023-08-16 23:38:11 +03:00
Kirill Bulatov
1938fd85e8 Do not leak pane handles 2023-08-16 23:38:11 +03:00
Kirill Bulatov
9c6135f47a Test hints toggle 2023-08-16 23:38:11 +03:00
Kirill Bulatov
8926c23bdb Extract quick_action_bar into its own crate 2023-08-16 23:38:11 +03:00
Kirill Bulatov
0f650acc23 Repaint inlays icon on inlays cache disabling/enabling
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2023-08-16 23:38:11 +03:00
Kirill Bulatov
0b93e490a5 Improve toggle UI, fix inlays update speed 2023-08-16 23:38:11 +03:00
Kirill Bulatov
6a326c1bd8 Toggle buffer search via quick actions 2023-08-16 23:38:11 +03:00
Kirill Bulatov
5c3d563f0f Draft quick actions bar 2023-08-16 23:38:11 +03:00
Nathan Sobo
187d78011c WIP 2023-08-16 13:52:42 -06:00
Nathan Sobo
f1aafab61d Get text rendering
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-08-16 12:50:35 -06:00
Joseph T. Lyons
07675e3c55 v0.101.x dev 2023-08-16 14:22:54 -04:00
Max Brunsfeld
442ec606d0 collab 0.17.0 2023-08-16 11:05:08 -07:00
Max Brunsfeld
4ea8b8292c
Introduce channels and move collab popover contents to a collaboration panel (#2828)
### Summary

This PR introduces channels: a new way of starting collaboration
sessions. You can create channels and invite others to join them. You
can then hold a call in a channel, where any member of the channel is
free to join the call without needing to be invited.

Channels are displayed in a new panel called the collaboration panel,
which now also contains the contacts list, and the current call. The
collaboration popover has been removed from the titlebar.

![Screen Shot 2023-08-15 at 9 25 37
AM](https://github.com/zed-industries/zed/assets/326587/0f989dea-7fb7-4d50-9acd-25c8f1c30cd1)


For now, the channels functionality will only be revealed to staff, so
the public-facing change is just the move from the popover to the panel.

### To-do

* User-facing UI
  * [x] signed-out state for collab panel
  * [x] new icon for collab panel
  * [x] for now, channels section only appears for zed staff
* [x] current call section styling
(https://zed-industries.slack.com/archives/C05CJUNF2BU/p1691189389988239?thread_ts=1691189120.403009&cid=C05CJUNF2BU)
* [x] Channel members
* Channels
  * [x] style channel name editor
* [x] decide on a special "empty state" for the panel, when user has no
contacts
* [x] ensure channels are sorted in a consistent way (expose channel id
paths to client)
  * [x] Figure out layered panels UX
  * [x] Change add contacts to be the same kind of tabbed modal
* [x] race condition between channel updates and user fetches
(`ChannelStore::handle_update_contacts`)
* [x] race condition between joining channels and channel update
messages `collab::rpc::channel_updated`)
* [x] don't display mic as muted when microphone share is pending upon
first joining call

Release Notes:

- Moved the collaboration dropdown into its own panel.
- Added settings for disabling the AI assistant panel button.
- Switch to lazily initializing audio output sources
(https://github.com/zed-industries/community/issues/1840,
https://github.com/zed-industries/community/issues/1919)
2023-08-16 11:03:53 -07:00
Nate Butler
925e09e012 Update collab panel empty state to match project panel
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2023-08-16 13:56:11 -04:00
Nate Butler
43127384c6 Update modal icon styles
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2023-08-16 13:48:12 -04:00
Conrad Irwin
7f06191c9f Disable autoindent in visual block insert mode 2023-08-16 10:44:59 -06:00
KCaverly
c99b530968 remove kill search, and restart search immediately upon cycle mode
Co-authored-by: Piotr <piotr@zed.dev>
2023-08-16 16:13:21 +01:00
KCaverly
aeda5d9842 fix semantic search panic which is created via incompatible build_search_query path
Co-authored-by: Piotr <piotr@zed.dev>
2023-08-16 15:50:54 +01:00
KCaverly
6e3e61ec95 removed commented out code 2023-08-16 14:01:53 +01:00
KCaverly
2a7df106e1 adjusted icon sizes downwards
Co-authored-by: Piotr <piotr@zed.dev>
2023-08-16 14:01:06 +01:00
KCaverly
6f78a1633d fix editor height in buffer search, but the dancing is back
Co-authored-by: Piotr <piotr@zed.dev>
2023-08-16 13:51:41 +01:00
Nathan Sobo
fea987b459 WIP 2023-08-16 06:22:47 -06:00
Kirill Bulatov
80c779b95e Focus terminal view on mouse click in terminal
Before, terminal view focused the parent (pane) instead and, if
terminal's search bar was open and focused, pane transferred the focus
back
2023-08-16 15:16:20 +03:00
KCaverly
a59535efa1 remove redundant and unneeded styling
Co-authored-by: Piotr <piotr@zed.dev>
2023-08-16 12:55:32 +01:00
KCaverly
d727ba18f2 Merge branch 'main' of github.com:zed-industries/zed into project_search_design 2023-08-16 12:43:04 +01:00
KCaverly
9bf227b884 remove regex keymap, and made spacing consistent between search objects
Co-authored-by: Piotr <piotr@zed.dev>
2023-08-16 12:17:59 +01:00
KCaverly
11ecb7b604 reorganize search bar, enable filters and disable select all during invalid states
Co-authored-by: Piotr <piotr@zed.dev>
2023-08-16 11:35:09 +01:00
Kirill Bulatov
1c4be24fb7 Move gpui derives tests into gpui crate to avoid dependency cycles
`cargo run` on Zed project leads to rust-analyzer evantually emitting

`[ERROR project_model::workspace] cyclic deps:
gpui_macros(Idx::<CrateData>(269)) -> gpui(Idx::<CrateData>(264)),
alternative path: gpui(Idx::<CrateData>(264)) ->
gpui_macros(Idx::<CrateData>(269))`

error after loading the project.

The PR fixes this by moving away the test to the "root" project.
2023-08-16 10:19:20 +03:00
Mikayla
0524abf114
Lazily initialize and destroy the audio handle state on call initiation and end 2023-08-15 23:19:11 -07:00
Nathan Sobo
a8ecc1a643 Add support for a measure function to the layout engine facade 2023-08-15 22:02:56 -06:00
Nathan Sobo
4efc46c763 Add derive macro now new elements 2023-08-15 21:04:48 -06:00
Nathan Sobo
77bc682a69 Render a component 2023-08-15 19:46:07 -06:00
Nathan Sobo
65a5c54a2c Compiling checkpoint 2023-08-15 19:29:57 -06:00
Max Brunsfeld
706227701e Keep collab panel focused after deleting a channel 2023-08-15 16:14:24 -07:00
Mikayla Maki
facb942156
Add component traits to GPUI (#2850)
Release Notes:

- N/A
2023-08-15 15:53:12 -07:00
Mikayla
7d3ffae47d
move component into gpui 2023-08-15 15:44:59 -07:00
Nate Butler
a56747af8c Update assistant status bar icon 2023-08-15 18:36:30 -04:00
Nate Butler
28649fb71d Update channel context menu 2023-08-15 18:36:23 -04:00
Max Brunsfeld
3623a9ca5e Simplify Component implementation
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-08-15 15:26:02 -07:00
KCaverly
32bec2e401 left align buffer search with new structure 2023-08-15 23:18:03 +01:00
Conrad Irwin
1b4dd49b1d Vim visual block mode
This isn't quite an exact emulation, as instead of using one selection
that is magically in "column mode", we emulate it with a bunch of zed
multi-selections (one per line).

I think this is better, as it requires fewer changes to the codebase,
and lets you see the impact of any changes immediately on all lines.

Fixes: zed-industries/community#984
2023-08-15 16:00:50 -06:00
Max Brunsfeld
1ffde7bddc Implement calling contacts into your current channel
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-08-15 14:56:54 -07:00
Kirill Bulatov
2670e2c9ec
Support editor::SelectAll in Terminal (#2848)
![image](https://github.com/zed-industries/zed/assets/2690773/3aae1e6a-9993-4e65-8ed1-20f2f4b452df)

Allows to use `editor::SelectAll`(`cmd-a` by default) in Terminal to
select all text in it, for future copying.
Currently, does not try to be smart and trim the selected whitespaces
after the last prompt, and copies them too.

Release Notes:

- Support `editor::SelectAll` in Terminal
2023-08-15 23:59:26 +03:00
Kirill Bulatov
de69f08c10 Support editor::SelectAll in Terminal 2023-08-15 23:43:32 +03:00
Max Brunsfeld
943aeb8c09 Run until parked when setting editor's state via EditorTestContext
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-08-15 13:42:54 -07:00
Joseph T. Lyons
d6ca0a1f24 Associate extensions with language 2023-08-15 16:33:02 -04:00
Nate Butler
13cf3ada39 Update checked icon 2023-08-15 16:29:01 -04:00
Max Brunsfeld
ddf3642d47 Avoid flicker when moving between channels 2023-08-15 13:18:56 -07:00
Max Brunsfeld
46928fa871 Reword channel-creation tooltips 2023-08-15 13:08:44 -07:00
Nate Butler
9d60e550be Additional status bar styles 2023-08-15 15:32:14 -04:00
Mikayla
d13cedb248
seperate out channel styles in theme 2023-08-15 12:12:30 -07:00
KCaverly
1e8a7c7caa refactor buffer_search to reduce redundancy and simplying height management
Co-authored-by: maxbrunsfeld <max@zed.dev>
2023-08-15 20:04:14 +01:00
Mikayla
d05e8852d3
Add dismiss on escape 2023-08-15 11:02:18 -07:00
Mikayla
d95b036fde
Fix cursor style
co-authored-by: Nate <nate@zed.dev>
2023-08-15 10:58:31 -07:00
Mikayla
e36dfa0946
Add active styling 2023-08-15 10:53:30 -07:00
Mikayla
9e99b74fce
Add the channel name into the current call 2023-08-15 10:45:36 -07:00
Max Brunsfeld
fafc10d57c Merge branch 'main' into collab-panel 2023-08-15 09:09:50 -07:00
Conrad Irwin
1cc0798aea Add a VisualBlock mode
Instead of trying to extend the Mode::Visual special case, just split
out into three different modes.
2023-08-15 10:00:45 -06:00
Nathan Sobo
e7489bd4c9 Compiling checkpoint 2023-08-15 09:33:59 -06:00
Nathan Sobo
0fe457020b WIP 2023-08-15 09:26:16 -06:00
Conrad Irwin
404b1aa65a
Fix vim selection to include entire range (#2787)
Update vim mode to have vim selection and editor selections match.
Before this we had to adjust between vim selections and real selections
when making changes; now we have to adjust when making selections.

Release Notes:

- vim: Ensure editor selection matches the vim selection
([#1796](https://github.com/zed-industries/community/issues/1796)).
- vim: Fix `s` in visual line mode
- vim: Add `o` and `shift-o` to toggle direction of visual selection
- vim: Fix `v` and `shift-v` to toggle back to normal mode
- vim: Fix block selections like `vi}` to contain correct whitespace
2023-08-15 08:36:17 -06:00
Conrad Irwin
1e3f468fc7
Fix vim escape in normal mode (#2844)
Fixes: zed-industries/community#1857

- vim: Fix escape in normal mode
([#1857](https://github.com/zed-industries/community/issues/1857)).
2023-08-15 08:35:49 -06:00
Mikayla
111e17b220
Merge branch 'main' into collab-panel 2023-08-15 03:25:45 -07:00
Mikayla Maki
22da42fc69
Add components example (#2846)
This PR is a continuation of the components UI exploration I've been
doing. It adds an example to the GPUI examples page and totally
restructures the generics on our MouseEventHandler.

Release Note:
- N/A
2023-08-15 03:17:50 -07:00
Mikayla
e5eed29c72
Add components example
Re-arrange generics on mouse event handler
Add TypeTag struct for dynamically tagged components
2023-08-15 03:06:43 -07:00
Max Brunsfeld
cbf497bc12 Fix race condition when UpdateChannel message is received while fetching participants for previous update
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-08-14 17:36:35 -07:00
Max Brunsfeld
71454ba27c Limit number of participants shown in channel face piles
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-08-14 17:11:03 -07:00
Max Brunsfeld
13982fe2f4 Display intended mute status while still connecting to a room
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-08-14 16:47:26 -07:00
Max Brunsfeld
5af8ee71aa Fix clicking outside of modals to dismiss them
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-08-14 16:38:21 -07:00
Max Brunsfeld
d7f21a9155 Ensure channels are sorted alphabetically
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-08-14 16:27:35 -07:00
Conrad Irwin
1af7425059 Fix vim escape in normal mode
Fixes: zed-industries/community#1857
2023-08-14 16:05:41 -06:00
Conrad Irwin
fb90eada70 Merge branch 'main' into vim-visual-selection 2023-08-14 15:29:33 -06:00
Nate Butler
ef73e77d3d Update some status bar icons and states 2023-08-14 17:15:25 -04:00
Conrad Irwin
5b37cdcb04 Better tests 2023-08-14 15:03:16 -06:00
Nathan Sobo
f9858445b8 Get a 50% colored box rendering
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2023-08-14 14:46:09 -06:00
Kirill Bulatov
64c2043913
Query less inlay hints (#2842)
Part of
https://linear.app/zed-industries/issue/Z-2750/investigate-performance-of-collaborating-on-large-files-with-inlay

Instead of querying the entire file for hints, query visible editor(s)
range + the areas above and below, of the same height.
Non-invalidating future queries (e.g. scrolling) query only missing
parts of the ranges.

Release Notes:

- Improved LSP resource usage by querying less hints for big files
2023-08-14 23:06:30 +03:00
Nate Butler
f2d46e0ff9 Use new icons in channel panel 2023-08-14 15:57:31 -04:00
Kirill Bulatov
27bf01c3a8 Strip off inlay hints data that should be resolved 2023-08-14 22:50:55 +03:00
Nathan Sobo
740b105330 Merge branch 'main' into taffy
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2023-08-14 13:50:21 -06:00
Max Brunsfeld
3b10ae9310 Add icon before the empty contacts text
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-08-14 11:57:19 -07:00
Max Brunsfeld
2bb9f7929d Structure the contact finder more similarly to the channel modal
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-08-14 11:37:05 -07:00
Mikayla
b07555b6df
Make empty state interactive 2023-08-14 10:34:00 -07:00
Mikayla
fde9653ad8
Add placeholder implementation 2023-08-14 10:24:00 -07:00
Kirill Bulatov
e0d011e354 Better assert multibuffer edit test results 2023-08-14 20:12:35 +03:00
Kirill Bulatov
4b3273182a Do not filter out hints to be removed 2023-08-14 19:20:20 +03:00
Kirill Bulatov
336fbb3392 Clip offsets in inlay hint queries 2023-08-14 18:39:30 +03:00
Nathan Sobo
7756497933 Simplify adapter 2023-08-14 09:26:35 -06:00
Piotr Osiewicz
db36a5fe2d Refactor buffer search UI rendering in a quest to find the meaning of life.
Co-authored-by: Kyle <kyle@zed.dev>
2023-08-14 15:27:57 +02:00
Kirill Bulatov
558367dc8b Optimize query ranges tracking 2023-08-14 16:19:44 +03:00
Piotr Osiewicz
ff4370f88e buffer: Extract columns to separate objects.
Co-authored-by: Kyle <kyle@zed.dev>
2023-08-14 15:14:57 +02:00
Piotr Osiewicz
4aa5df4cda Extract columns into separate objects.
Co-authored-by: Kyle <kyle@zed.dev>
2023-08-14 15:13:17 +02:00
Kirill Bulatov
87e6651ecb Fix hint tests, add a char boundary bug test 2023-08-14 16:01:02 +03:00