Commit Graph

2456 Commits

Author SHA1 Message Date
Felix Salazar
cbcaca4153
Show highlighted symbol in the scrollbar (#7029)
Release Notes:

- Added highlighted symbols to the scrollbar; partially mentioned in:
  - https://github.com/zed-industries/zed/issues/5308
  - https://github.com/zed-industries/zed/issues/4866
2024-01-30 13:57:42 -08:00
Piotr Osiewicz
e6ebe7974d
gpui: Add Global marker trait (#7095)
This should prevent a class of bugs where one queries the wrong type of
global, which results in oddities at runtime.

Release Notes:

- N/A

---------

Co-authored-by: Marshall <marshall@zed.dev>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-01-30 14:08:20 -05:00
Thorsten Ball
7b8bd97652
vim: implement <space> in normal mode (#7011)
This fixes #6815 by implementing `<space>` in normal mode in Vim. Turns
out that `<space>` behaves like a reverse `<backspace>` (which we
already had): it goes to the right and, if at end of line, to the next
line.

That means I had to touch `movement::right`, which is used in a few
places, but it's documentation said that it would go to the next line,
which it did *not*. So I changed the behaviour.

But I would love another pair of eyes on this, because I don't want to
break non-Vim behaviour.

Release Notes:

- Added support for `<space>` in Vim normal mode: `<space>` goes to the
right and to next line if at end of line.
([#6815](https://github.com/zed-industries/zed/issues/6815)).
2024-01-30 10:47:39 +01:00
Marshall Bowers
0cb8b0e451
Clean up Cargo.toml files (#7044)
This PR cleans up some inconsistencies in the `Cargo.toml` files that
were driving me crazy.

Release Notes:

- N/A
2024-01-29 23:47:20 -05:00
Vishal Bhavsar
31e9526544
vim: Add support for moving to first, middle and last visible lines (H, L, M) (#6919)
This change implements the vim
[motion](https://github.com/vim/vim/blob/master/runtime/doc/motion.txt)
commands to move the cursor to the top, middle and bottom of the visible
view. This feature is requested in
https://github.com/zed-industries/zed/issues/4941.

This change takes inspiration from
[crates/vim/src/normal/scroll.rs](https://github.com/zed-industries/zed/blob/main/crates/vim/src/normal/scroll.rs).

A note on the behavior of these commands: Because
`NeovimBackedTestContext` requires compatibility with nvim, the current
implementation causes slightly non-standard behavior: it causes the
editor to scroll a few lines. The standard behavior causes no scrolling.
It is easy enough to account for the margin by adding
`VERTICAL_SCROLL_MARGIN`. However, doing so will cause test failures due
to the disparity between nvim and zed states. Perhaps
`NeovimBackedTestContext` should have a switch to be more tolerant for
such cases.

Release Notes:

- Added support for moving to top, middle and bottom of the screen in
vim mode (`H`, `M`, and `L`)
([#4941](https://github.com/zed-industries/zed/issues/4941)).
2024-01-29 20:58:24 -07:00
Piotr Osiewicz
5ab715aac9 text: Wrap BufferId into a newtype 2024-01-29 20:00:47 +01:00
Piotr Osiewicz
0a0a866dd5
Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535)
Release Notes:
- N/A
2024-01-27 13:51:16 +01:00
Mikayla Maki
b5fa5beee4
Fix typos discovered by codespell (#6718)
> codespell --skip="*.json,*.rtf" \

--ignore-words-list=crate,delet,inout,iterm,jumo,lightening,othe,ser,tabe,te,tese,thi,updat
* https://github.com/codespell-project/codespell/blob/master/README.rst

Release Notes:

- N/A
2024-01-25 10:57:18 -08:00
Piotr Osiewicz
e9edad1d51
language: Accept multiple values in line_comment language knob. (#6713)
This opens up a possibility of supporting multiple comment continuation
flavours in editor, e.g. doc comments for Rust (which we seize as well
in this commit). Only the first `line_comment` value is used for
Editor::ToggleComments

Fixes: https://github.com/zed-industries/zed/issues/6692

Release Notes:
- Added support for doc-comment continuations in Rust language.
2024-01-25 19:25:21 +01:00
Christian Clauss
cff2e8bbe0 Fix typos discovered by codespell 2024-01-25 18:32:32 +01:00
Thorsten Ball
0a78c67647 Improve performance of select-all-matches
This fixes #6440.

The previous approach was calling select-next-match in a loop, which
leaves optimizations on the table when you already know that you want to
select all of the matches.

So what we did here is to optimize the code for the "give me all
matches" case:

1. Find all results in the current buffer
2. Build up *all* selections
3. Sort selections & throw away overlapping ones (keep oldest)
4. Unfold if necessary
5. Render selections

On my M3 Max searching for `<span` in the test file [1] from the ticket,
it

previously took: ~1.07s
now takes: ~4ms

[1]: https://github.com/standardebooks/edgar-allan-poe_poetry/blob/master/src/epub/text/poetry.xhtml

Co-authored-by: Antonio <antonio@zed.dev>
2024-01-25 13:35:22 +01:00
Conrad Irwin
f185aca25a Use the correct snapshot when calculating mouse positions 2024-01-24 19:10:53 -07:00
Conrad Irwin
4e085b2052 Show hovered cursors less flickerily 2024-01-23 22:32:22 -07:00
Conrad Irwin
a3968c5cc5
Fix rendering of diagnostic blocks (#4232)
- Distinct colors to make it not confusing
- Avoid overflowing the edge of the editor when the message is long


Release Notes:

- Improved display of diagnostic blocks (F8)
2024-01-23 16:39:57 -07:00
Mikayla Maki
be4d314858
Revert "Improve completion, action and shared project popovers' layout" (#4233)
Reverts zed-industries/zed#4226

Unfortunately there where some worse states possible after this PR.
Reverting until after the launch, as the problems it addresses are still
bad.

![Screenshot 2024-01-23 at 3 20
59 PM](https://github.com/zed-industries/zed/assets/2280405/d25ab0d5-db49-44cb-b865-e320a97616ce)
2024-01-23 15:34:48 -08:00
Conrad Irwin
450cf9dd06 Fix rendering of diagnostic blocks
- Distinct colors to make it not confusing
- Avoid overflowing the edge of the editor when the message is long
2024-01-23 16:28:58 -07:00
Piotr Osiewicz
f2ff7fa4d5
chore: Change AGPL-licensed crates to GPL (except for collab) (#4231)
- [x] Fill in GPL license text.
- [x] live_kit_client depends on live_kit_server as non-dev dependency,
even though it seems to only be used for tests. Is that an issue?

Release Notes:
- N/A
2024-01-24 00:26:58 +01:00
Mikayla Maki
9f6072c6b6
Revert "Improve completion, action and shared project popovers' layout" 2024-01-23 15:26:11 -08:00
Kirill Bulatov
bf35b78380 Allow both action and completion lists to occupy max width and height of its element 2024-01-23 22:42:06 +02:00
Kirill Bulatov
513ddf1861 Change background for the max width of the completion/action elements 2024-01-23 22:12:29 +02:00
Kirill Bulatov
4c039d0f02 Fix code actions being too small 2024-01-23 21:39:22 +02:00
Kirill Bulatov
74bdb48359 Make completions menu to occupy more space
* make completion elements as wide as the longest element
* make completion docs scrollable

co-authored-by: Piotr <piotr@zed.dev>
2024-01-23 21:26:40 +02:00
Piotr Osiewicz
21e6b09361
Remove license-file from Cargo.toml as it is apparently redundant (#4218)
Release Notes:

- N/A
2024-01-23 17:40:30 +01:00
Piotr Osiewicz
678bdddd7d
chore: Add crate licenses. (#4158)
- GPUI and all dependencies: Apache 2
- Everything else: AGPL

Here's a script that I've generated for it:
https://gist.github.com/osiewicz/6afdd6626e517da24a2092807e6f0b6e

Release Notes:
- N/A

---------

Co-authored-by: David <david@zed.dev>
2024-01-23 16:56:22 +01:00
Thorsten Ball
030b20ace9 Fix scroll jitter by ignoring autoscroll events if following
When following someone else we saw jitter because
`ScrollPositionChanged` events were battling `SelectionsChanged` events,
both of which were scrolling the viewport.

This ignores the ScrollPositionChanged if autoscrolling is on.

Co-authored-by: Antonio <antonio@zed.dev>
Co-authored-by: Julia <julia@zed.dev>
2024-01-23 16:16:21 +01:00
Thorsten Ball
c8c605d23a Fix horizontal scroll going too far to the left
Previously one could scroll infinitely to the left. This clams it to 0.

Co-authored-by: Antonio <antonio@zed.dev>
2024-01-23 12:28:50 +01:00
Conrad Irwin
ce0833eadf
Fix off-by-one highlighting in hover tooltip (#4206)
rust analyzer has a tendency to return markdown of the form:

```rust
 // <-- note the leading space
blah blah blah
```

This is clearly defectuous, so we used to .trim() the output.

Unfortunately we trim after applying syntax highlighting, so that causes
the output to look goofy.

Fix this by updating the highlighting when we trim.

[[PR Description]]

Release Notes:

- Fixed a bug where syntax highlighting was off in hover tooltips
2024-01-22 23:12:08 -07:00
Julia
f2eb78bbfc
Avoid overwriting mouse wheel scroll with selection auto-scroll (#4207)
Release Notes:

- Fixed an issue where mouse wheel events could be ignored while
selecting text near the top or bottom of the editor with the mouse.
2024-01-22 19:07:03 -05:00
Julia
a2aa47aba2 Avoid overwriting mouse wheel scroll with selection auto-scroll 2024-01-22 18:12:25 -05:00
Conrad Irwin
fd8d2d41b0 One off 2024-01-22 15:53:12 -07:00
Conrad Irwin
98d514f5bf Fix off-by-one highlighting in hover tooltip
rust analyzer has a tendency to return markdown of the form:

```rust
 // <-- note the leading space
blah blah blah
```

This is clearly defectuous, so we used to .trim() the output.

Unfortunately we trim after applying syntax highlighting, so that causes
the output to look goofy.

Fix this by updating the highlighting when we trim.
2024-01-22 15:23:37 -07:00
Conrad Irwin
53b47c15ac Hide editor hovers when a menu is open 2024-01-22 13:33:13 -07:00
Julia
2c3d9805a4 Store a z-index id per-layer
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2024-01-22 10:16:59 -05:00
Kirill Bulatov
7aa3d9d1fb Fix lightning bolt hover and git gutter mark overlapping 2024-01-22 16:01:32 +02:00
Antonio Scandurra
f76a2502bb Show diagnostics on hover 2024-01-22 12:01:53 +01:00
Mikayla
c05edee2b5
Port the rest of the app 2024-01-21 20:26:33 -08:00
Conrad Irwin
3b84291343
Updates to chat after Hack#2 (#4175)
Release Notes:

- Channels: Improved font sizes in chat
- Channels: Added a link preview when hovering over links in chat
- Channels: Fixed rendering of newlines in chat messages
- Added a new setting "use_autoclose" (defaulting to true) that lets you
disable autoclose per language.
([#1420](https://github.com/zed-industries/community/issues/1420))
([#1903](https://github.com/zed-industries/community/issues/1903))
2024-01-20 20:03:37 -07:00
Conrad Irwin
29ac1fd081 Merge remote-tracking branch 'origin/main' into chat-font-size 2024-01-20 14:51:53 -07:00
Conrad Irwin
778856c101 Add a setting "use_autoclose" to control autoclose
Also disable autoclose for Chat
2024-01-20 13:33:03 -07:00
Mikayla
33105486aa
Make platform input handler private
Automatically record the context on non-view input handlers
Simplify the async window context update() method
2024-01-20 06:56:19 -08:00
Max Brunsfeld
0858db9ebb
Autocomplete mentions (#4171)
Release Notes:

- Added autocomplete for @-mentions in the chat panel.
2024-01-19 17:03:56 -08:00
Max Brunsfeld
8fb0270b4a Make applying of additional completion edits go through the CompletionProvider 2024-01-19 16:56:28 -08:00
Max Brunsfeld
739d1179e3 Stop propagation when confirming a completion 2024-01-19 16:02:51 -08:00
Max Brunsfeld
4fb3e6d812 Ensure editors context menus get at least 3 lines of height 2024-01-19 15:47:42 -08:00
Mikayla
eaa0e93112
Fix hover popovers showing up over zoomed panels 2024-01-19 14:52:49 -08:00
Conrad Irwin
af30a9b814 Show cursors sligthly longer 2024-01-19 14:38:17 -07:00
Max Brunsfeld
139986d080 Start work on autocomplete for chat mentions
Co-authored-by: Conrad <conrad@zed.dev>
Co-authored-by: Nathan <nathan@zed.dev>
Co-authored-by: Marshall <marshall@zed.dev>
2024-01-19 13:12:57 -08:00
Max Brunsfeld
1ceccdf03b Move the details of completion-resolution logic into Project
Co-authored-by: Conrad <conrad@zed.dev>
2024-01-19 11:52:28 -08:00
Joseph T. Lyons
595428a8b1 Rename show cursors to display cursor names 2024-01-19 11:37:57 -05:00
Joseph T. Lyons
cb1b7915ee
Allow cursors to be shown via a command (#4153) 2024-01-19 11:09:49 -05:00
Joseph T. Lyons
bcc13e151c Change struct field name 2024-01-19 07:52:28 -05:00
Kirill Bulatov
a4a0a02dc3
Avoid gutter resizes on line number increase/decrease (#4135) 2024-01-19 10:25:55 +02:00
Joseph T. Lyons
0062cc000b Allow cursors to be shown via a command 2024-01-19 02:58:30 -05:00
Conrad Irwin
276032398b Fix overflow in hover handler 2024-01-18 16:53:05 -07:00
Conrad Irwin
e513020fbb Fine tune 2024-01-18 15:59:13 -07:00
Kirill Bulatov
bf8e57098d Avoid gutter resizes on line number increase/decrease
Reserves 4 characters for the line number in the gutter to avoid editor bounds jumping when editing small files like commit messages.
2024-01-18 23:11:05 +02:00
Conrad Irwin
bfee008bb2 Merge branch 'main' into cursors 2024-01-18 14:03:27 -07:00
Piotr Osiewicz
9506fa461f Start documenting display_map module 2024-01-18 16:38:06 +01:00
Mikayla Maki
933fb87013
Fix editor selection issue (#4110)
Release Notes:

- Fixes a bug where, editor selections would update in the wrong pane
when split.
2024-01-17 17:16:56 -08:00
Mikayla Maki
aa7351041d
Add typo detection to CI (#4107)
Adding the typos crate to our CI will take some doing, as we have
several tests which rely on typos in various ways (e.g. checking state
as the user types), but I thought I'd take a first stab at fixing what
it finds.

Release Notes:

- N/A
2024-01-17 17:13:47 -08:00
Mikayla
edb204511c
Fix selection bug in editor causing selections to be un-ended 2024-01-17 16:30:01 -08:00
Mikayla
078fd35f4f
WIP 2024-01-17 15:52:54 -08:00
Piotr Osiewicz
6cbc49e5f0
Editor docs (#4097)
Release Notes:

- N/A

---------

Co-authored-by: Kirill <kirill@zed.dev>
2024-01-18 00:48:37 +01:00
Mikayla
57400e9687
Fix typos detected by crate-ci/typos 2024-01-17 14:31:21 -08:00
Conrad Irwin
ef0432da0d Hide cursors by default, but show some 2024-01-17 10:14:20 -07:00
Julia
2fbf42d7df
Z index shenanigans (#4089)
Release Notes:

- Fixed a bug allowing certain UI elements to render incorrectly when
overlapping.
2024-01-17 09:48:08 -05:00
Julia
977832a04e Refresh window, bypassing view cache, when opening hover or context menu 2024-01-17 09:40:16 -05:00
Conrad Irwin
0ca9f286c6 Show cursors for remote participants 2024-01-16 21:54:49 -07:00
Thorsten Ball
1cbdf2ba22 Fix overlapping block headers when using custom line height
This fixes block headers overlapping over text in the buffer when using
a custom line height of 1.25.

It fixes the issue by making the parent container a v-flex,
vertically-justifying the content and moving from relative padding to
absolute padding for the header itself.

Co-authored-by: antonio <antonio@zed.dev>
Co-authored-by: julia <julia@zed.dev>
Co-authored-by: marshall <marshall@zed.dev>
2024-01-16 17:20:27 +01:00
Kirill Bulatov
ec3cfc33d6
Adds a way to select items under multiple carets (#4067)
Deals with https://github.com/zed-industries/community/issues/2374

Release Notes:

- Added a way to select items under multiple carets with
`editor::SelectNext` and `editor::SelectPrevious` commands
2024-01-16 11:08:48 +02:00
Kirill Bulatov
25abe8f981 Fix the tests 2024-01-16 10:58:27 +02:00
Kirill Bulatov
fbb363e83a Add tests 2024-01-16 10:07:31 +02:00
Max Brunsfeld
8f262892a0 Notify editors on buffer font size changes 2024-01-15 14:53:24 -08:00
Kirill Bulatov
55671eac40 Select next/previous word for multiple carets if possible 2024-01-15 23:42:36 +02:00
Joseph T. Lyons
ba9a9f4f17 Add more open events
project search
diagnostics
welcome page
2024-01-15 16:26:04 -05:00
Kirill Bulatov
92add99260 Add LSP logs into the end of the editor, not after its caret
Also prevent tabs from being added in readonly editors
2024-01-15 22:12:52 +02:00
Marshall Bowers
90f4c70a82
Rename h_stack and v_stack to h_flex and v_flex, respectively (#4053)
This PR renames the `h_stack` and `v_stack` to `h_flex` and `v_flex`,
respectively.

We were previously using `h_stack` and `v_stack` to match SwiftUI, but
`h_flex` and `v_flex` fit better with the web/flexbox terminology that
the rest of GPUI uses.

Additionally, we were already calling the utility functions used to
implement `h_stack` and `v_stack` by the new names.

Release Notes:

- N/A
2024-01-15 11:34:06 -05:00
Kirill Bulatov
fc294ce0b1
Disable copilot for feedback and lsp log editors (#4048)
LSP log editor caused recursive flood of messages, and feedback editor
is better with people writing their own feedback.

Release Notes:

- Fixed hanging due to excessive logs when browsing Copilot LSP logs
2024-01-15 15:59:27 +02:00
Kirill Bulatov
253c8dbe8e Disable copilot for feedback and lsp log editors
LSP log editor caused recursive flood of messages, and feedback editor is better with people writing their own feedback.
2024-01-15 15:49:23 +02:00
Thorsten Ball
80c0d09b15
Fix editor stealing click events from copy-error button (#4046)
This fixes the click event on the "copy error message" button by
changing the `editor` element to ignore mouse-down events when the
default was prevented. That's similar to how `div` does it.

Release Notes:

- Fixed a bug that prevented "copy error message" button from being
clicked.
2024-01-15 14:03:15 +01:00
Thorsten Ball
74f3366f42 Fix editor stealing click events from copy-error button
Co-authored-by: Antonio <antonio@zed.dev>
2024-01-15 13:47:09 +01:00
Antonio Scandurra
4ff514ca7e Merge remote-tracking branch 'origin/main' into cache
# Conflicts:
#	crates/gpui/src/elements/div.rs
2024-01-15 11:37:46 +01:00
Mikayla
3a836b8026
Remove some comments 2024-01-12 20:10:40 -08:00
Max Brunsfeld
7dc28aad78 Forbid paste, undo, redo on read-only editors 2024-01-12 10:38:05 -08:00
Antonio Scandurra
f4a7f6f4c3 Fix warning 2024-01-12 18:06:18 +01:00
Antonio Scandurra
817b641c17 Ensure editor elements invalidate their parent views on notify
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Conrad Irwin <conrad@zed.dev>
2024-01-12 17:36:11 +01:00
Antonio Scandurra
a32ad3f907 Fix editor tests 2024-01-12 14:50:42 +01:00
Max Brunsfeld
258c2fdad4 Fix routing of leader updates from unshared projects
Previously, leader updates in unshared projects would be sent to
all followers regardless of project, as if they were not scoped
to any project.
2024-01-11 13:47:31 -08:00
Max Brunsfeld
cb11fb68cb
Avoid bright green separators when displaying untitled buffers in multi-buffers (#4024)
Release notes:

- Fixed unstyled excerpt separators when showing untitled buffers in
multi-buffers.
2024-01-11 12:19:55 -08:00
Max Brunsfeld
5feae86900 Avoid bright green separators when displaying untitled buffers in multi-buffers 2024-01-11 09:55:16 -08:00
Piotr Osiewicz
a98d048905
gpui: Make TextSystem::line_wrapper non-fallible. (#4022)
Editors WrapMap could become desynchronised if user had an invalid font
specified in their config. Compared to Zed1, WrapMap ignored the
resolution failure instead of panicking. Now, if there's an invalid font
in the user config, we just fall back to an arbitrary default.


Release Notes:
- Fixed the editor panic in presence of invalid font name in the config
(fixes https://github.com/zed-industries/community/issues/2397)

---------

Co-authored-by: Conrad <conrad@zed.dev>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-01-11 18:52:00 +01:00
Kirill Bulatov
ba83623c84 Fix whitespace symbol colors in the editor, use zed1 one
co-authored-by: Marshall Bowers <marshall@zed.dev>
2024-01-11 17:43:49 +02:00
Kirill Bulatov
9bb50a5ded Restore hover action in the editor 2024-01-11 16:19:44 +02:00
Joseph T. Lyons
75cb409d2e
Instrument edit events (#4006)
The goal of this PR is to send up events that contain the duration of
keyboard activity within Zed. I built the `EventCoalescer`, which gets
called called each time a key is pressed, within any environment (in the
case of this PR, within "editor" and "terminal). The" `EventCoalescer`
holds a start and end DateTime and adjusts the end instant as events
come in, until a timeout from the last event is hit.

I did my best to keep this mechanism efficient (avoiding vectors to
store moments in time, avoiding spawning timers threads, etc.), because
I know this is going to be per keystroke, but its behind a lock on the
telemetry struck, since it has to know when the environment changes, in
which point, it will automatically end the activity period, even if
there is no timeout. Because we have to have access to it from different
parts of the system, we have to go through the lock, which worried me a
bit (@mikayla-maki's intuition is that it should be fine).

As for the event, I take the time between the durations reported by the
event coalescer and send that up to zed - the indention is to
reconstruct the start and end times on zed.dev, in the same way we use
the event offset times and the time on zed.dev to get the official event
timestamp, and avoid the issue of the user having their system clocks
set wrong.

I'd really appreciate it if @nathansobo or @maxbrunsfeld could check
this out.

Release Notes:

- N/A
2024-01-11 08:19:29 -05:00
Piotr Osiewicz
0db7559e96
editor: extend diff hunk range for custom transform blocks. (#4012)
Reported by Mikayla:

![image](https://github.com/zed-industries/zed/assets/24362066/b744d82e-328f-4554-becf-96f9fa92bfc8)
Note how the line with rust analyzer error does not have a git diff
hunk.
vs:

![image](https://github.com/zed-industries/zed/assets/24362066/e285af7a-b8ab-40e9-a9c6-b4ab8d6c4cd0)

Release Notes:
- N/A
2024-01-11 12:26:12 +01:00
Mikayla Maki
44969460cd
Remove remaining port related todos (#3994)
TODO:
- [x] Audit all TODO comments in Zed source and mark port related ones
with a !
- [x] Resolve all todos written as `todo!`

Release Notes:

- N/A
2024-01-10 17:31:05 -08:00
Conrad Irwin
766a869208 Fix fold-related panic 2024-01-10 15:51:13 -07:00
Joseph T. Lyons
b26a468820 Merge branch 'main' into instrument-keyboard-events 2024-01-10 16:03:01 -05:00
Mikayla
7ef88397c9
Fix seg fault when using the WindowContext::on_window_should_close() API 2024-01-10 11:26:11 -08:00
Mikayla
c98d7adf83
Audit all TODOs in Zed and mark port related todos 2024-01-10 11:26:11 -08:00
Piotr Osiewicz
282184a673
editor: Use inclusive ranges for git diff resolution. (#3999)
The culprit was in display map which was resolving next valid point for
the editor, without regard for whether that point belongs to the same excerpt. We now make an end point a minimum of the end point passed in and the start of excerpt header, if there are any. 
This bug existed in Zed1 as well.

Fixes: Diff markers in multibuffer search overlap with dividers between
excepts (shouldn't extend all the way into the divider region)


Release Notes:
- Fixed diff markers being drawn incorrectly near headers in multibuffer
views.
2024-01-10 18:11:05 +01:00
Marshall Bowers
aff119b80a
Fix possessive "its" in docs and comments (#3998)
This PR fixes a number of places where we were incorrectly using "it's"
where we needed to use the possessive "its".

Release Notes:

- N/A
2024-01-10 10:09:48 -05:00
Joseph T. Lyons
d3d6b53a74 WIP 2024-01-10 02:05:42 -05:00
Mikayla Maki
45baad2825
Remove or fix stale todos (#3990)
The software equivalent of dusting

Release Notes:

-
2024-01-09 18:37:35 -08:00
Mikayla
80790d921d
Fix / remove small todos 2024-01-09 14:16:46 -08:00
Conrad Irwin
a46947d5d7 Fix panic in set_scroll_anchor_remote 2024-01-09 14:19:48 -07:00
Julia
5b1894a9b1
Take into account multiple scroll deltas within a single frame (#3982)
Release Notes:

- Fixed an issue where all but the last scroll event would be dropped if
there were multiple within a single frame.
2024-01-09 14:51:26 -05:00
Julia
463270ed36 Take into account multiple scroll deltas within a single frame
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2024-01-09 14:32:43 -05:00
Nathan Sobo
42cbd103fb Even more docs
Co-authored-by: Conrad <conrad@zed.dev>
2024-01-09 12:02:12 -07:00
Marshall Bowers
824d06e2b2
Remove Default impl for StatusColors (#3977)
This PR removes the `Default` impl for `StatusColors`.

Since we need default light and dark variants for `StatusColors`, we
can't use a single `Default` impl.

Release Notes:

- N/A
2024-01-09 11:31:19 -05:00
Marshall Bowers
fa53353c57
Rename IconElement to just Icon (#3974)
This PR renames the `IconElement` component to just `Icon`.

This better matches the rest of our components, as `IconElement` was the
only one using this naming convention.

The `Icon` enum has been renamed to `IconName` to free up the name.

I was trying to come up with a way that would allow rendering an
`Icon::Zed` directly (and thus make the `IconElement` a hidden part of
the API), but I couldn't come up with a way to do this cleanly.

Release Notes:

- N/A
2024-01-09 10:11:20 -05:00
Kirill Bulatov
625c9d8980 Remove some todo!'s 2024-01-09 11:36:36 +02:00
Piotr Osiewicz
e4b1c76895
Display setting documentation in settings.json (#3936)
Let this screenshot of settings.json speak for itself: 

![image](https://github.com/zed-industries/zed/assets/24362066/fca60383-1788-43f9-803b-00f083394c8a)

Release Notes:
- Added code completion & on-hover documentation to Zed's settings.json
file.

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-01-08 19:30:18 +01:00
Marshall Bowers
a8c193c7a6
Remove resolved TODO (#3943)
This PR removes a resolved TODO in drawing diff hunk status.

Release Notes:

- N/A
2024-01-08 13:08:44 -05:00
Marshall Bowers
46a99feb97
Use correct color for folded diff indicator (#3942)
This PR updates the indicator for changes within a fold to use the
correct color from the theme:

<img width="380" alt="Screenshot 2024-01-08 at 12 52 56 PM"
src="https://github.com/zed-industries/zed/assets/1486634/b8bf6bf3-6acc-43a4-8c4b-a02c975c7f02">

Release Notes:

- Updated the color of the indicator for a fold containing modified
lines.
2024-01-08 12:58:04 -05:00
Piotr Osiewicz
d475f1373a
gpui: Further docs refinement & moved some reexports into 'private' module (#3935)
This commit mostly fixes invalid URLs in docstrings. It also
encapsulates crates we reexport (serde stuff + linkme) into a public
module named "private" in order to reduce the API surfaced through docs.
Moreover, I fixed up a bunch of crates that were pulling serde_json in
through gpui explicitly instead of using Cargo manifest.

Release Notes:
- N/A
2024-01-07 14:14:21 +01:00
Joseph T. Lyons
ea1770254d Merge branch 'main' into instrument-welcome-screen 2024-01-06 15:23:06 -05:00
Joseph T. Lyons
167a0b590f Add event for welcome page close 2024-01-06 15:17:28 -05:00
Joseph T. Lyons
cdd5cb16ed WIP 2024-01-06 14:41:35 -05:00
Antonio Scandurra
23414d185c Fix bug that was causing Editor to notify on every mouse move 2024-01-06 18:56:55 +01:00
Conrad Irwin
709682e8bc Tidy up TestContext lifecycle
Co-Authored-By: Max <max@zed.dev>
2024-01-05 16:31:41 -07:00
Marshall Bowers
79cccdb6d1
Use regular text color for diagnostic popovers (#3918)
This PR updates the diagnostic popovers to use the regular editor text
color rather than one specific to the diagnostic kind.

Release Notes:

- Updated text color in diagnostic popovers.
2024-01-05 14:13:43 -05:00
Conrad Irwin
3c0052850c Merge branch 'main' into channel-guests 2024-01-05 10:05:59 -07:00
Conrad Irwin
df0076a4eb
Better TestWindow support (#3876)
Adding guest roles led us down a rabbit hole where we'd have liked to
rely on a
side-effect of activating a window in tests; but the test window didn't
implement that.

Looking into that, I realized our TestWindow wasn't doing a great job of
emulating the MacWindow, so this makes the two more similar.
2024-01-05 09:59:48 -07:00
Kirill Bulatov
3070a6ef26 Return back git status colors for tab labels 2024-01-05 12:38:42 +02:00
Conrad Irwin
fff415e3e9 Improve deactivate simulation 2024-01-04 22:06:52 -07:00
Marshall Bowers
e4aa7ba4f2
Try to load fallback fonts instead of panicking when a font is not found (#3891)
This PR adjusts our font resolution code to attempt to use a fallback
font if the specified font cannot be found.

Right now our fallback font stack is `Zed Mono`, followed by `Helvetica`
(in practice we should always be able to resolve `Zed Mono` since we
bundle it with the app).

In the future we'll want to surface the ability to set the fallback font
stack from GPUI consumers, and potentially even support specifying font
stacks in the user settings (as opposed to a single font family).

Release Notes:

- Fixed a panic when trying to load a font that could not be found.
2024-01-04 14:10:46 -05:00
Antonio Scandurra
6f4a08ba5a Prevent scrolling editor and resizing panels at the same time
This fixes a bug that would cause Zed to never stop resizing
panels when the drag handle overlapped with an editor scrollbar.

Co-Authored-By: Marshall <marshall@zed.dev>
2024-01-04 17:25:02 +01:00
Antonio Scandurra
f0afa3f9e3 Show scrollbar even when buffer search highlights are outside viewport 2024-01-04 12:39:15 +01:00
Joseph T. Lyons
2972ee8ced Move telemetry settings check into telemetry module 2024-01-04 01:13:21 -05:00
Marshall Bowers
e903adf016
Use dense spacing for completion menu items (#3874)
This PR updates the completion menu to use dense spacing for its items.

Release Notes:

- Adjusted styling of completion menu entries.
2024-01-03 23:06:16 -05:00
Conrad Irwin
6877bd4969 Make read only buffers feel more read only 2024-01-03 19:31:43 -07:00
Conrad Irwin
84171787a5 Track read_only per project and buffer
This uses a new enum to avoid confusing booleans
2024-01-03 19:31:43 -07:00
Max Brunsfeld
f5ba22659b Remove 2 suffix from gpui
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 12:59:39 -08:00
Max Brunsfeld
dfcb17fe74 Remove 2 suffix for theme
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 12:41:01 -08:00
Max Brunsfeld
4305c5fdbe Remove 2 suffix for ui, storybook, text
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 12:33:51 -08:00
Max Brunsfeld
0cf65223ce Remove 2 suffix for collab, rope, settings, menu
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 12:29:16 -08:00
Max Brunsfeld
177e3028a9 Remove 3 suffix for git crate
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 12:11:59 -08:00
Max Brunsfeld
5ddd298b4d Remove 2 suffix for fs, db, semantic_index, prettier
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 12:09:42 -08:00
Max Brunsfeld
53bdf6beb3 Remove 2 suffix for client, call, channel
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 12:02:14 -08:00
Max Brunsfeld
9f99e58834 Remove 2 suffix for lsp, language, fuzzy
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 11:58:02 -08:00
Max Brunsfeld
c5a1950522 Remove 2 suffix for project
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 11:53:34 -08:00
Max Brunsfeld
4ddb26204f Remove 2 suffix for ai, zed_actions, install_ci, feature_flags
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 11:48:46 -08:00
Max Brunsfeld
789ce8dd75 Remove 2 suffix for workspace
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 11:08:51 -08:00
Max Brunsfeld
492805af9c Remove 2 suffix for multi_buffer, outline, copilot
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 11:01:58 -08:00
Max Brunsfeld
588976d27a Remove 2 suffix for editor
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 10:58:57 -08:00
Kirill Bulatov
55374e8ac0 Port to gpui1 2023-12-11 12:28:22 +02:00
Kirill Bulatov
df7b89b6cb
Allow to include gitignored files into project search (#3394) 2023-11-23 19:28:11 +02:00
Kirill Bulatov
eee63835fb Exclude more ignored/worktree-less/project-less buffers from inlay hint requests 2023-11-23 10:30:52 +02:00
Julia
f0c7b3e6ee Update copilot when we are the last task 2023-11-22 14:03:43 -05:00