Commit Graph

16901 Commits

Author SHA1 Message Date
Conrad Irwin
8643b11f57
Fix search sorting (#16970)
Ensures we sort paths in search the same as we do in panels.

Ideally we'd store things like this in the worktree, but the sort order
depends
on file vs directory, and callers generally don't know which they're
asking for.

Release Notes:

- N/A
2024-08-27 13:46:36 -06:00
Kyle Kelley
442ff94d58
Further document repl outputs (#16962)
Adding more docs to the repl outputs modules.

Release Notes:

- N/A
2024-08-27 12:34:16 -07:00
dovakin0007
f633b125b9
Fix git commit popup message bracket (#16279) 2024-08-27 15:18:48 -04:00
Thorsten Ball
1d868e19f2
project search: Render results in batches (#16960)
This improves performance, because we don't render after every single
match/range that was added to the results.

I think for my example search it's twice as fast?

## Numbers

Recorded in debug mode (because it's 6:30pm and my poor computer has
spun its fan enough for today and also because you can see the change of
the effect more in debug mode), rendering `<` searched in `zed.dev`
repo:

- Before: `14.59558225s`
- After: `2.604320875s`




## Videos
Before (recorded in release mode):



https://github.com/user-attachments/assets/909260fa-3e69-49ab-8786-dd384e2a27ee

After (recorded in release mode):



https://github.com/user-attachments/assets/fc8a85d3-e575-470f-b59c-16a6df8b3f80
## Release Notes

Release Notes:

- Improved performance of rendering project-search results in the
multi-buffer after finding them.
2024-08-27 18:37:26 +02:00
Conrad Irwin
b2f3f760ab
project search: Stream search results to improve TTFB (#16923)
This is a prototype change to improve latency of local project searches.
It refactors the matcher to keep paths "in-order" so that we don't need
to wait for all matching files to display the first result.

On a test (searching for `<` in zed.dev) it changes the time until first
result from about 2s to about 50ms. The tail latency seems to increase
slightly (from 5s to 7s) so we may want to do more tuning before hitting
merge.

Release Notes:

- reduces latency for first project search result

---------

Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
Co-authored-by: Antonio <antonio@zed.dev>
Co-authored-by: Thorsten <thorsten@zed.dev>
2024-08-27 09:37:07 -06:00
Marshall Bowers
8ec36f1e2b
extension: Define capabilities in the extension manifest (#16953)
This PR adds an initial notion of extension capabilities.

Capabilities are used to express the operations an extension is capable
of doing. This will provide further insights into what an extension can
do, as well as provide the ability to grant or deny the set of
capabilities.

Capabilities are defined in the `capabilities` field in the extension
manifest. This field contains an array of capabilities.

Each capability has a `kind` to denote the known capability it
corresponds to. Individual capabilities may have additional fields,
based on the `kind`.

Here's an example of some capabilities:

```toml
capabilities = [
    { kind = "download-file", host = "github.com", path_prefix = "owner/repo" },
    { kind = "npm:install", package = "@vue/language-server" },
]
```

In order to avoid a breaking change, the `capabilities` field is
currently optional and defaults to an empty array. This will allow us to
add support for extensions to define capabilities before we start
enforcing them.

Release Notes:

- N/A
2024-08-27 11:10:58 -04:00
Thorsten Ball
ad43bbbf5e
inline completions: Add action to toggle inline completions (#16947)
This adds a new action: `editor: toggle inline completions`.

It allows users to toggle inline completions on/off for the current
buffer.

That toggling is not persistent and when the editor is closed, it's
gone.

That makes it easy to disable inline completions for a single text
buffer, for example, even if you want them on for other buffers.

When toggling on/off, the toggling also overwrites any language
settings. So if you have inline completions disabled for Go buffers,
toggling them on takes precedence over those settings.


Release Notes:

- Added a new editor action to allow toggling inline completions
(Copilot, Supermaven) on and off for the current buffer, taking
precedence over any settings.

Co-authored-by: Antonio <antonio@zed.dev>
2024-08-27 15:51:57 +02:00
kshokhin
5586397f95
Preserve selected entry in file_finder (#13452)
Closes #11737

If the query has not changed and entry is still in the matches list keep
it selected


Release Notes:

- Fixes file finder jumping during background updates ([#11737](https://github.com/zed-industries/zed/issues/11737))
2024-08-27 16:24:06 +03:00
张小白
60af9dd4b1
Add .SystemUIFont to font list (#15340)
As discussed in #15326, this font name should be included in the font
list since `settings.json` indicates that one can set the font to
`.SystemUIFont`.

Release Notes:

- N/A

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-08-27 09:23:24 -04:00
Peter Tripp
d3d0c043f5
Support extended keys on Mac (insert, f13-f19) (#16921)
- Improved support for extended keyboards on Mac (F13-F19, Insert)
2024-08-27 09:09:57 -04:00
Piotr Osiewicz
226ec9d404
gpui: Fix performance of app menu opening with large # of windows (#16939)
This is officially my weirdest performance fix to date; With large # of
windows opening app menu could take a lot of time (we're talking few
seconds with 9 windows, a minute with 10 windows). The fix is to make
one method pub(crate).. What?

<img width="981" alt="image"
src="https://github.com/user-attachments/assets/83b26154-0acd-43ef-84b3-4b85cde36120">

We were spending most of the time on clear_pending_keystrokes, which -
funnily enough - called itself recursively. It turned out we have two
methods; `AppContext::clear_pending_keystrokes` and
WindowContext::clear_pending_keystrokes. The former calls the latter,
but - due to the fact that `WindowContext::clear_pending_keystrokes` is
private and `WindowContext` derefs to `AppContext` - `AppContext` one
ended up actually calling itself! The fix is plain and simple - marking
WindowContext one as pub(crate), so that it gets picked up as a method
to call over `AppContext::clear_pending_keystrokes`.

Closes #16895



Release Notes:

- Fixed app menu performance slowdowns when there are multiple windows
open.
2024-08-27 12:23:00 +02:00
Thorsten Ball
8ec680cecb
project search: Increase perf up to 10x by batching git status calls (#16936)
***Update**: after rebasing on top of
https://github.com/zed-industries/zed/pull/16915/ (that also changed how
search worked), the results are still good, but not 10x. Instead of
going from 10s to 500ms, it goes from 10s to 3s.*

This improves the performance of project-wide search by an order of
magnitude.

After digging in, @as-cii and I found that opening buffers was the
bottleneck for project-wide search (since Zed opens, parses, ... buffers
when finding them, which is something VS Code doesn't do, for example).
So this PR improves the performance of opening multiple buffers at once.

It does this by doing two things:

- It batches scan-requests in the worktree. When we search, we search
files in chunks of 64. Previously we'd handle all 64 scan requests
separately. The new code checks if the scan requests can be batched and
if so it, it does that.
- It batches `git status` calls when reloading the project entries for
the opened buffers. Instead of calling `git status` for each file, it
calls `git status` for a batch of files, and then extracts the status
for each file.

(It has to be said that I think the slow performance on `main` has been
a regression introduced over the last few months with the changes made
to project/worktree/git. I don't think it was this slow ~5 months ago.
But I also don't think it was this fast ~5 months ago.)

## Benchmarks

| Search | Before | After (without
https://github.com/zed-industries/zed/pull/16915) | After (with
https://github.com/zed-industries/zed/pull/16915)
|--------|--------|-------|------|
| `zed.dev` at `2b2a501192e78e`, searching for `<` (`4484` results) |
3.0s<br>2.9s<br>2.89s | 489ms<br>517ms<br>476ms | n/a |
| `zed.dev` at `2b2a501192e78e`, searching for `:` (`25886+` results) |
3.9s<br>3.9s<br>3.8s | 70ms<br>66ms<br>72ms | n/a |
| `zed` at `55dda0e6af`, searching for `<` (`10937+` results) |
10s<br>11s<br>12s | 500m<br>499ms<br>543ms | 3.4s<br>3.1s<br> |

(All results recorded after doing a warm-up run that would start
language servers etc.)

Release Notes:

- Performance of project-wide search has been improved by up to 10x.

---------

Co-authored-by: Antonio <antonio@zed.dev>
2024-08-27 11:59:59 +02:00
Conrad Irwin
88d36d8b9f
Restore missing fifo check (#16931)
Fixes a merge conflict between #16915 and #16039

Release Notes:

- N/A
2024-08-26 21:17:44 -06:00
0x2CA
9662829810
vim: Add Smart Relative Line Number (#16567)
Closes #16514

Release Notes:

- Added Vim: absolute numbering in any mode except `insert` mode

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-08-26 21:17:21 -06:00
Kyle Kelley
26d943287b
REPL: Refactor output (#16927)
Shuffle `outputs.rs` into individual `outputs/*.rs` files and start
documenting them more.

Release Notes:

- N/A
2024-08-26 18:03:06 -07:00
Max Brunsfeld
bea6786f14
Fix git repository state corruption when work dir's metadata is updated (#16926)
Fixes https://github.com/zed-industries/zed/issues/13176

Release Notes:

- Fixed an issue where git state would stop updating if the root
directory of a git repository was updated in certain ways
2024-08-26 17:46:50 -07:00
moshyfawn
2de420a67b
assistant: Fix model selector check icon overflow (#16716)
Release Notes:

- Fixed assistant model selector check icon overflow for long model
names
2024-08-26 17:32:32 -07:00
Kirill Bulatov
f64f85eb1e
Do not hold any tasks by default and no other terminals (#16847) 2024-08-27 01:48:34 +03:00
apricotbucket28
29745ae229
blade: Align rasterized path bounds to whole pixels (#16784)
Related: https://github.com/zed-industries/zed/pull/15822

| Before | After |
| --- | --- |
|
![image](https://github.com/user-attachments/assets/4c4ed1e7-b639-44ce-b318-8cdaaee809ee)|
![image](https://github.com/user-attachments/assets/c2757528-eef3-4d21-9522-39b2597a96b7)
|
|
![image](https://github.com/user-attachments/assets/b70ee108-bea6-4e5e-9583-392d1163d236)
|
![image](https://github.com/user-attachments/assets/aefc1f0c-7bba-4287-a3f9-bbb9befb6a4c)
|

Release Notes:

- N/A
2024-08-27 01:26:59 +03:00
Stanislav Alekseev
6afb36fd6f
Reorganize the context menu a bit (#16773)
Follow up to #16080 
The idea is that the current context menu became a bit top-heavy over
time. Let's reorganisze it into four sections:
1. Finding symbols
2. Editing using lsp and similar
3. Copy/Cut/Paste
4. Getting file location

Release Notes:

- Reorganized context menu to be a bit less top heavy and have more
logical parts

Before (a giant part on top and two small ones on the bottom):
<img width="248" alt="Screenshot 2024-08-23 at 21 02 33"
src="https://github.com/user-attachments/assets/87a136c7-df16-4032-ba02-dea087fd8445">

After (much more balanced):
<img width="250" alt="Screenshot 2024-08-23 at 21 01 28"
src="https://github.com/user-attachments/assets/4aa48b8a-99f3-4315-b325-625a47ecd5b8">
2024-08-27 01:22:58 +03:00
Toni Cárdenas
b99bf92452
Implement "join pane into next" (#16077)
Closes #12409

Release Notes:

- Added "join pane into next" action ([#12409](https://github.com/zed-industries/zed/issues/12409))


https://github.com/zed-industries/zed/assets/727422/00cc8599-e5d6-4fb8-9f0d-9b232d2210ef

---------

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
2024-08-27 00:51:51 +03:00
Max Brunsfeld
f417893a7b
Avoid unwrap of Worktree::root_entry in resolve_path_in_worktrees (#16917)
It looks like this unwrap was introduced in
https://github.com/zed-industries/zed/pull/16534.

I think a worktree's `root_entry` can be null if it represents a
non-existent file that has not yet been saved. I hit a panic due to the
`unwrap` a couple of times on nightly.

Release Notes:

- N/A
2024-08-26 14:01:56 -07:00
Conrad Irwin
ef22372f0b
SSH remote search (#16915)
Co-Authored-By: Max <max@zed.dev>

Release Notes:

- ssh remoting: add project search

---------

Co-authored-by: Max <max@zed.dev>
2024-08-26 14:47:02 -06:00
Peter Tripp
0332eaf797
Remove reference to Copilot plugin (#16916) 2024-08-26 16:43:22 -04:00
Peter Tripp
c2835df898
Improve buffers used by Zed for discoverability/visibility (#16906)
- Fixed Telemetry log being marked dirty.
- Fixed asset buffers (default settings and default keymap) showing 'untitled' in breadcrumbs
2024-08-26 16:42:35 -04:00
Marshall Bowers
93a7682659
collab: Count active users based on the tokens per minute measure (#16911)
This PR fixes an issue where active user counts were being computed
across _all_ measures instead of the per-minute measures.

We now compute them using the tokens per minute measure, as we're
concerned with usage in recent minutes.

Release Notes:

- N/A
2024-08-26 15:04:55 -04:00
Scott Lembcke
e2635a685e
Add command to copy current file:line for working with external tools (#14793)
Closes #14787.

I made a quick draft implementation of this feature request:
https://github.com/zed-industries/zed/issues/14787

I know how to use use gdb well, so lacking a built-in debugger is OK.
BUT... Speaking personally, setting breakpoints is 50% of what I want an
IDE to do for me when debugging. Having a feature where I can click,
copy, "b [paste]", is a huge step up from typing the whole thing in
manually. I figure this must be useful for other external tools, or even
just regular-human-communication too.

Open Questions:
* Does this belong in the right click menu? (I put it next to "Copy
Permalink" which is similar.)
* Probably not useful enough to get a default keymap?
* Relative vs absolute path?
* Does this need tests?

Release Notes:

- Added `editor: copy file location` command to copy the current file
location (FILE:LINE) to the clipboard
([#14787](https://github.com/zed-industries/zed/issues/14787)).

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-08-26 14:31:20 -04:00
TheCub3
2f08a0a28c
Fix fifo files hanging the project wide search (#16039)
Release Notes:

- Fixed the issue related to the project wide search being stuck when
project contains .fifo files
- Might potentially solve the following issue
https://github.com/zed-industries/zed/issues/7360
2024-08-26 10:40:20 -06:00
Piotr Osiewicz
aaddb73b28
assistant: Refesh message headers only for dirty messages (#16881)
We've noticed performance issues in long conversations with assistants;
the profiles pointed to slowiness in WrapMap (and indeed there were some
low hanging fruits that we picked up in
https://github.com/zed-industries/zed/pull/16761). That however did not
fully resolve the issue, as WrapMap still cracked through in profiles;
basically, the speedup I've landed has just moved the post elsewhere.

The higher level issue is that we were trying to refresh message headers
for all messages, irrespective of whether they've actually needed to be
updated. This PR fixes that by using `replace_blocks` API where
possible.

Release Notes:

- Improved performance of Assistant Panel with long conversations.
2024-08-26 18:16:23 +02:00
Thorsten Ball
afe4d8c8cc
yaml: Add single quotes to list of brackets (#16859)
Closes #16854

Release Notes:

- Single quotes are now auto-closable in YAML files
2024-08-26 18:02:40 +02:00
Nate Butler
7a964ff91a
Don't rely on relative path for docs preprocessor (#16883)
Reapplies #16700 with a corrected command. Now it no longer relies on a
relative path.

Thanks @maxdeviant for the quick help 🙏 

Release Notes:

- N/A
2024-08-26 11:43:13 -04:00
Berkus Decker
d67d44f600
extension: Add more logging when building extensions (#16794)
This helps debug what steps are taken and where
the compiled extension ended up.

Also remove duplicate "compiling Rust extension" / "compiling rust
extension" text - it's confusing.

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-08-26 11:18:06 -04:00
Peter Tripp
7936fe40ae
ollama: Support model context_size (num_ctx) >2048 (#16877) 2024-08-26 11:09:47 -04:00
Nate Butler
2a03dde538
Revert "Add docs_preprocessor crate to support Zed Docs" (#16880)
Temporarily revert #16700 to deal with this error:

`error: manifest path `../crates/docs_preprocessor/Cargo.toml` does not
exist` as it was causing the docs-preprocessor not to run, meaning
unexpanded templates were showing up in the public docs.

Reverts zed-industries/zed#16700

Release Notes:

- N/A
2024-08-26 11:06:25 -04:00
Nate Butler
46bb04a019
Add docs_preprocessor crate to support Zed Docs (#16700)
This PR adds a mdbook preprocessor for supporting Zed's docs.

This initial version adds the following custom commands:

**Keybinding** 

`{#kb prefix::action_name}` (e.g. `{#kb zed::OpenSettings}`)

Outputs a keybinding template like `<kbd
class="keybinding">{macos_keybinding}|{linux_keybinding}</kbd>`. This
template is processed on the client side through `mdbook` to show the
correct keybinding for the user's platform.

**Action** 

`{#action prefix::action_name}` (e.g. `{#action zed::OpenSettings}`)

For now, simply outputs the action name in a readable manner. (e.g.
zed::OpenSettings -> zed: open settings)

In the future we'll add additional modes for this template, like create
a standard way to render `{action} ({keybinding})`.

## Example Usage

```
To open the assistant panel, toggle the right dock by using the {#action workspace::ToggleRightDock} action in the command palette or by using the
{#kb workspace::ToggleRightDock} shortcut.
```

Release Notes:

- N/A
2024-08-26 10:50:40 -04:00
张小白
5ee4c036f9
assistant: Normalize line endings for prompts loaded from templates (#16808)
Closes #16804

Similar to #15708, when reading prompts from a template, both Windows
and Linux might end up with `CRLF (\r\n)` line endings, which can result
in a panic.

Release Notes:

- N/A
2024-08-26 10:34:20 -04:00
apricotbucket28
a28700a74d
theme: Fallback to opaque color for title_bar.inactive_background (#16833)
Fixes https://github.com/zed-industries/zed/issues/16699, fixes
https://github.com/zed-industries/zed/issues/15112, fixes
https://github.com/zed-industries/zed/issues/14955

| Before | After |
|--------|--------|
|
![image](https://github.com/user-attachments/assets/3c93dc02-3421-4fd8-b34e-c54644202caa)
|
![image](https://github.com/user-attachments/assets/f938d77f-7e9b-4c1f-9beb-38ff77a5fa93)
|

Release Notes:

- Linux: Fixed title bar becoming transparent when the window lost
focus.
2024-08-26 10:26:47 -04:00
Kirill Bulatov
55dda0e6af
A set of small fixes (#16849)
* Linux Clippy lints fixed
* Zed local tasks are now simpler to rerun
* Zed's `release-fast` build profile keeps the debug info so it's
possible to properly debug things without altering the sources

Release Notes:

- N/A
2024-08-26 02:24:08 +03:00
Kirill Bulatov
1a2a538366
Improve Linux terminal keymap and context menu (#16845)
Follow-up https://github.com/zed-industries/zed/pull/16085 that fixes
the search deploy to be actually a part of the terminal-related
bindings.

Part of https://github.com/zed-industries/zed/issues/16839

Also 

* fixes few other bindings to use `shift` and avoid conflicts with the
existing key bindings.
* adds terminal inline assist to the context menu and makes both the
menu and the button to dynamically adjust to `assist.enabled` settings
change

It is still unclear to me, why certain labels for certain bindings are
wrong (it's still showing `ctrl-w` for closing the terminal tab, and
`shift-insert` instead of `ctrl-shift-v` for Paste, while Insert is near
and has a `ctrl-shift-c` binding shown) but at least the keys work now.

Release notes: 
- Improved Linux terminal keymap and context menu
2024-08-26 01:01:46 +03:00
Kirill Bulatov
28271a9a36
Display buffer/project search entries in the outline panel (#16589)
Prototypes a way to display new entities in the outline panel, making it
less outline.
The design is not final and might be adjusted, but the workflow seems to
be solid enough to keep and iron it out.

* Now, when any project search buffer is activated (multi buffer mode),
or buffer search is open (singleton buffer mode, but is available for
search usages multi buffer too — in that case buffer search overrides
multi buffer's contents display), outline panel displays all search
matches instead of the outline items.

Outline items are not displayed at all during those cases, unless the
buffer search is closed, or a new buffer gets opened, of an active
buffer search matches zero items.


https://github.com/user-attachments/assets/4a3e4faa-7f75-4522-96bb-3761872c753a


* For the multi buffer mode, search matches are grouped under
directories and files, same as outline items

![Screenshot 2024-08-21 at 14 55
01](https://github.com/user-attachments/assets/6dac75e4-be4e-4338-917b-37a32c285b71)


* For buffer search , search matches are displayed one under another


![image](https://github.com/user-attachments/assets/9efcff85-d4c7-4462-9ef5-f76b08e59f20)


For both cases, the entire match line is taken and rendered, with the
hover tooltip showing the line number.
So far it does not look very bad, but I am certain there are bad cases
with long lines and bad indents where it looks not optimal — this part
most probably will be redesigned after some trial.
Or, maybe, it's ok to leave the current state if the horizontal
scrollbar is added?

Clicking the item navigates to the item's position in the editor.
Search item lines are also possible to filter with the outline panel's
filter input.

* Inline panel is now possible to "pin" to track a currently active
editor, to display outlines/search results for that editor even if
another item is activated afterwards:


![image](https://github.com/user-attachments/assets/75fb78c3-0e5f-47b4-ba3a-485c71d7e342)

This is useful in combination with project search results display: now
it's possible to leave the search results pinned in the outline panel
and jump to every search result and back.

If the item the panel was pinned to gets closed, the panel gets back to
its regular state, showing outlines/search results for a currently
active editor.


Release Notes:

- Added a way to display buffer/project search entries in the outline
panel
2024-08-25 21:40:02 +03:00
Piotr Osiewicz
5e55d5507f
language: Do not fetch diagnostics when iterating over text without language awareness (#16824)
This PR fixes a regression from
https://github.com/zed-industries/zed/pull/15646 where we've started
fetching diagnostic spans unconditionally (whereas previously that
wasn't done when iterating over raw text).

Closes #16764

Release Notes:

- Fixed performance regression in handling buffers with large quantities
of diagnostics.
2024-08-25 18:02:54 +02:00
Walter de Jong
14f8d3a33a
gpui: Send correct kill signal on Linux (#16797)
should be kill -0 (zero) instead

Related to #14291 and #14310

Release Notes:

- N/A
2024-08-24 22:11:06 +03:00
Marshall Bowers
340662e2f7
collab: Add lifetime spending limit for LLM usage (#16780)
This PR adds a lifetime spending limit on LLM usage.

Exceeding this limit will prevent further use of the Zed LLM provider.

Currently the cap is $1,000.

Release Notes:

- N/A
2024-08-23 16:41:16 -04:00
Affan Shahid
352c95cf0d
Add injections for GraphQL template literals and function calls (#16368)
This PR adds syntax highlighting support for `gql` and `graphql` tagged
literals. It also adds highlighting for `graphql()` and `gql()` function
calls, which are another common way to define queries.

Note: I am using the
[`graphql`](https://github.com/11bit/zed-extension-graphql) extension to
provide syntax highlighting

Before:
<img width="413" alt="image"
src="https://github.com/user-attachments/assets/114a98be-9790-4cdf-ba98-553f777ff08a">

After:
<img width="418" alt="image"
src="https://github.com/user-attachments/assets/98fc5dfd-d1a3-45c4-be8e-063cf68b6e6e">

Release Notes:

- Added syntax highlighting for `graphql` tagged template literals and
function calls in javascript, typescript and tsx languages.
2024-08-23 12:36:45 -06:00
Jason Lee
938d93a64c
gpui: Add truncate and text_ellipsis to TextStyle (#14850)
Release Notes:

- N/A

Ref issue #4996

## Demo

```
cargo run -p gpui --example text_wrapper 
```



https://github.com/user-attachments/assets/a7fcebf7-f287-4517-960d-76b12722a2d7

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-08-23 14:02:51 -04:00
Ihnat
12dda5fa1b
Add Format Buffer action to mouse context menu (#16080)
Closes #15891 

Release Notes:

- Added "Format Buffer" action to the right-click menu within a buffer.

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-08-23 13:44:34 -04:00
Piotr Osiewicz
783cccf95d
WIP: Improve performance of Wrap Map (#16761)
We've ran into performance issues when reinserting new blocks into the
assistant panel; in profiles WrapMap showed up, as we try to query wrap
boundaries over and over, which is a hidden O(n^2) - for each block, we
may potentially look at all of the Wraps. This PR alleviates this issue
by storing away previously resolved wrap range; consecutive iterations
can often reuse it.
This should help with performance of Assistant Panel with long
conversations.

Release Notes:

- Improved performance of assistant panel with large # of text.
2024-08-23 18:59:30 +02:00
张小白
30a677e257
theme: Change autocomplete value for *_font_fallbacks (#16759)
This PR follows up #16466, changes the default value used when
autocompleting the `ui_font_fallbacks` and `ui_font_fallbacks` settings
from `null` to `[]`.

Special thanks to @maxdeviant for the guidance on writing better code!


Release Notes:

- N/A
2024-08-23 12:12:43 -04:00
Marshall Bowers
935cf542ae
Fix impersonation in local development (#16755)
This PR fixes impersonation in local development by fetching the user
from the GitHub API so we can get their `github_user_id`.

The `github_user_id` is now required after #16704.

Since this is just a development flow, we're fetching the user on the
client as opposed to making changes on the server.

This request uses the `GITHUB_TOKEN` environment variable for
authentication, if it exists, or will make an unauthenticated GitHub API
request.

Release Notes:

- N/A
2024-08-23 10:49:34 -04:00
Kevin Sweet
5e869dadf9
Fix ctrl-d/u issues with scroll_beyond_last_line off (#15395)
Closes #15356

Release Notes:

- vim: Fixed issues with `ctrl-d`/`ctrl-u` when
`scroll_beyond_last_line` is set to `off`
([#15356](https://github.com/zed-industries/zed/issues/15356)).


https://github.com/user-attachments/assets/d3166393-4a4e-4195-9db6-3ff1d4aeec78

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-08-23 08:34:40 -06:00