Commit Graph

432 Commits

Author SHA1 Message Date
Marshall Bowers
fc8e515fe8
Enable clippy::too_many_arguments (#8734)
This PR enables the
[`clippy::too_many_arguments`](https://rust-lang.github.io/rust-clippy/master/index.html#/too_many_arguments)
rule.

I opted to add `#[allow(clippy::too_many_arguments)]` on the individual
violations, as reworking them to take fewer arguments is a more involved
task.

Release Notes:

- N/A
2024-03-02 18:42:05 -05:00
Marshall Bowers
9735912965
Enable clippy::clone_on_copy (#8728)
This PR enables the
[`clippy::clone_on_copy`](https://rust-lang.github.io/rust-clippy/master/index.html#/clone_on_copy)
rule and fixes the outstanding violations.

Release Notes:

- N/A
2024-03-02 17:37:48 -05:00
Marshall Bowers
12440d5e0d
terminal: Make rgb_for_index take a u8 instead of a &u8 (#8726)
This PR makes the `rgb_for_index` take a `u8` instead of a `&u8`.

`u8` is `Copy` and is only 1 byte, so there really isn't any reason to
pass a reference to it.

Release Notes:

- N/A
2024-03-02 16:51:46 -05:00
Marshall Bowers
4b81b15cad
Enable clippy::useless_conversion (#8724)
This PR enables the
[`clippy::useless_conversion`](https://rust-lang.github.io/rust-clippy/master/index.html#/useless_conversion)
rule and fixes the outstanding violations.

Release Notes:

- N/A
2024-03-02 16:31:47 -05:00
Brian Donovan
a84a3c0ebe
docs: Fix "it's" typos that should be "its" (#8690)
These all meant to use the possessive "its" rather than the contraction
of "it is".
2024-03-01 20:32:27 -05:00
Andrew Lygin
37f7957826
Setting to show/hide terminal title (#8559)
This PR adds settings for hiding title (breadcrumbs) from the terminal
toolbar. If the title is hidden, the toolbar disappears completely.

Example:

```json
"terminal": {
  "toolbar": {
    "title": true,
  }
}
```

[The PR that added the "toolbar"
setting](https://github.com/zed-industries/zed/pull/7338) didn't affect
toolbars of the terminals that are placed in the editor pane. This PR
fixes that.


Release Notes:

- Added support for configuring the terminal toolbar ([8125](https://github.com/zed-industries/zed/issues/8125))
2024-03-01 23:37:02 +02:00
Nathan Sobo
4cc4f08a53
Remove ! from todo!() in comments (#8643)
This practice makes it difficult to locate todo!s in my code when I'm
working. Let's take out the bang if we want to keep doing this.

Release Notes:

- N/A
2024-02-29 18:19:05 -07:00
Dzmitry Malyshau
cb75c57fc0
Cleanup dependencies (part 4) (#8468)
Follow-up to #8425 . Final part - adds the CI check.

Release Notes:
- N/A
2024-02-27 20:41:49 +02:00
Dzmitry Malyshau
a44fc24445
Clean up many small dependencies (part 3) (#8425)
Follow-up to #8353

Release Notes:
- N/A
2024-02-26 11:08:57 +02:00
Marshall Bowers
d8276b0f0d
Hoist itertools dependency to workspace level (#8417)
This PR hoists the `itertools` dependency to the workspace level.

Release Notes:

- N/A
2024-02-25 20:37:52 -05:00
Marshall Bowers
b29946130e
Hoist languages crate's dependencies to the workspace level (#8394)
This PR hoists all of the dependencies of the `languages` crate to the
workspace level.

Release Notes:

- N/A
2024-02-25 12:02:59 -05:00
Chase Bellisime
d1b58601a1
Add plus and dollar sign to terminal paths (#8321)
After fix (file path is now clickable):
<img width="1019" alt="Screenshot 2024-02-23 at 8 59 45 PM"
src="https://github.com/zed-industries/zed/assets/63214891/cbdcb0f5-cd58-436b-9980-f657436f2bc0">

Before fix:
<img width="936" alt="Screenshot 2024-02-23 at 9 15 25 PM"
src="https://github.com/zed-industries/zed/assets/63214891/72d27155-a708-4b8d-a0b6-85d1e9031627">

Release Notes:

- Fixed an issue with terminal paths not allowing links when the path
included `+` or `$` symbols.
([#8256](https://github.com/zed-industries/zed/issues/#8256)).
2024-02-24 21:39:34 +02:00
Kirill Bulatov
2679457b02
Rename runnables into tasks (#8119)
Release Notes:

- N/A
2024-02-21 14:56:43 +02:00
Kirill Bulatov
c97ecc7326
Add initial CI job for Windows target (#8088)
Clippy is disabled for now, due to many warnings in both `gpui` and
other code, see
https://github.com/zed-industries/zed/actions/runs/7980269779/job/21789529800
for more details.

Also, due to `#!/usr/bin/env bash` shebang in the `script/clippy`, it
starts in Windows CI with `shell: C:\Program Files\Git\bin\bash.EXE
-euxo pipefail {0}`

https://github.com/zed-industries/zed/actions/runs/7980269779/job/21789529800#step:4:3
It seems more appropriate to use PowerShell instead.

See `todo!("windows")` for all stubbed places currently.

Release Notes:

- N/A
2024-02-21 00:35:29 +02:00
Kirill Bulatov
0d2ad67b27
Add settings to configure terminal scroll limit (#8063)
Fixes https://github.com/zed-industries/zed/issues/7550
Also set maximum allowed to runnables' terminals.


Release Notes:

- Added settings to configure terminal scroll limit
([7550](https://github.com/zed-industries/zed/issues/7550))
2024-02-20 16:14:59 +02:00
白山風露
77974a4367
Stubbing unix-dependent values on Windows (#8036)
Release Notes:

- N/A
2024-02-19 17:41:35 -08:00
白山風露
0037f0b2fd
Avoid dependencies build errors on Windows (#7827)
This is a compilation of fixes for errors that appeared in dependent
crates in Windows.

- wezterm (zed-industries/wezterm#1)
- tree-sitter-svelte (Himujjal/tree-sitter-svelte#54)
- tree-sitter-uiua (shnarazk/tree-sitter-uiua#25)
- tree-sitter-haskell (I sent a PR, but upstream source is regenerated
and no longer errors.)

Release Notes:

- N/A
2024-02-19 16:44:24 -08:00
Piotr Osiewicz
f17d0b5729
Add static Runnables (#8009)
Part of #7108

This PR includes just the static runnables part. We went with **not**
having a dedicated panel for runnables.
This is just a 1st PR out of N, as we want to start exploring the
dynamic runnables front. Still, all that work is going to happen once
this gets merged.

Release Notes:

- Added initial, static Runnables support to Zed. Such runnables are defined in
`runnables.json` file (accessible via `zed: open runnables` action) and
they can be spawned with `runnables: spawn` action.

---------

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
Co-authored-by: Pitor <pitor@zed.dev>
Co-authored-by: Beniamin <beniamin@zagan.be>
2024-02-19 18:41:43 +02:00
Kirill Bulatov
83cffdde1f
Use collections::{HashMap, HashSet} instead of its std:: counterpart (#7502) 2024-02-07 19:06:03 +02:00
Antonio Scandurra
55129d4d6c
Revert "Use Fx* variants of HashMap and HashSet everywhere in Zed" (#7492)
Reverts zed-industries/zed#7481

This would regress performance because we'd be using the standard
library's hash maps everywhere, so reverting for now.
2024-02-07 13:16:22 +01:00
Kirill Bulatov
eb236302c2
Use Fx* variants of HashMap and HashSet everywhere in Zed (#7481)
Release Notes:

- N/A
2024-02-07 09:45:37 +02:00
Conrad Irwin
9fd221271a
Go back to an alacritty release (#7474)
Release Notes:

- N/A
2024-02-06 20:58:38 -07:00
Piotr Osiewicz
743f9b345f
chore: Move workspace dependencies to workspace.dependencies (#7454)
We should prefer referring to local deps via `.workspace = true` from
now on.

Release Notes:

- N/A
2024-02-06 20:41:36 +01:00
Robin Pfäffle
06674a21f9
Add support for relative terminal links (#7303)
Allow opening file paths relative to terminal's cwd


https://github.com/zed-industries/zed/assets/67913738/413a1107-541e-4c25-ae7c-cbe45469d452


Release Notes:

- Added support for opening file paths relative to terminal's cwd
([#7144](https://github.com/zed-industries/zed/issues/7144)).

---------

Co-authored-by: Kirill <kirill@zed.dev>
2024-02-03 17:04:27 +02:00
Conrad Irwin
583273b6ee
Bump alacritty to fix some panics (#7313)
Release Notes:

- Fixed some panics in the Terminal
([#6835](https://github.com/zed-industries/zed/issues/6835)).
2024-02-02 20:39:51 -07:00
Marshall Bowers
e338f34097
Sort dependencies in Cargo.toml files (#7126)
This PR sorts the dependency lists in our `Cargo.toml` files so that
they are in alphabetical order.

This should make them easier to visually scan when looking for a
dependency.

Apologies in advance for any merge conflicts 🙈 

Release Notes:

- N/A
2024-01-30 21:41:29 -05:00
Hans
4af542567c
Fix a spelling typo (#7059)
Release notes: N/A
2024-01-30 11:40:33 +02: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
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
Piotr Osiewicz
1761e60362
Improve performance of JSON schema creation (#6770)
JSON LSP adapter now caches the schema. `workspace_configuration` is
back to being async, and we are also no longer asking for font names
twice while constructing the schema.
Release Notes:
- Improved performance when opening the .json files.

---------

Co-authored-by: Kirill <kirill@zed.dev>
2024-01-26 19:54:45 +01:00
Thorsten Ball
698108ac8b Setup env correctly after upgrading alacritty_terminal
Co-Authored-By: Antonio <antonio@zed.dev>
2024-01-26 10:42:07 +01:00
Thorsten Ball
0aa1b1f070 Remove unused import 2024-01-26 09:38:06 +01:00
Thorsten Ball
c4cf5f2b2c Upgrade alacritty_terminal in hopes to avoid PTY poll failing
We saw stack traces in our #panic channel pop up that failed on this line:

    3330614219/alacritty_terminal/src/event_loop.rs (L323-L324)

With this message:

    thread 'PTY reader' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 9, kind: Uncategorized, message: "Bad file descriptor" }'
    /Users/administrator/.cargo/git/checkouts/alacritty-afea874b09a502a5/3330614/alacritty_terminal/src/event_loop.rs:324

We don't know how to reproduce the error. It doesn't seem related to the number of open PTY handles,
because `openpty` itself didn't fail. We can only assume that something went wrong between
`openpty` and the setup of the polling.

Since Alacritty itself changed its polling mechanism significantly by switching
from `mio` to `polling` (https://github.com/alacritty/alacritty/pull/6846) we upgraded
with the hope that this will fix the bug.

Co-authored-by: Antonio <antonio@zed.dev>
Co-authored-by: Federico <code@fdionisi.me>
Co-authored-by: David <dammerung2718@icloud.com>
Co-authored-by: Bennet <bennetbo@gmx.de>
2024-01-26 09:38:05 +01: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
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
Piotr Osiewicz
6c82380232 chore: Fix clippy::needless_borrow up to an editor 2024-01-21 15:03:24 +01:00
Mikayla
25f78a2ed1
Fix terminal selection firing when dragging anywhere 2024-01-19 15:02:27 -08:00
Marshall Bowers
df2b0f6d2e
Add more terminal colors to the theme (#4168)
This PR adds more terminal colors that were present in the Zed1 themes
to the Zed2 theme.

Namely, we now have the `dim_` variants for the various ANSI colors and
various `foreground` colors.

Release Notes:

- Improved terminal colors.
2024-01-19 14:22:53 -05:00
Marshall Bowers
01f06f96a1
Update tenses of doc comment summary lines (#4161)
This PR updates the tenses used by the summary line of doc comments to
match the [Rust API documentation
conventions](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#summary-sentence).

Specifically:

> The summary line should be written in third person singular present
indicative form. Basically, this means write ‘Returns’ instead of
‘Return’.

I'm sure there are plenty occurrences that I missed.

Release Notes:

- N/A
2024-01-19 11:18:50 -05:00
Antonio Scandurra
ed28170d42 Always synchronize terminal before rendering it
Previously, we were trying not to synchronize the terminal too often
because there could be multiple layout/paint calls prior to rendering
a frame.

Now that we perform a single render pass per frame, we can just synchronize
the terminal state. Not doing so could make it seem like we're dropping frames.
2024-01-18 10:04:38 +01:00
Piotr Osiewicz
ff67d9dea0 Add font name completions to ui_font_family and terminal::font_family 2024-01-16 20:32:21 +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
Marshall Bowers
00fc22a461
terminal: Clean up doc comment for rgb_for_index (#3947)
This PR cleans up the doc comment for the `rgb_for_index` function.

Release Notes:

- N/A
2024-01-08 13:33:41 -05: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
Kirill Bulatov
d566a0df5a Always show full command on terminal tab hover 2024-01-07 13:46:44 +02:00
Julia
a86f401a7c
Moar terminal bugs de2ified (#3894)
Release Notes:

- N/A
2024-01-04 18:40:55 -05:00
Max Brunsfeld
ba13540c77 Fix inconsistent selection start when dragging outside of terminal bounds
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-04 15:05:39 -08:00
Max Brunsfeld
61db60b3e2 Fix incorrect placement of terminal selection when dragging
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-04 14:55:45 -08:00
Julia
d79b8e4b98 Fix SendText/SendKeystroke having the wrong context name in terminal
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2024-01-04 12:35:51 -05:00