Commit graph

3259 commits

Author SHA1 Message Date
Danilo Leal
da1c3d8b40
Add hover_line_number color token (#23279)
This enables having a dedicated color for the line number hover state.
That's relevant because line numbers can now be clicked to jump to
cursor location in multibuffers.

Release Notes:

- N/A

---------

Co-authored-by: João Marcos <marcospb19@hotmail.com>
2025-01-17 09:24:42 -03:00
CharlesChen0823
f0a07b5eff
editor: Fix editor: copy path not working in SSH remoting (#23235)
Closes #23135 

Release Notes:

- Fix `editor: copy path` not work in ssh remote
2025-01-16 20:47:47 -07:00
João Marcos
7ee78a4d35
Fix active line number highlight (#23266)
Closes #22734

Release Notes:

- Fixed active line number highlight.

---------

Co-authored-by: Danilo <danilo@zed.dev>
2025-01-17 01:23:28 +00:00
Piotr Osiewicz
795376cb07
ui: Track changes to UI font size made via actions with settings (#23265)
Some checks are pending
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Linux) Build Remote Server (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Linux x86_x64 release bundle (push) Blocked by required conditions
CI / Linux arm64 release bundle (push) Blocked by required conditions
CI / Auto release preview (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Script / ShellCheck Scripts (push) Waiting to run
Fixes #5380

Closes #5380

Release Notes:

- Font size changes made with actions are now persisted in user settings
2025-01-16 23:28:18 +00:00
Cole Miller
b7726238ad
Move git state to Project (#23208)
This restores its visibility outside of git_ui, which we'll need soon,
while preserving its per-project character.

Release Notes:

- N/A
2025-01-16 13:57:28 -05:00
Michael Sloan
55e1e831a1
Make language registry optional in parse_markdown (#23221)
Motivation for this is using markdown for keymap error notifications in
#23113

Release Notes:

- N/A
2025-01-16 03:56:46 -07:00
Cole Miller
a41d72ee81
Represent git statuses more faithfully (#23082)
Some checks are pending
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Linux) Build Remote Server (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Linux x86_x64 release bundle (push) Blocked by required conditions
CI / Linux arm64 release bundle (push) Blocked by required conditions
CI / Auto release preview (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Script / ShellCheck Scripts (push) Waiting to run
First, parse the output of `git status --porcelain=v1` into a
representation that can handle the full "grammar" and doesn't lose
information.

Second, as part of pushing this throughout the codebase, expand the use
of the existing `GitSummary` type to all the places where status
propagation is in play (i.e., anywhere we're dealing with a mix of files
and directories), and get rid of the previous `GitSummary ->
GitFileStatus` conversion.

- [x] Synchronize new representation over collab
  - [x] Update zed.proto
  - [x] Update DB models
- [x] Update `GitSummary` and summarization for the new `FileStatus`
- [x] Fix all tests
  - [x] worktree
  - [x] collab
- [x] Clean up `FILE_*` constants
- [x] New collab tests to exercise syncing of complex statuses
- [x] Run it locally and make sure it looks good

Release Notes:

- N/A

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
Co-authored-by: Conrad <conrad@zed.dev>
2025-01-16 00:01:38 +00:00
Kirill Bulatov
22f5fd53ca
Rework inlay hint cache tests (#23156)
Closes https://github.com/zed-industries/zed/issues/7928

* uncomments and fixes all inlay hint cache tests
* fixes a bug, where invalidated range did not store the new queried
ranges in the cache: this resulted in extra requests in editor that do
not fit into the screen
* comments a peculiarity with the `RefreshInlayHints` event: all editors
react to that when a new language server is inserted, even though
certain editors are not related to the new language server
* fixes handling of inlay hints for the same position: now the same
order is kept, as in the language server's response
(https://github.com/zed-industries/zed/issues/7928)
* queries for hints when on excerpt(s) expansion

Release Notes:

- Fixed inlay hints handling for the same position
2025-01-15 20:13:15 +02:00
Cole Miller
74620e611e
Improve performance of go-to-diagnostic when many diagnostics are present (#23166)
Instead of eagerly calling `to_offset` on the anchor ranges for each
diagnostic in the direction of the search, work lazily in terms of
anchors and convert to offsets at the very end.

Release Notes:

- N/A
2025-01-15 15:02:35 +00:00
Thorsten Ball
b1cfc116d0
edit prediction: Fix width of completion item (#23177)
Some checks are pending
CI / check_docs_only (push) Waiting to run
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Blocked by required conditions
CI / (Linux) Run Clippy and tests (push) Blocked by required conditions
CI / (Linux) Build Remote Server (push) Blocked by required conditions
CI / (Windows) Run Clippy and tests (push) Blocked by required conditions
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
CI / Auto release preview (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Script / ShellCheck Scripts (push) Waiting to run
Release Notes:

- N/A

Co-authored-by: Agus <agus@zed.dev>
Co-authored-by: Bennet <bennet@zed.dev>
Co-authored-by: Antonio <antonio@zed.dev>
2025-01-15 14:15:50 +00:00
Antonio Scandurra
da8e65b3e5
Show loading state for predictions (#23172)
Release Notes:

- N/A

---------

Co-authored-by: Thorsten <thorsten@zed.dev>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Agus Zubiaga <hi@aguz.me>
2025-01-15 13:05:18 +00:00
Thorsten Ball
bf75b33464
vim: Fix inline completions not disappearing in normal mode (#23176)
Closes #23042

Release Notes:

- Fixed inline completions (Copilot, Supermaven, ...) still being
visible sometimes after leaving Vim's insert mode.
2025-01-15 12:44:56 +00:00
Joseph T. Lyons
077767a3b0
Migrate more events to telemetry::event (#22178)
Some checks are pending
CI / check_docs_only (push) Waiting to run
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Blocked by required conditions
CI / (Linux) Run Clippy and tests (push) Blocked by required conditions
CI / (Linux) Build Remote Server (push) Blocked by required conditions
CI / (Windows) Run Clippy and tests (push) Blocked by required conditions
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
CI / Auto release preview (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Script / ShellCheck Scripts (push) Waiting to run
Release Notes:

- N/A
2025-01-14 21:00:24 +00:00
Thorsten Ball
a67709629b
zeta: Various product fixes before Preview release (#23125)
Various fixes for Zeta and one fix that's visible to non-Zeta-using
users of inline completions.

Release Notes:

- Changed inline completions (Copilot, Supermaven, ...) to not show up
in empty buffers.

---------

Co-authored-by: Antonio <antonio@zed.dev>
Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Bennet <bennet@zed.dev>
2025-01-14 14:30:27 +00:00
Piotr Osiewicz
1b3b825c7f
lsp: Parse LSP messages on background thread - again (#23122)
Some checks are pending
CI / check_docs_only (push) Waiting to run
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Blocked by required conditions
CI / (Linux) Run Clippy and tests (push) Blocked by required conditions
CI / (Linux) Build Remote Server (push) Blocked by required conditions
CI / (Windows) Run Clippy and tests (push) Blocked by required conditions
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
CI / Auto release preview (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Script / ShellCheck Scripts (push) Waiting to run
This is a follow-up to #12640.
While profiling latency of working with a project with 8192 diagnostics
I've noticed that while we're parsing the LSP messages into a generic
message struct on a background thread, we can still block the main
thread as the conversion between that generic message struct and the
actual LSP message (for use by callback) is still happening on the main
thread.
This PR significantly constrains what a message callback can use, so
that it can be executed on any thread; we also send off message
conversion to the background thread. In practice new callback
constraints were already satisfied by all call sites, so no code outside
of the lsp crate had to be adjusted.

This has improved throughput of my 8192-benchmark from 40s to send out
all diagnostics after saving to ~20s. Now main thread is spending most
of the time updating our diagnostics sets, which can probably be
improved too.

Closes #ISSUE

Release Notes:

- Improved app responsiveness with huge # of diagnostics.
2025-01-14 13:50:54 +00:00
Marshall Bowers
93f117b21a
Improve registration for Assistant code action providers (#23099)
This PR is a follow-up to
https://github.com/zed-industries/zed/pull/22911 to further improve the
registration of code action providers for the Assistant in order to
prevent duplicates.

The `CodeActionProvider` trait now has an `id` method that is used to
return a unique ID for a code action provider. We use this to prevent
registering duplicates of the same provider.

The registration of the code action providers for Assistant1 and
Assistant2 have also been reworked. Previously we were not call the
registration function—and thus setting up the subscriptions—until we
resolved the feature flags. However, this could lead to the registration
happening too late for existing workspace items.

We now perform the registration right away and then remove the undesired
code action providers once the feature flags have been resolved.

Release Notes:

- N/A
2025-01-13 22:25:58 +00:00
Piotr Osiewicz
867c069b99
editor: Adjust offset of the opened jump target in the multibuffer (#23091)
This PR fixes an issue with jumping from multi_buffer to a file; namely,
the scroll offset of the opened buffer used to match the position within
the multibuffer, but it broke a while back. This is because we were
opening a buffer without providing the data about the origin scroll
offset.

Closes #ISSUE

Release Notes:

- Fixed a bug where the relative position of an excerpt within the
multibuffer was not accounted for while jumping to the buffer, causing
the clicked line to drastically change position on screen.
2025-01-13 21:08:46 +00:00
Michael Sloan
d4e91c1898
Add support for namespace changes in action deprecations (#23086)
cc @cole-miller 

Release Notes:

- N/A
2025-01-13 20:56:22 +00:00
Joseph T. Lyons
85b727c1a2
Remove inaccurate comments (#23056)
These comments are inaccurate. Even if `convert_case` provided a way to
customize which boundaries were used (which is now does, it 0.7.1), they
would be removed from the string and replaced with the new boundary
character (`-`, `_`, ...), and we'd lose the ability to reconstruct the
text the way the author formatted it. This is not a hack, this is the
way we have to do it.

Release Notes:

- N/A
2025-01-13 20:38:44 +00:00
Michael Sloan
2f762955cd
Take a reference in LSP notify (#23077)
In current code this doesn't have benefit. In preparation for avoiding a
clone of workspace configuration. Having the interface this way may make
opportunities for efficiency clearer in the future

Release Notes:

- N/A
2025-01-13 19:26:28 +00:00
Nate Butler
102e70816c
git: Git Panel UI, continued (#22960)
TODO:

- [ ] Investigate incorrect hit target for `stage all` button
- [ ] Add top level context menu
- [ ] Add entry context menus
- [x] Show paths in list view
- [ ] For now, `enter` can just open the file
- [ ] 🐞: Hover deadzone in list caused by scrollbar
- [x] 🐞: Incorrect status/nothing shown when multiple worktrees are
added

---

This PR continues work on the feature flagged git panel.

Changes:
- Defines and wires up git panel actions & keybindings
- Re-scopes some actions from `git_ui` -> `git`.
- General git actions (StageAll, CommitChanges, ...) are scoped to
`git`.
- Git panel specific actions (Close, FocusCommitEditor, ...) are scoped
to `git_panel.
- Staging actions & UI are now connected to git!
- Unify more reusable git status into the GitState global over being
tied to the panel directly.
- Uses the new git status codepaths instead of filtering all workspace
entries

Release Notes:

- N/A

---------

Co-authored-by: Cole Miller <53574922+cole-miller@users.noreply.github.com>
Co-authored-by: Cole Miller <cole@zed.dev>
2025-01-13 16:47:09 +00:00
Michael Sloan
e08484840b
Clarify logic for Autoscroll::newest() and Autoscroll::fit() (#23048)
Release Notes:

- N/A
2025-01-13 05:33:24 +00:00
Michael Sloan
6aba3950d2
Improve keymap json schema (#23044)
Some checks are pending
CI / check_docs_only (push) Waiting to run
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Blocked by required conditions
CI / (Linux) Run Clippy and tests (push) Blocked by required conditions
CI / (Linux) Build Remote Server (push) Blocked by required conditions
CI / (Windows) Run Clippy and tests (push) Blocked by required conditions
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
CI / Auto release preview (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Script / ShellCheck Scripts (push) Waiting to run
Also:

* Adds `impl_internal_actions!` for deriving the `Action` trait without
registering.

* Removes some deserializers that immediately fail in favor of
`#[serde(skip)]` on fields where they were used. This also omits them
from the schema.

Release Notes:

- Keymap settings file now has more JSON schema information to inform
`json-language-server` completions and info, particularly for actions
that take input.
2025-01-13 02:34:35 +00:00
Michael Sloan
4c50201036
For informational LSP queries log errors instead of notifying in UI (#23040)
I added these notifies in #23011, but in practive have found them to be
overly disruptive. It would definitely be good to do something better
than logging here, but having a sticky error notification is worse. I
think it is still good to notify on mutation failures, so left those in

In particular with rust-analyzer, "Go to definition" and "Find
references" frequently fail with "Content modified" quite a while after
sending the request. Since users are probably used to these operations
being finicky it doesn't seem useful to have a prominent display of
errors for them.
2025-01-12 21:22:16 +00:00
Michael Sloan
61115bd047
Fix a completions panic when no fuzzy matches + inline completion (#23019)
Some checks are pending
CI / check_docs_only (push) Waiting to run
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Blocked by required conditions
CI / (Linux) Run Clippy and tests (push) Blocked by required conditions
CI / (Linux) Build Remote Server (push) Blocked by required conditions
CI / (Windows) Run Clippy and tests (push) Blocked by required conditions
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
CI / Auto release preview (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Script / ShellCheck Scripts (push) Waiting to run
My mistake in #22977, in the case where the inline completion was not
selected it set the index to 1 assuming there would be following match
entries.
2025-01-12 02:41:28 +00:00
Michael Sloan
65c38f22f9
Notify user about LSP errors from editor actions (#23011)
Closes #22976

Release Notes:

* Improved visibility of errors from language servers by reporting them
in the UI when the user invokes an LSP action.
2025-01-11 21:48:50 +00:00
Michael Sloan
bda0c67ece
Add support for rename with language servers that lack prepareRename (#23000)
This adds support for LSPs that use the old rename flow which does not
first ask the LSP for the rename range and check that it is a valid
range to rename.

Closes #16663

Release Notes:

* Fixed rename symbols action when the language server does not have the
capability to prepare renames - such as `luau-lsp`.
2025-01-11 21:22:17 +00:00
Michael Sloan
b65dc8c566
Fix jank in LSP debug log autoscroll (#22998)
Some checks are pending
CI / check_docs_only (push) Waiting to run
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Blocked by required conditions
CI / (Linux) Run Clippy and tests (push) Blocked by required conditions
CI / (Linux) Build Remote Server (push) Blocked by required conditions
CI / (Windows) Run Clippy and tests (push) Blocked by required conditions
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
CI / Auto release preview (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Script / ShellCheck Scripts (push) Waiting to run
Not sure why scroll was janky with `Autoscroll::newest()`, but this
appears to fix it. Probably better to conditionally do the autoscroll
requests anyway.

Release Notes:

- N/A
2025-01-11 05:59:21 +00:00
Michael Sloan
bbbd1e9902
LSP debug logs: Default to soft wrap + fold long lines + autoscroll (#22996)
Closes #18737

Release notes:

- Improved LSP debug logs by defaulting to soft wrap and folding a
suffix of long lines. Also adds autoscroll, so if the cursor is on the
last line of the logs they will scroll like `tail`.
2025-01-11 04:48:44 +00:00
Michael Sloan
fe3d409b17
If completions menu is already displayed, don't select inline completion (#22977)
Before this change, inline completion would displace the user's
selection. Unfortunately this brings less visibility to the inline
completion, I think a good solution to this will be to display a chunk
of the completion inline in the menu, and have a WIP change for that.
Since the current behavior is frustrating, not blocking this improvement
on that

Release Notes:

- N/A
2025-01-10 18:45:55 +00:00
Kirill Bulatov
49198a7961
Do not show copy buttons in editor's hover popovers (#22962)
Follow-up of https://github.com/zed-industries/zed/pull/22866

Added a config option to the markdown renderer to omit code copying
buttons, and used those for editor hover popovers.

Such popovers are quite frequent in language servers' hover responses,
e.g. rust-analyzer on `.clone()` hover may respond with
```
{"jsonrpc":"2.0","id":119,"result":{"contents":{"kind":"markdown","value":"\n```rust\nalloc::string::String\n```\n\n```rust\nfn clone(&self) -> Self\n```\n\n---\n\nReturns a copy of the value.\n\n# Examples\n\n```rust\nlet hello = \"Hello\"; // &str implements Clone\n\nassert_eq!(\"Hello\", hello.clone());\n```"},"range":{"start":{"line":518,"character":24},"end":{"line":518,"character":29}}}}
```

(note multiple code blocks sent)


![image](https://github.com/user-attachments/assets/4c40b15e-8f53-4b3d-a809-f1e4d35a00a7)


![image](https://github.com/user-attachments/assets/77b8e13b-b665-42d3-b633-5a0375998f06)

Sounds that editor has either to use a different way to copy popover's
data (so the entire text gets copied, not just its code blocks), or at
least better handle hover popover's hovering to show the button.


Release Notes:

- N/A
2025-01-10 14:16:52 +00:00
Michael Sloan
1b44398967
Make SelectionsCollection::disjoint_anchor_ranges return an iterator (#22948)
This helps discourage unnecessary collection to Vec

Release Notes:

- N/A
2025-01-10 09:37:46 +00:00
Michael Sloan
c9008fb8c1
Format all selections even if they are cursors (#22933)
Closes #22816

Release Notes:

- Format selections now also applies to cursors.
2025-01-10 01:28:49 +00:00
Michael Sloan
685dd77d97
Fix handling of selection ranges for format selections in multibuffer (#22929)
Before this change it was using the same multibuffer point ranges in
every buffer, which only worked correctly for singleton buffers.

Release Notes:

- Fixed handling of selection ranges when formatting selections within a
multibuffer.

---------

Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
2025-01-10 00:17:04 +00:00
Antonio Scandurra
e64a56ffad
Animate Zeta button while generating completions (#22899)
Release Notes:

- N/A

Co-authored-by: Thorsten <thorsten@zed.dev>
2025-01-09 15:24:35 +00:00
Antonio Scandurra
341972c79c
Introduce UI affordances to make enabling/disabling inline completions easier (#22894)
Release Notes:

- N/A

---------

Co-authored-by: Thorsten <thorsten@zed.dev>
2025-01-09 13:33:30 +00:00
Thorsten Ball
38fbc73ac4
Improve handling tab when inline completion is visible (#22892)
This changes the behaviour of `<tab>` when inline completion is visible.
When the cursor is before the suggested indentation level, accepting a
completion should just indent.

cc @nathansobo @maxdeviant 

Release Notes:

- Changed the behavior of `<tab>` at start of line when an inline
completion (Copilot, Supermaven, ...) is visible. If the cursor is
before the suggested indentation, `<tab>` now indents the line instead
of accepting the visible completion.

Co-authored-by: Antonio <antonio@zed.dev>
2025-01-09 12:44:52 +00:00
Michael Sloan
af1a3cbaac
Make completion menu entries mutable (#22880)
Some checks are pending
CI / check_docs_only (push) Waiting to run
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Blocked by required conditions
CI / (Linux) Run Clippy and tests (push) Blocked by required conditions
CI / (Linux) Build Remote Server (push) Blocked by required conditions
CI / (Windows) Run Clippy and tests (push) Blocked by required conditions
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
CI / Auto release preview (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Script / ShellCheck Scripts (push) Waiting to run
Release Notes:

- N/A
2025-01-09 01:21:56 +00:00
Kirill Bulatov
6f2b88239b
Use distinct carets for line number hovers (#22836)
Release Notes:

- N/A
2025-01-08 23:51:07 +00:00
Thorsten Ball
f9ee28db5e
vim: Fix clipping when navigating over inlay hints (#22813)
Some checks are pending
CI / check_docs_only (push) Waiting to run
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Blocked by required conditions
CI / (Linux) Run Clippy and tests (push) Blocked by required conditions
CI / (Linux) Build Remote Server (push) Blocked by required conditions
CI / (Windows) Run Clippy and tests (push) Blocked by required conditions
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
CI / Auto release preview (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Script / ShellCheck Scripts (push) Waiting to run
This fixes the issue described in this comment:
https://github.com/zed-industries/zed/pull/22439#issuecomment-2563896422

Essentially, we'd clip in the wrong direction when there were multi-line
inlay hints.

It also fixes inline completions for non-Zeta-providers showing up in
normal mode.

Release Notes:

- N/A
2025-01-08 09:41:43 +00:00
Conrad Irwin
dffdf99228
Fix completion menu jumping (#22780)
Some checks are pending
CI / check_docs_only (push) Waiting to run
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Blocked by required conditions
CI / (Linux) Run Clippy and tests (push) Blocked by required conditions
CI / (Linux) Build Remote Server (push) Blocked by required conditions
CI / (Windows) Run Clippy and tests (push) Blocked by required conditions
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
CI / Auto release preview (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Script / ShellCheck Scripts (push) Waiting to run
Co-Authored-By: Thorsten <thorsten@zed.dev>

Release Notes:

- Fix selected suggestion updating too many times when Zeta triggers

Co-authored-by: Thorsten <thorsten@zed.dev>
2025-01-08 06:48:52 +00:00
tachyglossues
811b872f4e
Fix no whitespace displaying after an "à " (#22403)
fixed a bug where with the "show_whitespaces": "boundary" option, when
there was an "à" followed by a space, a white space was displayed, and
when "à" was at the end of the line, a white space was added



Release Notes:

- N/A

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-01-08 02:39:53 +00:00
uncenter
d58f006498
Use standard injection.language and injection.content captures (#22268)
Closes #9656. Continuation of #9654, but with the addition of backwards
compatibility for the existing captures.

Release Notes:

- Improved Tree-sitter support with added compatibility for standard
injections captures

---------

Co-authored-by: Finn Evers <finn.evers@outlook.de>
2025-01-07 18:17:49 +00:00
0x2CA
4deab8a0b9
vim: Add Separator and RemoveIndent in Join Lines, fix gJ use space join (#22496)
Closes #22492

Release Notes:

- Added Join Lines Separator And RemoveIndent

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-01-07 17:04:49 +00:00
Michael Sloan
e56b692036
Make expand excerpt apply to all excerpts in selections (#22748)
Some checks are pending
CI / check_docs_only (push) Waiting to run
CI / Check Postgres and Protobuf migrations, mergability (push) Waiting to run
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Blocked by required conditions
CI / (Linux) Run Clippy and tests (push) Blocked by required conditions
CI / (Linux) Build Remote Server (push) Blocked by required conditions
CI / (Windows) Run Clippy and tests (push) Blocked by required conditions
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
CI / Auto release preview (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Script / ShellCheck Scripts (push) Waiting to run
Closes #22720

Release Notes:

- `ExpandExcerpts` (`shift+enter` by default) now expands all excerpts
that have selected text, rather than just excerpts that contain the end
of a selection.
2025-01-07 04:20:32 +00:00
Cole Miller
810b37c129
Rename the OpenFile action to OpenSelectedFilename to better reflect its function (#22494)
Release Notes:

- Renamed the `OpenFile` action to `OpenSelectedFilename` for clarity
2025-01-07 04:18:04 +00:00
Michael Sloan
2dec4c2c91
Use info popovers instead of diagnostic for invisible char hover (#22701)
This will allow the diagnostic popover to be displayed even if hovering
an invisible char.

Beyond that, it solves a rare `DiagnosticPopover` corner case:

* Supports moving the selection to a diagnostic when `GoToDiagnostic` is
done while hovering, based on `group_id`

* Provides Diagnostic values with `group_id: 0` providing information on
hover about invisible characters.

So, `GoToDiagnostic` would navigate to the very first error produced by
a language server. Really not a big deal of course.

Release Notes:

- N/A
2025-01-06 17:44:26 +00:00
Michael Sloan
fcb03989d2
Remove unnecessary finding of primary diagnostic for diagnostic hover (#22697)
No need to find or store the primary range ahead of time as it's found
by `activate_diagnostics`.

Not entirely sure we should still even have the special case when the
popover is visible. It does support the keyboard interaction of opening
hover followed by jumping to the primary position, but that seems pretty
undiscoverable.

Support for clicking the hover to navigate to the primary diagnostic was
removed in https://github.com/zed-industries/zed/pull/3408

Release Notes:

- N/A
2025-01-06 06:08:17 +00:00
Michael Sloan
570e6c80a8
Fix panic on diagnostic hover (#22693)
In #22620 `diagnostic_group` was modified to return results for
multibuffers, but was returning singleton buffer points. `hover_popover`
uses it to find the jump target for clicking the popup - which doesn't
seem to be working right now but that's a separate issue. Now that
`diagnostic_group` is returning values in multibuffers converting these
to anchors was crashing.

Also resolves a potential bug - if folding in multibuffers was supported
then "Go To Diagnostics" would not properly skip diagnostics from folded
regions.

Release Notes:

- N/A
2025-01-06 02:31:02 +00:00
Michael Sloan
5f1eee3c66
Fix inlay hints display reverting to settings value on theme change (#22605)
Closes #4276

Release Notes:

- Fixed inlay hints that have been manually enabled disappearing when
theme selector is used.
2025-01-04 08:26:08 +00:00