Commit Graph

9050 Commits

Author SHA1 Message Date
Conrad Irwin
2cb320e246 Escape returns to normal mode even if completion is open
For zed-industries/community#1746
2023-09-27 21:28:30 -06:00
Conrad Irwin
dd1cf5c3cf vim: add ctrl-a/ctrl-x
For zed-industries/community#1411
For zed-industries/community#619
2023-09-27 19:49:31 -06:00
Antonio Scandurra
0e6002dca2 Fix tests 2023-09-27 18:19:35 -06:00
Antonio Scandurra
78908bc5cb Introduce a new include_warnings setting under diagnostics 2023-09-27 18:08:08 -06:00
Antonio Scandurra
f603d682cd Add an include/exclude warnings toggle in project diagnostics 2023-09-27 17:47:19 -06:00
Conrad Irwin
6cebcac805 fix tests 2023-09-27 17:02:47 -06:00
Conrad Irwin
3573896fe0 Don't prompt to save unchanged files 2023-09-27 16:07:35 -06:00
Conrad Irwin
25429f760c ctrl-a/x for vim 2023-09-27 12:32:01 -06:00
Joseph T. Lyons
ece4875973 v0.107.x dev 2023-09-27 12:26:48 -04:00
Kyle Caverly
b3b3a56164
Revert "leverage file outline and selection as opposed to entire file" 2023-09-27 12:21:03 -04:00
Kyle Caverly
cab80cbe9d
Revert "removed stale dbg in assistant from main" 2023-09-27 12:19:44 -04:00
Piotr Osiewicz
6ccaf55e54
search: Reorder items in search bar (#3039)
Release Notes:

- Reordered items in project and buffer search bar
2023-09-27 16:51:20 +02:00
Kyle Caverly
edf29aa67d
implement new search strategy (#3029)
Augment current search strategy in semantic search, reducing search
times by ~60%

Release Notes:

- Implemented minimum batch sizes for concurrent database reads.
- Batch embedding matrix multiplication.
- Calculate matmul with ndarray
2023-09-27 10:37:48 -04:00
KCaverly
0e6fd645fd leverage embeddings len returned in construction matrix multiplication 2023-09-27 10:33:04 -04:00
Conrad Irwin
c63cc78ffd
vim: Fix ctrl-u/ctrl-d (#3044)
- vim: Fix ctrl-d/ctrl-u to match vim (when :set scrolloff=3)
2023-09-27 07:48:50 -06:00
KCaverly
3682751455 Merge branch 'main' of github.com:zed-industries/zed into faster_semantic_search 2023-09-27 09:43:39 -04:00
KCaverly
abefa2738b removed blas and increase batch size for vector search 2023-09-27 09:43:23 -04:00
KCaverly
0d6880adb3 removed stale dbg in assistant from main 2023-09-27 09:13:00 -04:00
Kyle Caverly
2f368de397
leverage file outline and selection as opposed to entire file (#3040)
Transition generate prompt for inline assist to leverage outline as
opposed to full file.
This enables, us to leverage the inline assist for large files.

Release Notes:

- Change inline assist to use tree-sitter based outlines for code
generation instead of full files
2023-09-27 09:10:18 -04:00
KCaverly
650a160f04 update test outline for prompt tests for new cursor span 2023-09-27 09:06:53 -04:00
Piotr Osiewicz
ecb037fc0e
language: Add block_comment to CSS (#3045)
Fixes zed-industries/community#2081

Release Notes:
- Fixed "toggle comment" action not working in CSS buffers.
2023-09-27 11:56:26 +02:00
Conrad Irwin
8e1bbf32be vim: Fix ctrl-u/ctrl-d
They should work by exactly half a screen, and also move the cursor.
2023-09-26 22:28:04 -06:00
Conrad Irwin
30bb3a109e
Add SwapPaneInDirection (#3043)
- Add cmd-k shift-{left,right,up,down} to swap panes in that direction
- vim: Add ctrl-w shift-{h,j,k,l} to swap panes in that direction
([#278](https://github.com/zed-industries/community/issues/278))
2023-09-26 22:18:02 -06:00
Conrad Irwin
37b6e1cbb7 Add SwapPaneInDirection
Add keybindings for vim (and non-vim)
2023-09-26 22:00:51 -06:00
Kirill Bulatov
cb83b49432
Hide inlay hints toggle if they are not supported by the current editor (#3041)
Release Notes:

- N/A
2023-09-27 01:16:02 +03:00
Marshall Bowers
568fec0f54
Add Sized bound to StyleHelpers (#3042)
This PR adds a `Sized` bound to the `StyleHelpers` trait.

All of the individual methods on this trait already had a `Self: Sized`
bound, so moving it up to the trait level will make it so we don't have
to repeat ourselves so much.

There's an open question of whether we can hoist the `Sized` bound to
`Styleable`, but it's possible there are cases where we'd want to have a
`Styleable` trait object.

Release Notes:

- N/A
2023-09-26 18:15:41 -04:00
Kirill Bulatov
7e2cef98a7 Hide inlay hints toggle if they are not supported by the current editor 2023-09-26 23:52:11 +02:00
KCaverly
90f17d4a28 updated codegen match to leverage unused values 2023-09-26 17:11:20 -04:00
KCaverly
e8dd412ac1 update inline generate prompt to leverage more explicit <|START| and |END|> spans 2023-09-26 17:10:31 -04:00
KCaverly
54c63063e4 changed inline assist generate prompt to leverage outline as opposed to entire prior file
Co-Authored-by: Antonio <antonio@zed.dev>
2023-09-26 16:23:48 -04:00
Joseph T. Lyons
0897ed561f Rework call events api
There were time when events with bad data were being emitted. What we found was that places where certain collaboration-related code could fail, like sending an, would still send events, and those events be in a bad state, as certain elements weren't constructed as expected, thus missing in the event. The new API guarantees that we have data in the correct configuration. In the future, we will add events for certain types of failures within Zed.

Co-Authored-By: Julia <30666851+ForLoveOfCats@users.noreply.github.com>
2023-09-26 14:18:32 -04:00
Piotr Osiewicz
e263805847
workspace: change save prompt for unnamed buffers (#3037)
Release Notes:
- N/A
2023-09-26 19:35:10 +02:00
Piotr Osiewicz
8c47f117db
editor: Start transaction in replace impl (#3036)
This fixes the undo with replace in project
/cc @maxbrunsfeld 

Release Notes:

- N/A
2023-09-26 19:21:15 +02:00
Piotr Osiewicz
36f022bb58
project_replace: Fix up key bindings (#3034)
Release Notes:
- N/A
2023-09-26 18:40:41 +02:00
KCaverly
e75f56a0f2 move to system blas 2023-09-26 12:39:22 -04:00
Marshall Bowers
342a00b89e
Remove dbg! from styleable_helpers! (#3035)
This PR removes a leftover `dbg!` from `styleable_helpers!`.

We already removed this in the `gpui2-ui` branch, but getting this on
`main` since @KCaverly pointed it out.

Release Notes:

- N/A
2023-09-26 10:49:55 -04:00
KCaverly
330a71d28b fixed bug limiting number of results returned 2023-09-26 10:29:55 -04:00
KCaverly
ea278b5b12 ensure desc sort and cleanup unused imports 2023-09-26 09:53:49 -04:00
Kirill Bulatov
b131a2cb98 Fix another place where Copilot may panic 2023-09-26 10:51:13 +03:00
Conrad Irwin
42df5ef45e
vim: Add multicursor shortcuts (#3032)
Adding a few bindings to bring first class feeling multiselect to zed's
vim emulation.

gn and gN are similar to similar vim bindings, ga is similar to gA (and
I doubt we need vim's real ga), g> and g< are just made up.

Release Notes:

- vim: `g n` / `g N` to select next/previous
- vim: `g >` / `g <` to skip current selection and select next/previous
- vim: `g a` to select all
2023-09-25 17:18:12 -05:00
Conrad Irwin
b29e295e1b vim: Add multicursor shortcuts
- g n / g N to select next/previous
- g > / g < to select next/previous replacing current
- g a to select all matches
2023-09-25 15:32:03 -06:00
Mikayla Maki
8c90157990
Fix space and copy/paste when editing a channel (#3030)
This fixes several bugs with how spaces and keyboard commands interact
with channel creating / renaming.

fixes
https://github.com/zed-industries/community/discussions/2076#discussioncomment-7096959

Release Notes:

- N/A
2023-09-25 15:20:00 -05:00
Conrad Irwin
d17d38fe70
vim: Command (#2951)
Release Notes:

- vim: Add v1 of command mode
([#279](https://github.com/zed-industries/community/issues/279)). The
goal was to cover 90% of what most people actually do, but it is very
incomplete. Known omissions are that ranges cannot be specified (except
that `:%s//` must always specify the % range), commands cannot take
arguments (you can `:w` but not `:w [file]`), and there is no history.
Please file feature requests on
https://github.com/zed-industries/community as you notice things that
could be better.
- `:` triggers zed's command palette. If you type a known vim command it
will run it, otherwise you get zed's normal fuzzy search. For this
release supported commands are limited to:
- - `:w[rite][!]`, `:wq[!]`, `:q[uit][!]`, `:wa[ll][!]`, `:wqa[ll][!]`,
`:qa[ll][!]`, `:[e]x[it][!]`, `:up[date]` to save/close tab(s) and
pane(s).
- - `:cq` to quit completely.
- - `:vs[plit]`, `:sp[lit]` to split vertically/horizontally
- - `:new`, `:vne[w]` to create a new file in a new pane above or to the
left
- - `:tabedit`, `:tabnew` to create a new file in a new tab.
- - `:tabn[ext]`, `:tabp[rev]` to go to previous/next tabs
- - `:tabc[lose]` to close tabs
- - `:cn[ext]`, `:cp[rev]`, `:ln[ext]`, `:lp[rev]` to go to the
next/prev diagnostics.
- - `:cc`, `:ll` to open the errors page
- - `:<number>` to jump to a line number.
- - `:$` to jump to end of file
- - `:%s/foo/bar/` (note that /g is always implied, the range must
always be %, and zed uses different regex syntax to vim)
- - `:/foo` and `:?foo` to jump to next/prev line matching foo
- - `:j[oin]`, to join the current line (no range is yet supported)
- - `:d[elete][l][p]`, to delete the current line (no range is yet
supported)
- - `:s[ort] [i]` to sort the current selection (case-insensitively)
- vim: Add `ctrl-w o` (closes everything except the current item) and
`ctrl-w n` (creates a new file in the pane above).
([#1884](https://github.com/zed-industries/community/issues/1884))
- all: Add a "Discard" option to prompt when saving a file with
conflicts (previously this only appeared on close, not on save).

Internal changes:
- The Picker will now wait for pending queries before confirming (to
handle people typing `: w enter` rapidly.
- workspace::save_item and Pane::save_item are now merged together, and
the behavior controlled by `workspace::SaveIntent`.
- Many actions related to closing/saving items now take an optional
`SaveIntent`.
-
2023-09-25 14:07:22 -05:00
Mikayla
667fc25766
Fix space and copy/paste when editing a channel 2023-09-25 11:31:02 -07:00
Conrad Irwin
359847d047 Revert "Revert "workspace: Improve save prompt. (#3025)""
This reverts commit 5c75450a77.
2023-09-25 12:18:03 -06:00
Mikayla Maki
591ec02cea
Add support for the experimental Next LS for Elixir (#3024)
This is a PR I built for a friend of a friend at StrangeLoop, who is
making a much better LSP for elixir that elixir folks want to experiment
with. This PR also improves the our debug log viewer to handle LSP
restarts.

TODO:
- [ ] Make sure NextLS binary loading works.

Release Notes:

- Added support for the experimental Next LS for Elxir, to enable it add
the following field to your settings to enable:

```json
"elixir": {
    "next": "on"
}
```
2023-09-25 12:52:56 -05:00
Mikayla
c2fca054ae
Fix compile and test errors 2023-09-25 10:46:09 -07:00
KCaverly
86ec0b1d9f implement new search strategy 2023-09-25 13:44:19 -04:00
Conrad Irwin
769c330b3d Merge branch 'vim-command' 2023-09-25 11:41:13 -06:00
Conrad Irwin
5c75450a77 Revert "workspace: Improve save prompt. (#3025)"
This reverts commit 0a491e773b.
2023-09-25 11:41:09 -06:00
Mikayla
ad7c1f3c81
Download next-ls automatically from github 2023-09-25 10:40:20 -07:00
Julia
80eaabd360 Activate correct item when clicking on a code action with the mouse 2023-09-25 13:31:00 -04:00
Julia
a278428bd5 Trigger scroll_to on code action list when moving selection 2023-09-25 11:13:50 -04:00
Piotr Osiewicz
0a491e773b
workspace: Improve save prompt. (#3025)
Add buffer path to the prompt.

Z-2903

Release Notes:
- Added a "Save all/Discard all" prompt when closing a pane with
multiple edited buffers.
2023-09-25 16:15:29 +02:00
Mikayla
8b63e45f0b
Implement LSP adapter methods for syntax highlighting 2023-09-24 05:08:05 -07:00
Mikayla
052cb459a6
Improve lsp log viewer's behavior in the presence of LSP restarts
Improve settings interface to local LSP
2023-09-24 04:59:55 -07:00
Marshall Bowers
0697d08e54
Restructure ui into just elements and components (#3023)
This PR restructures the `ui` crate into just `elements` and
`components`.

This was already done on the `gpui2-ui` branch, just getting it onto
`main`.

Release Notes:

- N/A

---------

Co-authored-by: Nate Butler <nate@zed.dev>
2023-09-22 21:27:47 -04:00
Marshall Bowers
895386cfaf
Mainline Icon and IconButton changes (#3022)
This PR mainlines the `Icon` and `IconButton` changes from the
`gpui2-ui` branch.

Release Notes:

- N/A

Co-authored-by: Nate Butler <nate@zed.dev>
2023-09-22 19:14:12 -04:00
Marshall Bowers
ad62a966a6
Display available stories in storybook CLI (#3021)
This PR updates the storybook CLI to support displaying all of the
available stories.

The `--help` flag will now show a list of all the available stories:

<img width="1435" alt="Screenshot 2023-09-22 at 6 11 00 PM"
src="https://github.com/zed-industries/zed/assets/1486634/284e1a24-46ec-462e-9709-0f9b6e94931f">

Inputting an invalid story name will also show the list of available
stories:

<img width="1435" alt="Screenshot 2023-09-22 at 6 10 43 PM"
src="https://github.com/zed-industries/zed/assets/1486634/1ce3ae3f-ab03-4976-a06a-5a2b5f61eae3">

Release Notes:

- N/A
2023-09-22 18:16:16 -04:00
Marshall Bowers
fe4248cf34
Scaffold Toolbar and Breadcrumb components (#3020)
This PR scaffolds the `Toolbar` and `Breadcrumb` components.

Right now they both just consist of hardcoded data.

<img width="846" alt="Screenshot 2023-09-22 at 4 54 00 PM"
src="https://github.com/zed-industries/zed/assets/1486634/70578df2-7216-42d2-97ef-d38b83fb4a25">

<img width="799" alt="Screenshot 2023-09-22 at 4 46 04 PM"
src="https://github.com/zed-industries/zed/assets/1486634/73ca3d8a-baf9-4ed4-b4c4-279c674672a3">

Release Notes:

- N/A
2023-09-22 16:57:33 -04:00
Marshall Bowers
27e3e09bb9
Label component states in stories (#3019)
This PR updates the UI component stories to label the various states
that they are in.

Release Notes:

- N/A
2023-09-22 15:48:32 -04:00
Marshall Bowers
d0b15ed940
Report which requested font families are not present on the system (#3006)
This PR improves the error message when `FontCache.load_family` attempts
to load a font that is not present on the system.

I ran into this while trying to run the `storybook` for the first time.
The error message indicated that a font family was not found, but did
not provide any information as to which font family was being loaded.

### Before

```
   Compiling storybook v0.1.0 (/Users/maxdeviant/projects/zed/crates/storybook)
    Finished dev [unoptimized + debuginfo] target(s) in 8.52s
     Running `/Users/maxdeviant/projects/zed/target/debug/storybook`
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: could not find a non-empty font family matching one of the given names', crates/theme/src/theme_settings.rs:132:18
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
libc++abi: terminating due to uncaught foreign exception
fish: Job 1, 'cargo run' terminated by signal SIGABRT (Abort)
```

### After

```
   Compiling storybook v0.1.0 (/Users/maxdeviant/projects/zed/crates/storybook)
    Finished dev [unoptimized + debuginfo] target(s) in 7.90s
     Running `/Users/maxdeviant/projects/zed/target/debug/storybook`
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: could not find a non-empty font family matching one of the given names: `Zed Mono`', crates/theme/src/theme_settings.rs:132:18
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
libc++abi: terminating due to uncaught foreign exception
fish: Job 1, 'cargo run' terminated by signal SIGABRT (Abort)
```

Release Notes:

- N/A
2023-09-22 15:27:42 -04:00
Marshall Bowers
8b6e982495
Remove manual mapping in FromStr implementation for StorySelector (#3018)
This PR removes the need for writing manual mappings in the `FromStr`
implementation for the `StorySelector` enum used in the storybook CLI.

We are now using the
[`EnumString`](https://docs.rs/strum/0.25.0/strum/derive.EnumString.html)
trait from `strum` to automatically derive snake_cased names for the
enums.

This will cut down on some of the manual work needed to wire up more
stories to the storybook.

Release Notes:

- N/A
2023-09-22 14:06:09 -04:00
Marshall Bowers
71c1e36d1e
Put Theme behind an Arc (#3017)
This PR puts the `Theme` returned from the `theme` function behind an
`Arc`.

### Motivation

While working on wiring up window focus events for the `TitleBar`
component we ran into issues where `theme` was holding an immutable
borrow to the `ViewContext` for the entirety of the `render` scope,
which prevented having mutable borrows in the same scope.

### Explanation

To avoid this, we can make `theme` return an `Arc<Theme>` to allow for
cheap clones and avoiding the issues with the borrow checker.

Release Notes:

- N/A

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2023-09-22 13:35:30 -04:00
Marshall Bowers
d8c6adf338
Factor story boilerplate out into separate components (#3016)
This PR factors out the bulk of the boilerplate required to setup a
story in the storybook out into separate components.

The pattern we're using here is adapted from the "[associated
component](https://maxdeviant.com/posts/2021/react-associated-components/)"
pattern in React.

Release Notes:

- N/A
2023-09-22 11:38:01 -04:00
Kirill Bulatov
afa7045847 Tone down inlay hint update logs 2023-09-22 17:04:11 +03:00
KCaverly
fbd6b5b434 cargo fmt 2023-09-22 09:46:06 -04:00
KCaverly
dc49dec4f0 catchup with main 2023-09-22 09:43:39 -04:00
KCaverly
68c37ca2a4 move embedding provider to ai crate 2023-09-22 09:33:59 -04:00
Kirill Bulatov
d61565d227 Do not resubscribe for Copilot logs events
Copilot sends multiple events about its LSP server readiness, not necessarily recreating the server from scratch (e.g. due to re-sign in action).
Avoid re-adding same log subscriptions on the same LSP server, which
causes panics.
2023-09-22 13:40:20 +03:00
Nate Butler
d14e4d41ea Merge branch 'main' into nate/bring-ui-crate-up-to-date 2023-09-21 23:47:17 -04:00
Nate Butler
f54634aeb2 Bring UI crate up to date 2023-09-21 23:46:06 -04:00
Marshall Bowers
5083ab7694
Add TrafficLights component (#3011)
This PR adds a `TrafficLights` component for GPUI2.

<img width="861" alt="Screenshot 2023-09-21 at 11 32 10 PM"
src="https://github.com/zed-industries/zed/assets/1486634/0fe0e847-49b3-44dc-bd4c-64f12f0051c1">

Release Notes:

- N/A
2023-09-21 23:42:18 -04:00
KCaverly
48e151495f introduce ai crate with completion providers 2023-09-21 22:44:56 -04:00
Marshall Bowers
66358f2900
Update storybook to support stories for individual components (#3010)
This PR updates the `storybook` with support for adding stories for
individual components.

### Motivation

Right now we just have one story in the storybook that renders an entire
`WorkspaceElement`.

While iterating on the various UI components, it will be helpful to be
able to create stories of those components just by themselves.

This is especially true for components that have a number of different
states, as we can render the components in all of the various states in
a single layout.

### Explanation

We achieve this by adding a simple CLI to the storybook.

The `storybook` binary now accepts an optional `[STORY]` parameter that
can be used to indicate which story should be loaded. If this parameter
is not provided, it will load the workspace story as it currently does.

Passing a story name will load the corresponding story, if it exists.

For example:

```
cargo run -- elements/avatar
```

<img width="723" alt="Screenshot 2023-09-21 at 10 29 52 PM"
src="https://github.com/zed-industries/zed/assets/1486634/5df489ed-8607-4024-9c19-c5f4541f97c9">

```
cargo run -- components/facepile
```

<img width="785" alt="Screenshot 2023-09-21 at 10 30 07 PM"
src="https://github.com/zed-industries/zed/assets/1486634/e04a4577-7403-405d-b23c-e765b7a06229">



Release Notes:

- N/A
2023-09-21 22:41:53 -04:00
KCaverly
5f6334696a rename ai crate to assistant crate 2023-09-21 21:54:59 -04:00
Mikayla
02a85b1252
Add local next LSP adapter 2023-09-21 18:09:02 -07:00
Nate Butler
8440ac3a54 Fix fmt complaining about order 2023-09-21 20:25:25 -04:00
Nate Butler
1e6ac8caf2 theme::* -> crate::theme::*; 2023-09-21 20:21:56 -04:00
Max Brunsfeld
7711530704 Simplify titlebar facepile click rendering / mouse handling 2023-09-21 17:12:59 -07:00
Max Brunsfeld
4ffa167256 Allow following into channel notes regardless of project 2023-09-21 17:12:59 -07:00
Marshall Bowers
baa07e935e
Extract UI elements from storybook into new ui crate (#3008)
This PR extracts the various UI elements from the `storybook` crate into
a new `ui` library crate.

Release Notes:

- N/A
2023-09-21 19:25:35 -04:00
Marshall Bowers
c252eae32e
Reorganize ui module exports (#3007)
This PR reorganizes the exports for the `ui` module in the `storybook`
crate.

### Motivation

Currently we expose each of the various elements/components/modules in
two places:

- Through the module itself (e.g., `ui::element::Avatar`)
- Through the `ui` module's re-exports (e.g., `ui::Avatar`)

This means it's possible to import any given item from two spots, which
can lead to inconsistencies in the consumers. Additionally, it also
means we're shipping the exact module structure underneath `ui` as part
of the public API.

### Explanation

To avoid this, we can avoid exposing each of the individual modules
underneath `ui::{element, component, module}` and instead export just
the module contents themselves.

This makes the `ui` module namespace flat.

Release Notes:

- N/A
2023-09-21 17:46:37 -04:00
Max Brunsfeld
ed8b022b51 Add initial failing test for following to channel notes in an unshared project 2023-09-21 13:14:15 -07:00
Max Brunsfeld
f34c6bd1ce Start work on allowing following without a shared project 2023-09-21 13:14:15 -07:00
Max Brunsfeld
c71566e7f5 Make project id optional when following - server only 2023-09-21 13:14:15 -07:00
Kyle Caverly
3c2b05be90
add semantic index status, for non authenticated users (#3005)
Update project search semantic ui to accommodate for users who have not
set the OPENAI_API_KEY in their environment variables.

Release Notes:

- Expand Semantic Index status to include status for non authenticated
users
- Update Search UI to illustrate this status.
2023-09-21 14:18:58 -04:00
KCaverly
7b63369df2 move api authentication to embedding provider 2023-09-21 14:00:00 -04:00
KCaverly
997f362cc2 add semantic index status, for non authenticated users 2023-09-21 13:40:01 -04:00
Max Brunsfeld
19a9753663
Fix channel move cancel (#3004)
Release Notes:

- Fixes a bug where channels could no longer be rearranged with drag and
drop.
2023-09-21 09:11:09 -07:00
Mikayla
66dd0e9ec0
Switch drag end event to be fired after mouse up 2023-09-21 08:58:36 -07:00
Piotr Osiewicz
dbfa1d7263
[WIP] Replace in project (#2984)
Targeting Preview of 09.27.
This is still pending several touchups/clearups:
- We should watch multibuffer for changes and rescan the excerpts. This
should also update match count.
- Closing editor while multibuffer with 100's of changed files is open
leads to us prompting for save once per each file in the multibuffer.
One could in theory save in multibuffer before closing it (thus avoiding
unnecessary prompts), but it'd be cool to be able to "Save all"/"Discard
All".

Release Notes:

- Added "Replace in project" functionality
2023-09-21 16:27:58 +02:00
Kirill Bulatov
1c53b0a1c0 Properly re-add Copilot LSP server 2023-09-21 11:02:03 +03:00
Kirill Bulatov
a2ac5ae478 Fix RPC logs not being displayed for supplementary servers 2023-09-21 11:00:05 +03:00
Kirill Bulatov
ead7155b0f Make LSP panel scrollable
co-authored-by: Max <max@zed.dev>
2023-09-21 10:59:19 +03:00
Conrad Irwin
32f8733313 Code review changes 2023-09-20 21:29:45 -06:00
Conrad Irwin
7a7ff4bb96 Fix save related tests, and refactor saves again 2023-09-20 20:44:42 -06:00
Conrad Irwin
a59da3634b Fix backward search from command 2023-09-20 20:44:42 -06:00
Conrad Irwin
a25fcfdfa7 Iron out some edge-cases 2023-09-20 20:44:42 -06:00
Conrad Irwin
2d9db0fed1 Flesh out v1.0 of vim : 2023-09-20 20:44:41 -06:00
Conrad Irwin
6ad1f19a21 Add NewFileInDirection 2023-09-20 20:44:26 -06:00
Conrad Irwin
88a32ae48d Merge Workspace::save_item into Pane::save_item
These methods were slightly different which caused (for example) there
to be no "Discard" option in the conflict case at the workspace level.

To make this work, a new SaveBehavior (::PromptForNewPath) was added to
support SaveAs.
2023-09-20 20:44:26 -06:00
Conrad Irwin
a4f96e6452 tests: wait deterministically after simulating_keystrokes 2023-09-20 20:44:26 -06:00
Conrad Irwin
e27b7d7812 Ensure the picker waits for pending updates
Particularly in development builds (and in tests), when typing in the
command palette, I tend to hit enter before the suggestions have
settled.
2023-09-20 20:44:26 -06:00
Conrad Irwin
ba5d84f7e8 Fix vim tests on my machine
In a rare case of "it broke on my machine" I haven't been able to run
the vim tests locally for a few days; turns out I ran out of swap file
names...
2023-09-20 20:44:26 -06:00
Conrad Irwin
ea3a1745f5 Add vim-specific interactions to command
This mostly adds the commonly requested set (:wq and friends) and
a few that I use frequently
:<line> to go to a line number
:vsp / :sp to create a split
:cn / :cp to go to diagnostics
2023-09-20 20:44:26 -06:00
Max Brunsfeld
d42093e069 collab 0.22.1 2023-09-20 17:39:21 -07:00
Mikayla
fe10875285
Fix panic on select all when query is empty 2023-09-20 17:10:23 -07:00
Mikayla Maki
e0fe97401d
Fix bugs from channel moving (#3000)
This PR fixes several bugs related to channel moving and it's
unintuitive behavior when attempting to re-order channels

Release Notes:

- N/A
2023-09-20 17:01:14 -07:00
Mikayla
f2f507e619
Fix bug in channel rendering
Fix drag and drop stale state bug revealed by the channel panel

co-authored-by: Max <max@zed.dev>
2023-09-20 16:40:29 -07:00
Conrad Irwin
f4d4a2f41b
vim fixes for find&replace (#2995)
* allow replacing with the empty string to delete
* fix <enter> for ReplaceNext (in vim mode)

Release Notes:

- allow replacement to be empty
2023-09-20 16:42:39 -06:00
Mikayla
4ff44dfa3b
Fix bugs in moving channels that could cause channels to be stranded or moved unexpectedly
Made channel linking not query in a loop

co-authored-by: Max <max@zed.dev>
2023-09-20 15:32:06 -07:00
Max Brunsfeld
3633f091c5 Fix opening channel notes from context menu 2023-09-20 13:45:35 -07:00
Conrad Irwin
841b4d648c
Fix vim panic when over-shooting with j (#2997)
Release Notes:

- vim: fix a panic when using `j` to go beyond end of file
2023-09-20 12:17:07 -06:00
Conrad Irwin
01b2db4845 Fix vim test recording 2023-09-20 12:01:04 -06:00
Joseph T. Lyons
e7d73b833b collab 0.22.0 2023-09-20 13:59:36 -04:00
Nate Butler
f7696114bb
Add an initial set of GPUI2 components to the storybook (#2990)
This PR adds an initial set of components to `crates/storybook/src/ui`.

All changes still are contained to inside storybook. Merging to keep up
to date with main.
2023-09-20 13:52:47 -04:00
Conrad Irwin
8de67fd9d9 Fix vim panic when over-shooting with j 2023-09-20 11:20:35 -06:00
Nate Butler
be6690bf0b Update tracker.md 2023-09-20 13:08:20 -04:00
Joseph T. Lyons
a86dc942d6 v0.106.x dev 2023-09-20 13:02:13 -04:00
Nate Butler
6dcb0bafb0 WIP Project Tracker 2023-09-20 12:53:08 -04:00
Kyle Caverly
5fe8aa064f
Keyboard navigation and setting persistence for project search (#2996)
Enable keyboard shortcuts for Project Search modes, and ensure project
search settings are persisted search to search.

Release Notes:

- Added alt-cmd-s to Toggle Semantic Search Mode
- Added alt-cmd-g to Toggle Regex Search Mode
- Added alt-cmd-x to Toggle Text Search Mode
- Defaulted new project searches to using last used search mode and
settings.
2023-09-20 12:44:30 -04:00
KCaverly
37a0c6615f remove conditional action registration for activate semantic search mode 2023-09-20 12:38:29 -04:00
Mikayla
fdf5278bbf
Only autoscroll on select_next operations 2023-09-20 09:31:12 -07:00
KCaverly
22d095bd35 enable project search states to persist between workspace project searches 2023-09-20 12:12:01 -04:00
Mikayla
8cc7a02390
Fix rebase 2023-09-20 08:34:18 -07:00
Mikayla
03d4191685
Fix infinite loop in select all matches 2023-09-20 08:25:21 -07:00
Mikayla
c074bfd441
Add select all command to the editor, equivalent to hitting cmd-d as many times as possible 2023-09-20 08:25:20 -07:00
KCaverly
28ed406d54 add keymaps for activating text, regex and semantic modes 2023-09-20 10:04:43 -04:00
Mikayla
0cceb3fdf1
Get nextLS running 2023-09-20 06:55:24 -07:00
KCaverly
912e6e8091 create initial action for Semantic search mode 2023-09-20 09:48:27 -04:00
Kirill Bulatov
a366ad02ce
Add a way to display unrelated to language support language servers' logs (#2991)
Copilot is being used in every buffer, but we do not see its logs that
easily.
In the future, prettier wrapper will pretend to be an LSP server, it is
better to log its messages somewhere, so prepare an infrastructure for
that.

<img width="1727" alt="image"
src="https://github.com/zed-industries/zed/assets/2690773/d31a257c-9608-46fa-8be1-f0a2a2bdbdb7">

Copilot seem to have no rpc messages logged for some reason now,
prettier wrapper might be a better case to investigate this, so leaving
as is.

Release Notes:

- N/A
2023-09-20 12:14:31 +03:00
Kirill Bulatov
6ebe49ec59 Show Copilot logs right after its LSP server start 2023-09-20 12:08:32 +03:00
Kirill Bulatov
82010b68c1 Avoid extra LSP log events 2023-09-20 11:27:52 +03:00
Conrad Irwin
4331cb8058
Initialize workspace properly in tests (#2994)
For vim command I'd like to be able to test that e.g. workspace::Save
works.
2023-09-19 21:02:38 -06:00
Conrad Irwin
1295e5b41f
vim: Use explicit global, not default (#2987)
This should have no user-visible impact, but tidies up one of the
awkwardnesses
of how vim uses global state at the moment.

Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2023-09-19 20:52:25 -06:00
Conrad Irwin
5bb8ba5028 Initialize workspace properly in tests
For vim command I'd like to be able to test that e.g. workspace::Save
works.
2023-09-19 20:49:29 -06:00
Conrad Irwin
2da664ed17 vim fixes for find&replace
* allow replacing with the empty string to delete
* fix <enter> for ReplaceNext
2023-09-19 20:48:01 -06:00
Mikayla Maki
e37373a636
Add UI/UX for moving channels (#2976)
TODO:

- [x] Add drag and drop
- [x] Polish up in-flight decisions.
- [x] Fix chat panel panic
- [x] Add nice hover effect highlighting the matching ones
- [x] Fix and test keyboard

Release Notes:

- N/A
2023-09-19 17:56:22 -07:00
Mikayla
ac65e7590c
Add hover styles to channels matching the current selection
Fix chat desync from moving / linking channels
2023-09-19 17:50:02 -07:00
Nate Butler
2699f170ca Checkpoint - Details 2023-09-19 19:18:23 -04:00
Kyle Caverly
2f44055079
Semantic index eval (#2988)
v0 of the Semantic Index evaluate test suite

Release Notes:

- Added eval.rs as an example to the semantic-index crates
- Generates test metrics for two small projects, as a starting point to
systematically evaluate retrieval quality
2023-09-19 19:17:06 -04:00
KCaverly
11b3bfdc99 fix warnings 2023-09-19 19:05:26 -04:00
KCaverly
25cb79e475 remove git2 dependency for repository cloning in semantic_index eval 2023-09-19 18:55:15 -04:00
Mikayla
d5f0ce0e20
Finish implementing drag and drop 2023-09-19 15:51:00 -07:00
Piotr Osiewicz
4525509804
buffer/replace: Advance match index on each replace. (#2992)
Release Notes:
- Fixed "Replace next" not advancing the match index.
2023-09-19 23:56:22 +02:00
Mikayla
f3b91082a6
Improve drag and drop to look and feel better
WIP: Change rendering of drag and drop based on alt-modifier
2023-09-19 14:48:34 -07:00
Kirill Bulatov
7bc4f0bc11 Send copilot log messages into the log panel 2023-09-19 23:41:55 +03:00
KCaverly
d85acceeec move git2 to workspace dependency globally 2023-09-19 16:13:47 -04:00
Kirill Bulatov
5e1b284846 Show supplementary language servers in the logs panel 2023-09-19 22:29:27 +03:00
Kirill Bulatov
556f398780 Send and receive Copilot events 2023-09-19 21:53:31 +03:00
Mikayla
9bff3b6916
Add basic drag and drop support 2023-09-19 11:20:01 -07:00
Nate Butler
65aa4d5642 Draw indent guides using indent_level
Co-Authored-By: Julia <30666851+ForLoveOfCats@users.noreply.github.com>
2023-09-19 12:38:46 -04:00
KCaverly
4f1a59ebf5 formatting 2023-09-19 12:27:33 -04:00
KCaverly
fc8dd8433c remove release channel flags in semantic_index 2023-09-19 12:20:59 -04:00
Nate Butler
3a9f5d6ddc use u32 as indent_level
Co-Authored-By: Julia <30666851+ForLoveOfCats@users.noreply.github.com>
2023-09-19 11:59:55 -04:00
Nate Butler
748ad5f05a Make list_item toggleable, improve optional left_icon on list item
Co-Authored-By: Julia <30666851+ForLoveOfCats@users.noreply.github.com>
2023-09-19 11:52:35 -04:00
KCaverly
183758a7c5 fix Cargo.lock for merge 2023-09-19 11:44:51 -04:00
Kirill Bulatov
9eadfc80ba Add Copilot server to LSP logs panel 2023-09-19 16:25:09 +03:00
Nate Butler
7e300079ce WIP 2023-09-19 08:31:22 -04:00
Kirill Bulatov
5b0b2fe50b Add a specific server id to a Copilot LSP 2023-09-19 12:32:05 +03:00
Kirill Bulatov
91fac2aa76 Automatically subscribe for lsp logs of every server added
Avoid re-adding the server on new logs events.
2023-09-19 11:52:21 +03:00
Nate Butler
26f442a675 Merge branch 'main' into nate/gpui2-ui-components 2023-09-19 00:26:41 -04:00
Nate Butler
8aa4fbea83 Add icon, list_item, work on project panel 2023-09-19 00:25:46 -04:00
Mikayla
dadad397ef
Finish optimizing channel representations and operations 2023-09-18 20:24:37 -07:00
Nathan Sobo
2701be91e3 Add negative style helpers 2023-09-18 20:47:40 -06:00
Nathan Sobo
f2e87a3429 Add Element::when method 2023-09-18 20:25:12 -06:00
Nathan Sobo
c7a3186d08 Checkpoint 2023-09-18 20:17:27 -06:00
Nathan Sobo
a5e4ceb735 Checkpoint: Add methods for setting arbitrary lengths 2023-09-18 19:48:22 -06:00
Nate Butler
b725cadf48 Checkpoint 2023-09-18 19:59:01 -04:00
KCaverly
25bd357426 add recall and precision to semantic index 2023-09-18 18:25:02 -04:00
Conrad Irwin
71e519aa3b vim: Use explicit global, not default 2023-09-18 14:22:41 -06:00
Conrad Irwin
adf313bd33
Fix vim-related panic (#2986)
Release Notes:

- fix panic that happens during collaboration (preview-only)
2023-09-18 12:21:38 -06:00
Conrad Irwin
417f28effe Fix vim-related panic 2023-09-18 12:13:50 -06:00
Piotr Osiewicz
616d328f3c
chore: Use aho-corasick 1.1 in direct dependencies (#2983)
Nothing too fancy, we've depended indirectly on 1.0/1.1 already, so this
is essentially bookkeeping.

Release Notes:
- N/A
2023-09-18 17:01:08 +02:00
Conrad Irwin
5c22e40e99
vim: Fix Y on last line (#2975)
For zed-industries/community#2044

Release Notes:

- vim: Fix y in VISUAL LINE mode when last line has no trailing newline
([#2044](https://github.com/zed-industries/community/issues/2044)).
2023-09-18 08:54:48 -06:00
Conrad Irwin
5c8ff05577
clip FoldPoint earlier (#2982)
fold_point_to_display_point calls to_offset on the fold point, which
panics if it hasn't been clipped.

https://zed-industries.slack.com/archives/C04S6T1T7TQ/p1694850156370919

Release Notes:

- vim: Fix a crash when moving up/down in some circumstances.
2023-09-18 08:53:38 -06:00
Conrad Irwin
4244e7893f Clip twice 2023-09-18 08:28:21 -06:00
KCaverly
566bb9f71b add map to evaluation suite for semantic_index 2023-09-18 09:57:52 -04:00
Piotr Osiewicz
0598a8243d
chore: Hoist non-generic part out of add_action_internal. (#2981)
add_action_internal shows up often in downstream crates (as it should
be, since it's a generic function it's codegened in each crate that uses
it); it adds non-trivial amounts of LLVM IR to the build as a whole
which we can cut down a bit by doing the inner fn trick.

Release Notes:

- N/A
2023-09-18 11:55:44 +02:00
Conrad Irwin
c4797f87b4 clip FoldPoint earlier
fold_point_to_display_point calls to_offset on the fold point, which
panics if it hasn't been clipped.

https://zed-industries.slack.com/archives/C04S6T1T7TQ/p1694850156370919
2023-09-16 12:58:39 -07:00
Mikayla
d46816589e
Added 'open in terminal' action to the project panel context menu
Also slightly re-arranged the project panel context menu
2023-09-15 21:33:22 -07:00
Nate Butler
db1dacde5d Add facepile, indicator, follow_group 2023-09-15 22:10:51 -04:00
Mikayla
5f9c56c8b0
WIP: Send the channel name and the channel edges seperately, so we're not repeating them constantly
This commit is currently broken and includes debug data for a failed attempt at rewriting the insert_edge logic
2023-09-15 17:57:23 -07:00
Mikayla
363867c65b
Make DAG tests order independent 2023-09-15 13:44:01 -07:00
Mikayla
52057c5619
Simplify path representation in collab panel
Optimize set representation in collab
2023-09-15 13:35:46 -07:00
Nate Butler
9f2a9d43b1 Organize design system under ui 2023-09-15 16:34:56 -04:00
Mikayla
5400605483
Fix merge conflicts 2023-09-15 12:30:26 -07:00
Joseph T. Lyons
5df9a57a8b
Add assistant events (#2978)
Add assistant events

Release Notes:

- N/A
2023-09-15 15:25:35 -04:00
Kyle Caverly
b9c1f3d558
enable includes filtering for open and modified buffers (#2979)
enable include file filtering for semantic searching in open and
modified buffers

Release Notes:

- Added include based filtering for modified buffers
2023-09-15 15:23:24 -04:00
KCaverly
1433160a08 enable include based filtering for search inside open and modified buffers 2023-09-15 15:16:20 -04:00
Nate Butler
0aff0c105d
Add missing logo_96 icon, fix a few incorrect paths (#2977)
🙈 I missed a few

Thanks @maxbrunsfeld / @mikayla-maki
2023-09-15 14:57:40 -04:00
Mikayla
f9fff3a7b2
fmt 2023-09-15 11:39:56 -07:00
Mikayla
16707d16f6
Improve context-menu behavior 2023-09-15 11:39:56 -07:00
Mikayla
d424e27164
Finish testing new channel store client behavior 2023-09-15 11:39:56 -07:00
Mikayla
67ad75a376
Clean up implementation of channel index, get simple channel moving test cases working 2023-09-15 11:39:56 -07:00
Mikayla
9afb67f2cf
Implement final move, link, unlink db APIs 2023-09-15 11:39:56 -07:00
Mikayla
7fa68a9aa4
WIP: improve move and link handling around 'root paths', currently very incorrect and in need of a deeper rework 2023-09-15 11:39:56 -07:00
Mikayla
cda54b8b5f
Improve database and RPC API for moving and linking channels, improve test legibility 2023-09-15 11:39:55 -07:00
Mikayla
439f627d9a
Add move, link, and unlink operations 2023-09-15 11:36:58 -07:00