Commit Graph

12411 Commits

Author SHA1 Message Date
Marshall Bowers
9e1f7c4c18
Mainline GPUI2 UI work (#3079)
This PR mainlines the current state of new GPUI2-based UI from the
`gpui2-ui` branch.

Release Notes:

- N/A

---------

Co-authored-by: Nate Butler <iamnbutler@gmail.com>
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Co-authored-by: Nate <nate@zed.dev>
2023-10-02 18:20:47 -04:00
Julia
08361eb84e
Detach completion confirmation task when selecting with mouse (#3078)
Otherwise the spawn to resolve the additional edits never runs causing
autocomplete to never add imports automatically when clicking with the
mouse

Release Notes:

- Fixed auto-complete additional edits, such as auto-import, not
applying when selecting a completion with a mouse click.
2023-10-02 13:32:06 -04:00
Julia
3d68fcad0b Detach completion confirmation task when selecting with mouse
Otherwise the spawn to resolve the additional edits never runs causing
autocomplete to never add imports automatically when clicking with the
mouse
2023-10-02 13:18:49 -04:00
Piotr Osiewicz
a785eb9141
auto-update: Link to the current release's changelog, not the latest one (#3076)
An user complained in zed-industries/community#2093 that we always link
to the latest release changelog, not the one that they've just updated
to.


Release Notes:
- Fixed changelog link in update notification always leading to the
latest release changelog, not the one that was updated to. Fixes
zed-industries/community#2093.
2023-10-02 15:24:09 +02:00
Joseph T. Lyons
95e09dd2e9
Add Nushell support to venv activation (#3073)
This PR adds an option to run `activate.nu` in the automatic venv
activation code (relevant comment
[here](https://github.com/zed-industries/community/issues/2103#issuecomment-1742355651))

Release Notes:

- Added a `nushell` option to the
`terminal.detect_venv.on.activate_script` setting
([2103](https://github.com/zed-industries/community/issues/2103)).
2023-10-01 23:55:57 -04:00
Joseph T. Lyons
e5e63ed201 Add Nushell support to venv activation 2023-10-01 23:38:30 -04:00
Max Brunsfeld
f011a3df52
Allow following participants who aren't in the same project (#2993)
The goal of this PR is to make Following more intuitive.

### Old Behavior

Previously, following was scoped to a project. In order to follow
someone in a given window, the window needed to contain a shared
project, and the leader needed to be present in the project. Otherwise,
following failed.

### New Behavior

* You can always follow **any** participant in the current call, in any
pane of any window.
* When following someone in a project that you're both collaborating in,
it works the same as before.
* When following someone in an unshared project, or a project that they
don't have open, you'll only get updates about the leader's views that
don't belong to a project, such as channel notes views. When the leader
focuses a file in a different project, you'll get the "follow $LEADER to
their active project" indicator

### Todo

* [x] Change db schema and RPC protocol so a project id isn't required
for following
* [x] Change client to allow following into non-project items regardless
of the leader's project
* [x] Assign colors to users in a way that doesn't require users to be
in a shared project.
2023-09-29 15:18:05 -07:00
Max Brunsfeld
7adaa2046d Show current user as follower when following in unshared projects 2023-09-29 15:08:25 -07:00
Max Brunsfeld
948871969f Fix active view update when center pane is not focused 2023-09-29 14:37:28 -07:00
Mikayla Maki
57707a80e6
Refactor elixir LSP settings (#3071)
This PR is a bit of a last minute change, but I realized there was
actually a third player in the Elixir LSP space who wants support as
well,
[lexical](https://github.com/zed-industries/community/issues/1567). I
realized that the settings arrangement I shipped in this preview
precludes adding a third kind of LSP. I don't have the time to learn how
to fully support this LSP, but I thought I'd at least refactor how the
settings are represented before this hits stable.

Release Notes:

- Changed the new `"elixir": { "next": "on" }` setting to `"elixir": {
"lsp": "next_ls" }`. The `elixir.lsp` setting requires a full restart to
take effect. (Preview only)
2023-09-29 14:25:05 -07:00
Max Brunsfeld
55da5bc25d Switch .leader_replica_id -> .leader_peer_id 2023-09-29 14:16:38 -07:00
Max Brunsfeld
c718b810f6 Merge branch 'main' into allow-following-outside-of-projects 2023-09-29 14:15:33 -07:00
Max Brunsfeld
afd293ee87 Update active view when activating a window 2023-09-29 14:12:51 -07:00
Mikayla
752bc5dcdd
Refactor elixir LSP settings 2023-09-29 14:12:50 -07:00
Max Brunsfeld
973f03e73e Fix bug in follower updates for non-project items 2023-09-29 14:09:14 -07:00
Max Brunsfeld
555c9847d4 Add ZED_ALWAYS_ACTIVE env var, use it in local collaboration script
This makes zed always behave as if the app is active, even if no window is focused.
It prevents the 'viewing a window outside of zed' state during collaboration.
2023-09-29 13:43:43 -07:00
Conrad Irwin
d9c1cf9874
vim: Fix accidental visual selection when following (#3068)
Release Notes:

- vim: Fix a bug where following could put you in visual mode
2023-09-29 13:59:59 -06:00
Mikayla Maki
1155f1b0e1
Add support for the TextDocumentSyncKind LSP option (#3070)
fixes https://github.com/zed-industries/community/issues/2098

Release Notes:

- Fixed a bug in Zed's LSP implementation when using Next LS.
2023-09-29 12:25:37 -07:00
Mikayla
31ff5bffd6
Fix tests relying on off-spec behavior 2023-09-29 12:19:58 -07:00
Mikayla
4887ea3563
Add support for the TextDocumentSyncKind LSP options 2023-09-29 12:05:21 -07:00
Kyle Caverly
dbaaf4216d
add scheme for full parseable files in semantic index (#3069)
add scheme as a parseable file type in semantic index.
Each file will operate as a single embedding, in which no real scheme
syntax or tree-sitter level data is stored.

Release Notes:

- Added scheme to Semantic Index
2023-09-29 14:42:15 -04:00
KCaverly
3c12e711a4 add scheme for full parseable files in semantic index 2023-09-29 14:35:02 -04:00
Conrad Irwin
9b7bd4e9ae vim: Fix accidental visual selection when following 2023-09-29 12:08:25 -06:00
Max Brunsfeld
026b3a1d0f Remove uneeded Workspace::project_remote_id_changed method 2023-09-29 08:54:23 -07:00
Marshall Bowers
c379a6f2fb
ui: Fix glyph used for option key in Keybinding (#3066)
This PR fixes the glyph used for the option key in the new `Keybinding`
component.

Same fix as in #3065, but applied to the new `Keybinding` component so
that we don't regress when switching to GPUI2.

<img width="750" alt="Screenshot 2023-09-29 at 10 50 15 AM"
src="https://github.com/zed-industries/zed/assets/1486634/8c6147e9-fa05-4804-954c-b8e3b98cbdf0">

Release Notes:

- N/A
2023-09-29 11:02:35 -04:00
Piotr Osiewicz
488a3eeace
ui: Mirror option key in keybindings (#3065)
![image](https://github.com/zed-industries/zed/assets/24362066/94731737-a21a-4cef-a445-eb855f1a4d3e)

![image](https://github.com/zed-industries/zed/assets/24362066/e879ec9a-70aa-4989-923f-4cca18d01587)

Release Notes:

- Fixed option key's appearance in keybindings
2023-09-29 16:45:49 +02:00
Antonio Scandurra
4dd9c9e2b9
Introduce the ability to include or exclude warnings from project diagnostics (#3056)
![CleanShot 2023-09-27 at 18 09
37](https://github.com/zed-industries/zed/assets/482957/317d31e4-81f8-44d8-b94f-8ca7150d3fd2)

Release Notes:

- Added the ability to exclude warnings from project diagnostics. By
default, they will be on but they can be disabled temporarily by
clicking on the warnings icon. The default behavior can be changed by
changing the new `diagnostics.include_warnings` setting.
2023-09-29 13:13:04 +01:00
Max Brunsfeld
ca0a4bdf8e Introduce a WorkspaceStore for handling following 2023-09-28 18:58:52 -07:00
Marshall Bowers
247c7eff14
storybook: Fix kitchen sink story (#3064)
This PR fixes the kitchen sink story in the storybook.

Included are some additional changes that make it so the kitchen sink is
automatically populated by all of the defined stories.

Release Notes:

- N/A
2023-09-28 21:22:50 -04:00
Max Brunsfeld
837ec5a27c Remove stray file 2023-09-28 17:14:53 -07:00
Max Brunsfeld
5a15692589 🎨 Workspace::leader_updated 2023-09-28 17:13:10 -07:00
Max Brunsfeld
0058702749 Remove unused db query method 2023-09-28 17:13:10 -07:00
Max Brunsfeld
e34ebbc665 Remove unused dependencies on theme 2023-09-28 17:13:10 -07:00
Max Brunsfeld
38a9e6fde1 Fix removal of followers on Unfollow 2023-09-28 16:46:43 -07:00
Marshall Bowers
f26ca0866c
Mainline GPUI2 UI work (#3062)
This PR mainlines the current state of new GPUI2-based UI from the
`gpui2-ui` branch.

Release Notes:

- N/A

---------

Co-authored-by: Nate Butler <iamnbutler@gmail.com>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Co-authored-by: Nate <nate@zed.dev>
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-09-28 19:36:21 -04:00
Conrad Irwin
e7ee8a95f6
vim: Fix some dw edge cases (#3058)
Release Notes:

- vim: Fix `dw` on the last word of a line, and on empty lines.
2023-09-28 15:32:29 -06:00
Conrad Irwin
91adefedfa
vim keybinding updates (#3057)
Release Notes:

- vim: Add ctrl-i to go forward
([#1732](https://github.com/zed-industries/community/issues/1732)).
ctrl-o was already supported.
- vim: Add `g <space>` to open the current snippet in its own file.
- vim: Escape will now return to normal mode even if completion menus
are open (use `ctrl-x ctrl-z` to hide menus, as in vim).
- vim: Add key bindings for Zed's various completion mechanisms:
- - `ctrl-x ctrl-o` to open the completion menu,
- -  `ctrl-x ctrl-l` to open the LSP action menu,
- - `ctrl-x ctrl-c` to trigger Copilot (requires configuring copilot),
- - `ctrl-x ctrl-a` to trigger the inline Assistant (requires
configuring openAI),

NOTE: we should add these to the docs before shipping 0.107 to stable.
2023-09-28 15:32:21 -06:00
Conrad Irwin
2f5eaa8475
vim increment (#3054)
- vim: add ctrl-a/ctrl-x for increment/decrement
2023-09-28 15:32:11 -06:00
Joseph T. Lyons
da964fae93
Enable semantic_index by default (#3061)
Release Notes:

- Enabled the `semantic_index` setting by default.
2023-09-28 17:24:00 -04:00
Max Brunsfeld
e9c1ad6acd Undo making project optional on stored follower states
Following works without a project, but following in unshared projects does
not need to be replicated to other participants.
2023-09-28 14:21:44 -07:00
Joseph T. Lyons
f965ee9b1b Enable semantic_index by default 2023-09-28 17:17:26 -04:00
Max Brunsfeld
ce940da8e9 Fix errors from assuming all room_participant rows had a non-null participant_index
Rows representing pending participants have a null participant_index.

Co-authored-by: Conrad <conrad@zed.dev>
2023-09-28 12:03:53 -07:00
Max Brunsfeld
a8b35eb8f5 Merge branch 'main' into allow-following-outside-of-projects 2023-09-28 11:58:28 -07:00
Max Brunsfeld
0c95e5a6ca Fix coloring of local selections when following
Co-authored-by: Conrad <conrad@zed.dev>
2023-09-28 11:37:47 -07:00
Max Brunsfeld
0f39b63801 Rename color_index to participant_index
Co-authored-by: Conrad <conrad@zed.dev>
2023-09-28 11:37:22 -07:00
Max Brunsfeld
545b5e0161 Assign unique color indices to room participants, use those instead of replica_ids
Co-authored-by: Conrad <conrad@zed.dev>
Co-authored-by: Antonio <antonio@zed.dev>
2023-09-28 11:06:09 -07:00
Joseph T. Lyons
3cf7164a54
Fix text transformation commands for multiple line, single selection cases (#3060)
If you highlight the following block of text (with a single selection):

```
The quick brown
fox jumps over
the lazy dog
```

and run `editor: convert to upper camel case`, you'll get:

```
TheQuickBrown
foxJumpsOver
theLazyDog
```

instead of:

```
TheQuickBrown
FoxJumpsOver
TheLazyDog
```

The same thing happens for `editor: convert to title case`. This happens
because [`to_case` crate](https://crates.io/crates/convert_case) doesn't
allow the user to define '\n' as a boundary. I wanted to fix this at the
lib level, so I filled [an
issue](https://github.com/rutrum/convert-case/issues/16) but I never
heard back. What's strange is VS Code and Sublime I think both exhibit
the same output as we do currently, but I don't personally think this
feels right (happy to hear opposing opinions). I'm just doing the naive
thing to hack around this limitation of the `to_case` crate.

I did some testing and it seems I only need to adjust `editor: convert
to title case` and `editor: convert to upper camel case`. The way the
other transformations are implemented in `to_case` don't seem to have
this issue.

Release Notes:

- Fixed a bug where running certain text transfomration commands on a
single selection covering multiple lines would not transform all
selected lines as expected.
2023-09-28 14:04:17 -04:00
Kirill Bulatov
a8188a2f33
Improve file finder ergonomics (#3059)
Deals with https://github.com/zed-industries/community/issues/2086
Part of https://github.com/zed-industries/community/issues/351

Initial:
<img width="585" alt="Screenshot 2023-09-28 at 09 50 05"
src="https://github.com/zed-industries/zed/assets/2690773/e0149312-dfe3-4b7c-948c-0f593d6f540c">
First query letter input (only two history items match that, both are
preserved on top, with their order preserved also)
<img width="603" alt="Screenshot 2023-09-28 at 09 50 08"
src="https://github.com/zed-industries/zed/assets/2690773/85ab2f4c-bb9c-4811-b8b0-b5c14a370ae2">
Second query letter input, no matching history items:
<img width="614" alt="Screenshot 2023-09-28 at 09 50 11"
src="https://github.com/zed-industries/zed/assets/2690773/6d380403-a43c-4f00-a05b-88f43f91fefb">
Remove second query letter, history items match again and pop to the
top:
<img width="574" alt="Screenshot 2023-09-28 at 09 50 15"
src="https://github.com/zed-industries/zed/assets/2690773/5981ca53-6bc8-4305-ae36-27144080e1a2">


* allows `file_finder::Toggle` (cmd-p by default) to cycle through file
finder items (ESC closes the modal still)
* on query typing, preserve history items that match the query and keep
them on top, with their ordering preserved
* show history items' matched letters

Release Notes:

- Improve file finder ergonomics: allow cycle through items with the
toggle action, preserve matching history items on query input
2023-09-28 19:53:09 +03:00
Kirill Bulatov
d30385f07c Show path matches inside history items matching the query 2023-09-28 09:49:25 -07:00
Kirill Bulatov
1b5ff68c43 Show matching search history whenever possible 2023-09-28 09:34:20 -07:00