Commit Graph

2900 Commits

Author SHA1 Message Date
Kirill Bulatov
c5f43ee81c
Forbid signature popovers when completion menu is open (#17009)
Closes https://github.com/zed-industries/zed/issues/16748

Release Notes:

- Fixed signature info popovers appearing when completion menu is open
2024-08-28 18:25:07 +03: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
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
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
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
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
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
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
Conrad Irwin
0fd5030297
Rename is_local to is_local_or_ssh (#16717)
Release Notes:

- N/A
2024-08-22 21:32:51 -06:00
Conrad Irwin
fb35f15526
Fix linked ranges + multi-cursor (#16707)
Closes: #16695

Release Notes:

- Fixed double edits when a multi-cursor is in a linked editing range
2024-08-22 17:16:07 -06:00
0x2CA
abb5800d20
Add bounded soft wrap (#16586)
Closes #14700 #8164

Release Notes:

- Added `soft_wrap` value `bounded`,EditorWidth and PreferredLineLength
min value

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-08-22 12:51:32 -06:00
Conrad Irwin
c697eaba82
Use split direction preferences more (#16679)
Use new split direction preferences in more places (#16345)

Release Notes:

- N/A
2024-08-22 11:13:33 -06:00
Thorsten Ball
db0c1fd592
vim: Add 'gf' command, make files cmd-clickable (#16534)
Release Notes:

- vim: Added `gf` command to open files under the cursor.
- Filenames can now be `cmd`/`ctrl`-clicked, which opens them.

TODOs:

- [x] `main_test.go` <-- works
- [x] `./my-pkg/my_pkg.go` <-- works
- [x] `../go.mod` <-- works
- [x] `my-pkg/my_pkg.go` <-- works
- [x] `my-pkg/subpkg/subpkg_test.go` <-- works
- [x] `file\ with\ space\ in\ it.txt` <-- works
- [x] `"file\ with\ space\ in\ it.txt"` <-- works
- [x] `"main_test.go"` <-- works
- [x] `/Users/thorstenball/.vimrc` <-- works, but only locally
- [x] `~/.vimrc` <--works, but only locally
- [x] Get it working over collab
- [x] Get hover links working

Demo:



https://github.com/user-attachments/assets/26af7f3b-c392-4aaf-849a-95d6c3b00067

Collab demo:




https://github.com/user-attachments/assets/272598bd-0e82-4556-8f9c-ba53d3a95682
2024-08-22 14:27:11 +02:00
Conrad Irwin
eb9eae09b1
Fix manual copilot with show_inline_completions: false (#16621)
For @mre and friends!

Release Notes:

- Fixed manually trigging completions when `show_inline_completions:
false`
2024-08-21 20:27:19 -06:00
Thorben Kröger
f85ca387a7
clangd: Implement switch source/header extension (#14646)
Release Notes:

- Added switch source/header action for clangd language server (fixes
[#12801](https://github.com/zed-industries/zed/issues/12801)).

Note: I'm new to both rust and this codebase. I started my
implementation by copying how rust analyzer's "expand macro" LSP
extension is implemented. I don't yet understand some of the code I
copied (mostly the way to get the `server_to_query` in `clangd_ext.rs`
and the whole proto implementation).

---------

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
2024-08-21 22:15:08 +03:00
Conrad Irwin
09c698d8d7
Fix a panic when diagnostics contain multiple links (#16601)
Follow up from #14518

Release Notes:

- Fixed a panic when diagnostics contain multiple links
2024-08-21 11:18:43 -06:00
Conrad Irwin
36d51fe4a5
vim: Improve lifecycle (#16477)
Closes #13579

A major painpoint in the Vim crate has been life-cycle management. We
used to have one global Vim instance that tried to track per-editor
state; this led to a number of subtle issues (e.g. #13579, the mode
indicator being global, and quick toggling between windows letting vim
mode's notion of the active editor get out of sync).

This PR changes the internal structure of the code so that there is now
one `Vim` instance per `Editor` (stored as an `Addon`); and the global
stuff is separated out. This fixes the above problems, and tidies up a
bunch of the mess in the codebase.

Release Notes:

* vim: Fixed accidental visual mode in project search and go to
references
([#13579](https://github.com/zed-industries/zed/issues/13579)).
2024-08-20 20:48:50 -06:00
Sinan Gençoğlu
ff7017c308
Replace lazy_static with std::sync::LazyLock (#16066)
Closes #15860 

Since rust std now supports LazyLock replacing lazy_static with it
reduce the external dependency.

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-08-20 14:27:33 -04:00
Matthew D. Scholefield
5c0d800b21
Make unnecessary code fade configurable (#14442)
This PR allows configuring the intensity of code fade applied to unused
code (relates to #4785).

_Note: Right now I included it as a top level config which might be a
little out of place (but is easiest to instrument). Open for suggestions
on where else it would be better suited for._

_Note 2: I am unfamiliar with the codebase. Feel free to either close
this PR and re-implement in a better way or suggest high level changes
if I'm approaching anything wrong :)._

Release Notes:

- Added `unnecesary_code_fade` setting to control how strongly to fade
unused code.

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-08-20 13:13:27 -04:00
Kirill Bulatov
e482fcde5b
Fall back to FindAllReferences if GoToDefinition have not navigated (#16512)
Follow-up of https://github.com/zed-industries/zed/pull/9243 

Release Notes:

- N/A

---------

Co-authored-by: Alex Kladov <aleksey.kladov@gmail.com>
2024-08-20 14:56:19 +03:00
Thorsten Ball
037cf1393c
assistant: Undo workflow step when buffer is discarded (#16465)
This fixes a weird bug:

1. Use `/workflow` in assistant
2. Have it generate a step that modifies a file
3. Either (a) select the step in the assistant and have it auto-insert
newlines (b) select "Transform" to have the step applied
4. Close the modified file in the editor ("Discard")
5. Re-open the file
6. BUG: the changes made by assistant are still there!

The reason for the bug is that the assistant keeps references to buffers
and they're not closed/reloaded when closed/reopened.

To fix the bug we now rollback the applied workflow steps when
discarding a buffer.

(This does *not* yet fix the issue where a workflow step inserts a new
buffer into the project/worktree that does not show up on the file
system yet but in `/file` and hangs around until Zed is closed.)


Release Notes:

- N/A

Co-authored-by: Bennet <bennet@zed.dev>
2024-08-19 18:42:49 +02:00
Kirill Bulatov
f1a2638d29
Do not enable copilot for always read-only editors (#16356)
Release Notes:

- N/A
2024-08-16 17:22:47 +03:00
Kirill Bulatov
c45adce2e3
Run slash commands both on enter and on argument completion that requires it (#16283)
Release Notes:

- N/A
2024-08-15 19:36:30 +03:00
Kirill Bulatov
e8bae839ed
Disable forceful sorting of the slash command argument completions (#16240)
Also bubble up the current active tab's path in the \tab argument
completions.

Release Notes:

- N/A
2024-08-14 22:34:25 +03:00
Stanislav Alekseev
aa31f9ded0
Fix diagnostic popups not having a max width (#16092)
They were probably broken by #14518 

Release Notes:

- N/A
2024-08-14 16:37:35 +02:00
Mikayla Maki
97469cd049
Improve slash commands (#16195)
This PR:

- Makes slash commands easier to compose by adding a concept,
`CompletionIntent`. When using `tab` on a completion in the assistant
panel, that completion item will be expanded but the associated command
will not be run. Using `enter` will still either run the completion item
or continue command composition as before.
- Fixes a bug where running `/diagnostics` on a project with no
diagnostics will delete the entire command, rather than rendering an
empty header.
- Improves the autocomplete rendering for files, showing when
directories are selected and re-arranging the results to have the file
name or trailing directory show first.

<img width="642" alt="Screenshot 2024-08-13 at 8 12 43 PM"
src="https://github.com/user-attachments/assets/97c96cd2-741f-4f15-ad03-7cf78129a71c">


Release Notes:

- N/A
2024-08-13 23:06:07 -07:00
Richard Feldman
b1a581e81b
Copy/paste images into editors (Mac only) (#15782)
For future reference: WIP branch of copy/pasting a mixture of images and
text: https://github.com/zed-industries/zed/tree/copy-paste-images -
we'll come back to that one after landing this one.

Release Notes:

- You can now paste images into the Assistant Panel to include them as
context. Currently works only on Mac, and with Anthropic models. Future
support is planned for more models, operating systems, and image
clipboard operations.

---------

Co-authored-by: Antonio <antonio@zed.dev>
Co-authored-by: Mikayla <mikayla@zed.dev>
Co-authored-by: Jason <jason@zed.dev>
Co-authored-by: Kyle <kylek@zed.dev>
2024-08-13 13:18:25 -04:00
CharlesChen0823
fe190359d5
editor: Add revert file action to command palette (#16012)
Release Notes:

- Added an `editor::RevertFile` action
2024-08-13 14:44:41 +03:00
Stanislav Alekseev
c2b254a67a
Fallback to using tree-sitter when determining ranges for info popovers (#16062)
Closes #15382

Release Notes:

- Added fallback to a smallest tree sitter node when hovering over a
symbol
2024-08-13 12:01:14 +02:00
Kirill Bulatov
3bebb8b401
Allow to cycle through center/top/bot scroll positions (#16134)
On top of `editor::ScrollCursorCenter`, `editor::ScrollCursorTop`,
`editor::ScrollCursorBottom` actions, adds an
`editor::ScrollCursorCenterTopBottom` one, that allows using a single
keybinding to scroll between positions on the screen.

The implementation matches a corresponding Emacs feature: there's a
timeout (1s) that is kept after every switch, to allow continuously
changing the positions, center (initial) -> top -> bottom
Scrolling behavior is the same as the existing actions (e.g. editor will
ignore scroll to bottom, if there's not enough space above).

After 1s, next position is reset to the initial, center, one.


Release Notes:

- Added an `editor::ScrollCursorCenterTopBottom` action for toggling
scroll position with a single keybinding

---------

Co-authored-by: Alex Kladov <aleksey.kladov@gmail.com>
2024-08-13 00:32:30 +03:00
Kirill Bulatov
f398ecc3fb
Allow inserting text into the editor via the action (#16131)
Improves workflows, based on the keymaps that group actions behind a
certain symbol.
E.g.

```json5
", o k": "zed::OpenKeymap",
", o K": "zed::OpenDefaultKeymap",
// other `,`-based keymaps
```

Now, it's possible to do 
```json
", ,": ["editor::HandleInput", ","]
```

and type `,` without waiting for the timeout due to `,`-based bindings.

Release Notes:

- Add an `editor::HandleInput` action to ease typing symbols that are
part of keymaps. E.g. if `, o k` keybinding is bound, `", ,":
["editor::HandleInput", ","]` would allow to type `,` without timeouts.

---------

Co-authored-by: Alex Kladov <aleksey.kladov@gmail.com>
2024-08-13 00:02:52 +03:00
Massimo Mund
e783142528
Fix vertical_scroll_margin not being capped for large vertical_scroll_margin values (#15473)
When switching to function definitions in a new buffer the
`AutoscrollStrategy::Focused` being emitted to scroll to the found
location.
If a large value `vertical_scroll_margin` (e.g.: 99) is set, this leads
to an incorrectly calculated position and the new buffer opens in the
wrong place.

In `autoscroll_vertically()` there is a margin calculated to cap the
value of `vertical_scroll_margin` for certain AutoscrollStrategies. This
margin is being used in `AutoscrollStrategy::Fit` and
`AutoscrollStrategy::Newest` but was probably forgotten for
`AutoscrollStrategy::Focused`.

- Might fix [#15101](https://github.com/zed-industries/zed/issues/15101)

Release Notes:

- N/A
2024-08-09 09:35:57 +02:00
Conrad Irwin
bd59af1df5
vim: Support ranges in command (#15985)
The most requested feature here is "search and replace in visual mode",
but as a happy side effect we can now support things like :2,12j to join
those lines, and much much more.



Release Notes:

- vim: Added support for range syntax in command
([#9428](https://github.com/zed-industries/zed/issues/9428)).
- vim: Prefill command with `:'<,'>` from visual mode
([#13535](https://github.com/zed-industries/zed/issues/13535)).
2024-08-08 21:47:27 +01:00
Piotr Osiewicz
73fb8277fc
assistant: Polish /workflow and steps UI (#15936)
Fixes #15923
Release Notes:

- Assistant workflow steps can now be applied and reverted directly from
within the assistant panel.

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Antonio <antonio@zed.dev>
2024-08-08 15:46:33 +02:00
Nathan Sobo
da8d1306af
Open workflow step editors as preview tabs (#15928)
This PR opens workflow step editors as preview tabs and closes them upon
exiting the step if they are still in preview mode and they weren't
already open before entering the step.

Making this work was tricky, because we often edit the buffer as part of
displaying the workflow step suggestions to create empty lines where we
can generate. We undo these edits if the transformation is not applied,
but they were causing the preview to be dismissed.

After trying a few approaches, I decided to give workspace `Item`s a
`preserve_preview` method that defaults to false. When the workspace
sees an edit event for the item, it checks if the item wants to preserve
its preview. For buffers, after editing, you can call `refresh_preview`,
which sets a preview version to the current version of the buffer. Any
edits after this version will cause preview to not be preserved.

One final issue is with async auto-indent. To ensure these async edits
don't dismiss the preview, I automatically refresh the preview version
if preview was preserved prior to performing the auto-indent. The
assumption is that these are edits created by other edits, and if we
didn't want to dismiss the preview with the originating edits, then the
auto-indent edits shouldn't dismiss it either.

Release Notes:

- N/A

---------

Co-authored-by: Jason <jason@zed.dev>
2024-08-07 19:33:58 -06:00
Antonio Scandurra
104d7adc49
Don't insert unnecessary space below the end of an inline transformation (#15865)
We achieved this by allowing block decorations to have a height of `0`
and superimposing the border on top of the line, as opposed to carving
out space below it.

Release Notes:

- N/A

---------

Co-authored-by: Jason <jason@zed.dev>
2024-08-06 19:00:23 +02:00
Luis Cossío
7b5fdcee7f
lsp: Support Goto Declaration (#15785)
Adds support for [Goto
Declaration](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_declaration)
LSP command.

I am particularly interested in [this for Rust
projects](https://rust-analyzer.github.io/manual.html#go-to-declaration),
to be able to navigate to the place where a trait method is declared,
coming from a trait method implementation.

I noticed this was something I could do in VSCode before, but was
somehow missing is Zed. Thanks to the already existing infrastructure
for Goto Definition, I just followed and copy-paste-adapted it for Goto
Declaration.

As a bonus, I added `ctrl-F12` and `alt-ctrl-F12` as default macOS
keybindings for `GoToDeclaration` and `GoToDeclarationSplit`,
respectively. They are not keybindings from another editor, but I
figured they made sense to be grouped along with the other *F12
commands.

### Release Notes:

- Added "Go to declaration" editor action.
- vim: Breaking change to keybindings after introduction of the `Go to
declaration` editor action. The new keybindings are the following (and
can be found [here](https://zed.dev/docs/vim), alongside the other key
bindings):
  - `g d` - Go to definition
  - `g D` - Go to declaration
  - `g y` - Go to type definition
  - `g I` - Go to implementation




https://github.com/user-attachments/assets/ee5c10a8-94f0-4e50-afbb-6f71db540c1b

---------

Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
2024-08-06 11:20:51 +02:00
Kyle Kelley
4528e9d582
repl: Create better terminal output for REPL stdio (#15715)
Rely on our implementation of a GPUI powered alacritty terminal to
render stdout & stderr from the repl.

Release Notes:

- Fixed ANSI escape code and carriage return handling in repl outputs
(https://github.com/zed-industries/zed/issues/15640,
https://github.com/zed-industries/zed/issues/14855)


https://github.com/user-attachments/assets/bd3f1584-863a-4afa-b60b-9d222a830ff8

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
2024-08-03 05:48:16 -07:00
Piotr Osiewicz
e2eb68abca
chore: Remove leftover code from #15646 (#15697)
Release Notes:

- N/A
2024-08-02 20:08:57 +02:00
Piotr Osiewicz
ad11d83724
Skip over folded regions when iterating over multibuffer chunks (#15646)
This commit weaves through new APIs for language::BufferChunks, multi_buffer::MultiBufferChunks and inlay_map::InlayChunks that allow seeking with an upper-bound. This allows us to omit doing syntax highligting and looking up diagnostics for folded ranges. This in turn directly improves performance of assistant panel with large contexts.

Release Notes:

- Fixed poor performance when editing in the assistant panel after
inserting large files using slash commands

---------

Co-authored-by: Max <max@zed.dev>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2024-08-02 19:51:26 +02:00
Nathan Sobo
1b85793ebc
Fix inline assist deletion blocks (#15651)
After the changes in #15536, block decorations need to be given an
explicit height if their content doesn't consume height on its own. We
missed that inline transformation deletion decorations didn't do this,
creating weird results. This fixes the issue and prevents block
decorations from ever having a zero height. That helps avoid major
weirdness, but this still a bit of a gotcha.

We need to back port this to Preview Channel (0.147.x)

Release Notes:

- N/A

---------

Co-authored-by: Antonio <antonio@zed.dev>
2024-08-01 22:41:25 +02:00
Kirill Bulatov
c98918aed8
Properly calculate y offsets for multi buffer context menus (#15594)
Follow-up of https://github.com/zed-industries/zed/pull/14727

Release Notes:

- Fixed multi buffer context menus not showing properly

Co-authored-by: Max Brunsfeld <max@zed.dev>
2024-08-01 12:35:46 +03:00
Antonio Scandurra
5b1ea7eda0
Clean up inline assist editor rendering (#15536)
Release Notes:

- N/A

---------

Co-authored-by: Nathan <nathan@zed.dev>
Co-authored-by: Max <max@zed.dev>
2024-07-31 17:43:08 +02:00
Jason Lee
0c8b17d252
Hide blinking cursor when window is deactivated (#15408)
## Before 

https://github.com/user-attachments/assets/affb8407-a20e-4258-a8f7-b271da5d7b77

## After

https://github.com/user-attachments/assets/654fe7b9-330a-40c8-8885-72e69fa85b0a

Release Notes:

- Hide blinking cursor when window is deactivated ([4710](https://github.com/zed-industries/zed/issues/4710))
2024-07-30 10:49:15 +03:00
Antonio Scandurra
02c51c9b56
Fix rendering of focused offscreen block when scrolled to bottom (#15449)
This change fixes a bug when a block is focused but offscreen.
Previously, we used the last row, but this caused a spurious block to be
rendered when scrolled to the end of the file. With this change we
always render off-screen blocks below the editor's clipping box.

Release Notes:

- Fixed a bug that caused the inline assistant to be displayed twice in
certain circumstances.

Co-authored-by: Nathan <nathan@zed.dev>
2024-07-29 20:39:21 +02:00
Ephram
78a2539d59
Selectable diagnostic popover text (#14518)
Release Notes:

- Added the ability to select and copy text from diagnostic popovers

- Fixed #12695




https://github.com/user-attachments/assets/b896bacf-ecbc-48f5-8228-a3821f0b1a4e

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-07-28 23:13:13 -06:00
Marshall Bowers
f1d777434b
ui: Give NumericSteppers an ID (#15344)
This PR gives the `NumericStepper` component an ID.

This prevents the UI and buffer font size settings controls from having
their increment/decrement buttons visually change when the other one is
pressed.

Release Notes:

- N/A
2024-07-27 13:02:27 -04:00
Calin Martinconi
3751f67730
fix: Typos (#15313)
Fixed typos in the code base according with output from `codespell`
tool.

Release Notes:

- N/A
2024-07-26 17:52:37 -07:00
Mikayla Maki
a1bd7a1297
Feature/fallback fonts (#15306)
Supersedes https://github.com/zed-industries/zed/pull/12090

fixes #5180
fixes #5055

See original PR for an example of the feature at work.

This PR changes the settings interface to be backwards compatible, and
adds the `ui_font_fallbacks`, `buffer_font_fallbacks`, and
`terminal.font_fallbacks` settings.

Release Notes:

- Added support for font fallbacks via three new settings:
`ui_font_fallbacks`, `buffer_font_fallbacks`, and
`terminal.font_fallbacks`.(#5180, #5055).

---------

Co-authored-by: Junkui Zhang <364772080@qq.com>
2024-07-26 16:42:21 -07:00