Commit Graph

20327 Commits

Author SHA1 Message Date
Thorsten Ball
0c7e745be8
docs: Fix Vim documentation for bindings (#12735)
Release Notes:

- N/A
2024-06-06 15:55:07 +02:00
Nycheporuk Zakhar
3000f6ea22
Use cwd to run package.json script (#12700)
Fixes case when `package.json` is not in root directory. 
Usually in mono repository, where multiple `package.json` may be present

Release Notes:

- Fixed runnable for package.json in monorepos
2024-06-06 15:17:45 +03:00
Piotr Osiewicz
377e24b798
chore: Fix clippy for upcoming 1.79 Rust release (#12727)
1.79 is due for release in a week.
Release Notes:

- N/A
2024-06-06 12:46:53 +02:00
Antonio Scandurra
a0c0f1ebcd
Rename conversations to contexts (#12724)
This just changes nomenclature within the codebase and should have no
external effect.

Release Notes:

- N/A
2024-06-06 11:40:54 +02:00
Antonio Scandurra
70ce06cb95
Improve UX for saved contexts (#12721)
Release Notes:

- Added search for saved contexts.
- Fixed a bug that caused titles generate by the LLM to be longer than
one line.
2024-06-06 10:22:39 +02:00
Thorsten Ball
9a5b97db00
linux/x11: Don't surround selection when XMI composing (#12632)
On X11 I was unable to type ä ü and other umlauts in files with
autoclose enabled, because typing ä requires me to hit

- compose key
- `"`
- `a`

When the `"` was typed, Zed would insert a matching `"` because it had a
selection around the dead-key that was inserted by the compose key.

We ran into a similar issue in #7611, but in the case of the Brazilian
keyboard, the `"` is the compose key so we didn't trigger the matching
`"`, because we didn't have a selection yet.

What this does is it fixes the issue by making the
surround-selection-with-quotes-or-brackets also depend on the autoclose
settings, which is didn't do before. This is a breaking change for users
of a Brazilian keyboard layout in which `"` cannot be used to surround
an existing selection with quotes anymore.

That _might_ be a change that users notice, but I can't think of
scenario for that where the user wants, say, `"` to be NOT autoclosed,
but work with selections. (Example is Markdown, for which autoclose for
`"` is disabled. Do we want that but allow surrounding with quotes?)

So it fixes the issue and makes the behavior slightly more consistent,
in my eyes.

Release Notes:

- Changed the behavior of surrounding selections with brackets/quotes to
also depend on the auto-close settings of the language. This is a
breaking change for users of a Brazilian keyboard layout in which `"`
cannot be used to surround an existing selection with quotes anymore.

Before:

[Screencast from 2024-06-04
11-49-51.webm](https://github.com/zed-industries/zed/assets/1185253/6bf255b5-32e9-4ba7-8b46-1e49ace2ba7c)

After:

[Screencast from 2024-06-04
11-52-19.webm](https://github.com/zed-industries/zed/assets/1185253/3cd196fc-20ba-465f-bb54-e257f7f6d9f3)
2024-06-06 10:01:38 +02:00
Dhairya Nadapara
0b75afd322
chore: added inl to cpp config (#12710)
Screenshot:
<img width="1027" alt="image"
src="https://github.com/zed-industries/zed/assets/19250981/1d35d35c-d31c-4feb-b2ca-a417972fadf6">

Release Notes:

- Added `inl` to cpp config ([12605](https://github.com/zed-industries/zed/issues/12605))
2024-06-06 10:23:36 +03:00
Brian Schwind
4fd698a093
Fix key-bindings doc typo (#12718)
`base_keymap` is a property of `settings.json`, not `keymap.json`. If
you run "toggle base keymap selector" and select a particular editor,
you will notice that it places the `base_keymap` property in
`settings.json`.

Release Notes:

- N/A
2024-06-06 09:41:28 +03:00
Chung Wei Leong
b50846205c
Fixed default LSP default settings for JavaScript, TypeScript & TSX (#12716)
Fixed the default LSP settings for `JavaScript`, `TypeScript` & `TSX`,
correcting the "rest" value from `".."` to `"..."`.

Release Notes:
- N/A
2024-06-06 09:40:20 +03:00
Kirill Bulatov
a574036efd
Update the whitespace docs in the default settings file (#12717) 2024-06-06 08:29:01 +03:00
Conrad Irwin
89641acf2f
Fix ordering of keyboard shortcuts so that you can use AI on linux (#12714)
Release Notes:

- N/A
2024-06-05 21:58:37 -06:00
Nate Butler
611bf2d905
Update prompt library styles (#12689)
- Extend Picker to allow passing a custom editor. This allows creating a
custom styled input.
- Updates various picker styles

Before:

![CleanShot 2024-06-05 at 22 08
36@2x](https://github.com/zed-industries/zed/assets/1714999/96bc62c6-839d-405b-b030-31491aab8710)

After:

![CleanShot 2024-06-05 at 22 09
15@2x](https://github.com/zed-industries/zed/assets/1714999/a4938885-e825-4880-955e-f3f47c81e1e3)

Release Notes:

- N/A
2024-06-05 22:10:02 -04:00
Andrew Lygin
f476a8bc2a
editor: Add ToggleTabBar action (#12499)
This PR adds the `editor: toggle tab bar` action that hides / shows the
tab bar and updates the `tab_bar.show` setting in `settings.json`
accordingly.

First mentioned in
https://github.com/zed-industries/zed/pull/7356#issuecomment-2118445379.

Release Notes:

- Added the `editor: toggle tab bar` action.
2024-06-05 19:50:57 -06:00
Mikayla Maki
d3d0d01571
Adjust IME action buffering to only apply to insert actions (#12702)
Follow up to https://github.com/zed-industries/zed/pull/12678
fixes https://github.com/zed-industries/zed/issues/11829

In this solution, we only buffer Insert Text actions from the macOS IME.
The marked text and unmark actions are eagerly processed, so that the
IME state is synchronized with the editor state during multi step
pre-edit composition.

Release Notes:

- Fixed an issue where the IME pre-edit could desynchronize from the
editor on macOS
([#11829](https://github.com/zed-industries/zed/pull/12651)).

Co-authored-by: Conrad <conrad@zed.dev>
2024-06-05 16:13:03 -07:00
Marshall Bowers
29d29f5a90
assistant: Initialize the UI font in the prompt library window (#12701)
This PR fixes an issue where the prompt library did not properly have
the UI font or rem size set.

Since it is being opened in a new window, we need to re-initialize these
values the same way we do in the main window.

Release Notes:

- N/A
2024-06-05 17:41:03 -04:00
Bennet Bo Fenner
9824e40878
lsp: Handle responses in background thread (#12640)
Release Notes:

- Improved performance when handling large responses from language
servers

---------

Co-authored-by: Piotr <piotr@zed.dev>
2024-06-05 23:06:44 +02:00
Conrad Irwin
1ad8d6ab1c
Don't show backtraces in prompts (#12699)
Release Notes:

- N/A
2024-06-05 15:00:23 -06:00
CharlesChen0823
8745719687
vim: Fix g _ not having the expected behavior (#12607)
Release Notes:

- N/A

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-06-05 15:00:13 -06:00
kshokhin
c7c19609b3
Search in selections (#10831)
Release Notes:

- Adding [#8617 ](https://github.com/zed-industries/zed/issues/8617)

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-06-05 13:42:51 -06:00
Conrad Irwin
428c143fbb
Add ability to scroll popovers with vim (#12650)
Co-Authored-By: ahmadraheel@gmail.com



Release Notes:

- vim: allow scrolling the currently open information overlay using
`ctrl-{u,d,e,y}`etc. (#11883)
2024-06-05 13:39:17 -06:00
Marshall Bowers
f3460d440c
html_to_markdown: Move TableHandler out of rustdoc (#12697)
This PR moves the `TableHandler` out of the `rustdoc` module, as it
doesn't contain anything specific to rustdoc.

Release Notes:

- N/A
2024-06-05 15:37:02 -04:00
Joseph T Lyons
071270fe88 Remove meta label
This label has been deleted. Now, the only label used for ignoring top-ranking issues is `ignore top-ranking issues`.
2024-06-05 13:29:34 -04:00
Joseph T Lyons
a59dd7d06d v0.140.x dev 2024-06-05 12:23:48 -04:00
Conrad Irwin
868284876d
Bump alacritty to fix some file descriptor yuck (#12687)
https://github.com/alacritty/alacritty/pull/7996

Release Notes:

- Fixed a crash caused by bad file descriptor lifetime handling.
2024-06-05 09:12:05 -06:00
Antonio Scandurra
6bbe9a2253
Polish prompt library some more (#12686)
Release Notes:

- N/A
2024-06-05 16:55:37 +02:00
Antonio Scandurra
7a05db6d3d
Cancel inline assist editor on blur if it wasn't confirmed (#12684)
Release Notes:

- N/A
2024-06-05 16:31:45 +02:00
Antonio Scandurra
3587e9726b
Support wrapping and hard newlines in inline assistant (#12683)
Release Notes:

- Improved UX for the inline assistant. It will now automatically wrap
when the text gets too long, and you can insert newlines using
`shift-enter`.
2024-06-05 16:10:56 +02:00
Antonio Scandurra
a96782cc6b
Allow using the inline assistant in prompt library (#12680)
Release Notes:

- N/A
2024-06-05 14:46:33 +02:00
Nicholas Cioli
0289c312c9
editor: Render boundary whitespace (#11954)
![image](https://github.com/zed-industries/zed/assets/1240491/3dd06e45-ae8e-49d5-984d-3d8bdf98d983)

Added support for only rendering whitespace that is on a
boundary, the logic of which is explained below:

- Any tab character
- Whitespace at the start and end of a line
- Whitespace that is directly adjacent to another whitespace


Release Notes:

- Added `boundary` whitespace rendering option
([#4290](https://github.com/zed-industries/zed/issues/4290)).




---------

Co-authored-by: Nicholas Cioli <nicholascioli@users.noreply.github.com>
2024-06-05 14:02:55 +03:00
Kirill Bulatov
63a8095879
Revert "Fix a bug where the IME pre-edit would desync from Zed (#12651)" (#12678)
This reverts commit 1a0708f28c since after
that, default task-related keybindings (alt-t and alt-shift-t) started
to leave `†` and `ˇ` symbols in the text editors before triggering
actions.


Release Notes:

- N/A
2024-06-05 13:54:06 +03:00
Kirill Bulatov
1768c0d996
Do not occlude terminal pane by terminal element (#12677)
Release Notes:

- Fixed file drag and drop not working for terminal

Co-authored-by: Antonio Scandurra <antonio@zed.dev>
2024-06-05 13:43:18 +03:00
Antonio Scandurra
27e9c68988
Autocomplete commands that don't require access to workspace in prompt library (#12674)
This is useful to autocomplete prompts when writing a new one in the
prompt library.

Release Notes:

- N/A
2024-06-05 10:07:43 +02:00
Kirill Bulatov
ad2ddf1200
Omit clickable hunks when git hunks are disabled in the gutter (#12671)
Closes https://github.com/zed-industries/zed/issues/12644 

https://github.com/zed-industries/zed/pull/12425 fixes the issue so that
clicks are never reaching the hunks' hitboxes in such case, this PR
actually removes those hitboxes.
Hunks can still be toggled via the action.

Release Notes:

- N/A
2024-06-05 10:05:53 +03:00
Owen Law
d6e271c956
Add note about auto-updating on Linux (#12662)
Release Notes:

- N/A
2024-06-04 19:13:08 -06:00
Mikayla Maki
da29e33f50
Auto updater disabler (#12660)
Supersedes https://github.com/zed-industries/zed/pull/12659
Fixes https://github.com/zed-industries/zed/issues/12588

One of Zed's core features is our collaboration software. As such, it is
important that we notify the user when their RPC protocol is out of
date, and how to update it. This PR adds a mechanism to replace the
existing auto updater with a message explaining how to update Zed for
this environment.

Release Notes:

- N/A
2024-06-04 15:56:18 -07:00
Marshall Bowers
3fd118f8e1
html_to_markdown: Remove unused examples (#12658)
This PR removes the unused `examples` from the `html_to_markdown` crate.

I was just using these to dogfood the parsing initially, but now that
it's wired up in the Assistant, the examples are no longer useful.

Release Notes:

- N/A
2024-06-04 18:39:41 -04:00
Conrad Irwin
27beb9e697
Update linux binary expectations (#12622)
Fixes #12585

This changes the expectations for installed binaries on linux based on
work
that @jirutka has done for Alpine.

In particular, we now put the cli in place as `bin/zed` and the zed
binary as
`libexec/zed-editor`, and assume that packagers do the same.

cc @someone13574

Release notes:

- N/A

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
2024-06-04 15:31:01 -07:00
Conrad Irwin
c7d56302d2
Always open the project panel for dev server projects (#12654)
Release Notes:

- N/A
2024-06-04 16:07:12 -06:00
Marshall Bowers
74cb92f9cc
vue: Bump to v0.0.3 (#12656)
This PR bumps the Vue extension to v0.0.3.

Changes:

- #11482

Release Notes:

- N/A
2024-06-04 18:06:40 -04:00
Paul Eguisier
8a659b0c60
Implement Indent & Outdent as operators (#12430)
Release Notes:

- Fixes [#9697](https://github.com/zed-industries/zed/issues/9697).

Implements `>` and `<` with motions and text objects.
Works with repeat action `.`
2024-06-04 15:17:01 -06:00
d1y
25050e8027
vue: Improve syntax highlighting (#11482)
close #8989

Before:

<img width="690" alt="image"
src="https://github.com/zed-industries/zed/assets/45585937/02b6f703-d54a-4e08-82f8-4ed624f37a64">

After:

<img width="571" alt="image"
src="https://github.com/zed-industries/zed/assets/45585937/9abd39d0-c4e8-426e-b0d8-62e26090332a">


Release Notes:

- Improve vue highlighting
2024-06-04 14:04:54 -07:00
Marshall Bowers
2d9479667f
Make HTML to Markdown conversion more pluggable (#12653)
This PR overhauls the HTML to Markdown conversion functionality in order
to make it more pluggable. This will ultimately allow for supporting a
variety of different HTML input structures (both natively and via
extensions).

As part of this, the `rustdoc_to_markdown` crate has been renamed to
`html_to_markdown`.

The `MarkdownWriter` now accepts a list of trait objects that can be
used to drive the conversion of the HTML into Markdown. Right now we
have some generic handler implementations for going from plain HTML
elements to their Markdown equivalents, as well as some rustdoc-specific
ones.

Release Notes:

- N/A
2024-06-04 16:14:26 -04:00
Conrad Irwin
1c617474fe
Allow restarting remote language servers (#12652)
Release Notes:

- Added the ability to restart the remote language servers when
collaborating
2024-06-04 14:09:01 -06:00
Mikayla Maki
1a0708f28c
Fix a bug where the IME pre-edit would desync from Zed (#12651)
fixes #11829 

In https://github.com/zed-industries/zed/pull/7494, we introduced IME
event buffering, so that we could preempt the IME with a keystroke event
in some cases. However, this caused a desynchronization bug in long
multi-step IME composition, such as the pre-edit used in the Japanese
Romaji keyboard (and other languages). We found that this was due to the
IME issuing actions, and then immediately querying the editor's state
before we had applied those actions. Therefore, this PR removes IME
action buffering.

We have tested all of the cases in the `handle_key_event` documentation
and added a few of our own.

Release Notes:

- Fixed an issue where the IME pre-edit could desynchronize from the
editor on macOS
([#11829](https://github.com/zed-industries/zed/pull/12651))

---------

Co-authored-by: Jan Solanti <jhs@psonet.com>
2024-06-04 12:17:44 -07:00
Piotr Osiewicz
62e790074c
vcs_menu: Fix header taking up too much space (#12646)
We've spotted a regression following
https://github.com/zed-industries/zed/pull/12468


![image](https://github.com/zed-industries/zed/assets/24362066/8e2659c7-50fe-4a09-af9d-d04416a66276)
This PR addresses that.
Release Notes:

- N/A

Co-authored-by: Bennet <bennet@zed.dev>
2024-06-04 19:13:21 +02:00
Antonio Scandurra
c5b22eee2d
Polish prompt library UX (#12647)
This could still use some improvement UI-wise but the user experience
should be a lot better.

- [x] Show in "Window" application menu
- [x] Load prompt as it's selected in the picker
- [x] Refocus picker on `esc`
- [x] When creating a new prompt, if a new prompt already exists and is
unedited, activate it instead
- [x] Add `/default` command
- [x] Evaluate /commands on prompt insertion
- [x] Autocomplete /commands (but don't evaluate) during prompt editing
- [x] Show token count using the settings model, right-aligned in the
editor
- [x] Picker 
- [x] Sorted alpha
- [x] 2 sublists
    - Default
        - Empty state: Star a prompt to add it to your default prompt
        - Otherwise show prompts with star on hover
    - All
        - Move prompts with star on hover

Release Notes:

- N/A
2024-06-04 18:36:54 +02:00
Marshall Bowers
e4bb666eab
assistant: Add /fetch slash command (#12645)
This PR adds a new `/fetch` slash command to the Assistant for fetching
the content of an arbitrary URL as Markdown.

Currently it's just using the same HTML to Markdown conversion that
`/rustdoc` uses, but I'll be working to refine the output to be more
widely useful.

Release Notes:

- N/A
2024-06-04 11:56:23 -04:00
Piotr Osiewicz
910f668f4d
php/elixir: Bump extensions versions to 0.0.6 and 0.0.5 (#12636)
Includes:
- https://github.com/zed-industries/zed/pull/12526
- https://github.com/zed-industries/zed/pull/11879
- https://github.com/zed-industries/zed/pull/12467

Release Notes:

- N/A
2024-06-04 13:24:31 +02:00
Piotr Osiewicz
8e79609288
editor: Cancel ongoing completion requests more eagerly (#12630)
Previously, we were:
- cancelling previous requests only after the latest one has completed
- always running the debounced documentation resolution to completion,
even when we had no need for it.

In this commit, we drop the ongoing completion requests as soon as the
new one is fired.
Fixes #5166 

Release Notes:

- Improved performance and reliability of completions in large
Typescript projects

Co-authored-by: Bennet Bo <bennet@zed.dev>
2024-06-04 12:22:01 +02:00
Kirill Bulatov
47122a3115
Fix excluded file creation (#12620)
Fixes https://github.com/zed-industries/zed/issues/10890

* removes `unwrap()` that caused panics for text elements with no text,
remaining after edit state is cleared but project entries are not
updated, having the fake, "new entry"
* improves discoverability of the FS errors during file/directory
creation: now those are shown as workspace notifications
* stops printing anyhow backtraces in workspace notifications, printing
the more readable chain of contexts instead
* better indicates when new entries are created as excluded ones


Release Notes:

- Improve excluded entry creation workflow in the project panel
([10890](https://github.com/zed-industries/zed/issues/10890))
2024-06-04 10:31:43 +03:00