Commit Graph

226 Commits

Author SHA1 Message Date
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
Dzmitry Malyshau
d03f3b9f18 linux: switch folders to use CONFIG_DIR 2024-02-04 20:14:11 -08: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
Ares Andrew
3b882918f7
Filter LSP github releases that have no assets to properly download LSP servers (#7189)
Fixes https://github.com/zed-industries/zed/issues/7183

Release Notes:

- Filter lsp github releases that have no assets ([7189](https://github.com/zed-industries/zed/issues/7183))
2024-02-01 10:59:35 +02:00
Conrad Irwin
3df7da236d
Also add proxy to zed http client (#7184)
Follow up to #6765 because I couldn't figure out how to add to that PR.

Release Notes:

- N/A
2024-01-31 21:40:12 -07:00
lichuan6
5e81d780bd
Read HTTP proxy from env (#6765)
This PR will use http proxy from env for downloading files.
2024-01-31 20:57:09 -07:00
Conrad Irwin
2187513026
app version to server (#7130)
- Send app version and release stage to collab on connect
- Read the new header on the server

Release Notes:

- Added the ability to collaborate with users on different releases of
Zed.
2024-01-31 15:46:24 -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
Marshall Bowers
176f63e86e
Add ability to copy a permalink to a line (#7119)
This PR adds the ability to copy the permalink to a line from within
Zed.

This functionality is available through the `editor: copy permalink to
line` action in the command palette:

<img width="589" alt="Screenshot 2024-01-30 at 7 07 46 PM"
src="https://github.com/zed-industries/zed/assets/1486634/332282cb-211f-4f16-9eb1-415bcfee9b7b">

Executing this action will create a permalink to the currently selected
line(s) and copy it to the clipboard.

Here is an example line:

```
56c80e8011/src/lib.rs (L25)
```

Currently, both GitHub and GitLab are supported.

### Notes and known limitations

- In order to determine where to permalink to, we read the URL of the
`origin` remote in Git. This feature will not work if the `origin`
remote is not present.
- Attempting to permalink to a ref that is not pushed to the origin will
result in the link 404ing.
- Attempting to permalink when Git is in a dirty state may not generate
the right link.
- For instance, modifying a file (e.g., adding new lines) and grabbing a
permalink to it will result in incorrect line numbers.

Release Notes:

- Added the ability to copy a permalink to a line
([#6777](https://github.com/zed-industries/zed/issues/6777)).
- Available via the `editor: copy permalink to line` action in the
command palette.
2024-01-30 19:20:15 -05: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
Conrad Irwin
dfbcaf36fc
nightly url setting (#7037)
Release Notes:

- Added the ability to set settings per-release stage
- Added a `"server_url"` setting
2024-01-30 11:35:07 -07:00
白山風露
631f885900
Ensure sqlez build succeeds on Windows (#7072)
On Windows, `OsStr` must be a valid
[WTF-8](https://simonsapin.github.io/wtf-8/) sequence, and there are no
safety ways converting from bytes to OsStr in std. So I added
`PathExt::try_from_bytes` and use it in `sqlez`.
2024-01-30 10:07:46 -08: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
Marshall Bowers
9cb5a84b8d
Add support for loading user themes (#7027)
This PR adds support for loading user themes in Zed.

Themes are loaded from the `themes` directory under the Zed config:
`~/.config/zed/themes`. This directory should contain JSON files
containing a `ThemeFamilyContent`.

Here's an example of the general structure of a theme family file:

```jsonc
{
  "name": "Vitesse",
  "author": "Anthony Fu",
  "themes": [
    {
      "name": "Vitesse Dark Soft",
      "appearance": "dark",
      "style": {
        "border": "#252525",
        // ...
      }
    }
  ]
}
```

Themes placed in this directory will be loaded and available in the
theme selector.

Release Notes:

- Added support for loading user themes from `~/.config/zed/themes`.
2024-01-29 21:32:45 -05:00
Chris Wanstrath
b5fc91e455 Github => GitHub 2024-01-25 11:23:28 -08:00
Julian Braha
fd6f71d287 Replace tempdir crate with tempfile 2024-01-24 17:58:09 +00: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
Antonio Scandurra
de64de22a3 Introduce a ZED_MEASUREMENTS env var and use it to measure frame time 2024-01-22 11:39:20 +01:00
Joseph T. Lyons
c93d744be4 Add some initial testing to telemetry 2024-01-20 23:23:52 -05:00
Thorsten Ball
1a6cd73334 Cancel language server requests if request is dropped
Before this change, we would send requests to language servers without
canceling them even if we never wait for their response.

Example: when doing document highlights, we'd send a request (modulo
debouncing) whenever a change was made, ignoring previously sent
requests that might still be in-flight.

With this change, we now send a Cancel request (from the LSP spec) to
the language server in case no one listens to the response anymore
(which is what happens when the `Future` returned by `request_internal`)
is dropped.
2024-01-19 16:28:27 +01:00
Conrad Irwin
680929081d Send crash reports to Slack automatically 2024-01-17 19:51:33 -07:00
Max Brunsfeld
08a4307d71 Fix failure to write to keychain because of dropping a future 2024-01-11 16:22:34 -08: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
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
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
b594e59134
Lay some groundwork for language plugins (#3837)
This PR adds undocumented functionality for loading custom language
plugins at runtime. I don't intend to expose the functionality to end
users yet, but this will allow the team to test the capability
internally.

### Implementation

There isn't much new code in Zed. Most of the work here is within
Tree-sitter, in PRs https://github.com/tree-sitter/tree-sitter/pull/1864
and https://github.com/tree-sitter/tree-sitter/pull/2840, which allow
Tree-sitter to load languages from WASM blobs. I've tested the
functionality in Tree-sitter's test suite and via its CLI, but having it
wired into Zed allows us to test the functionality more fully.

### Details

Now, on startup, Zed will look for subdirectories inside of
`~/Application Support/plugins`. These subdirectories are expected to
look similar to the per-language subdirectories in
[`crates/zed2/src/languages`](https://github.com/zed-industries/zed/tree/main/crates/zed2/src/languages),
except that they also contain a `.wasm` file for the parser itself.

I'll add more details here as I go.
2024-01-03 09:37:42 -08:00
Max Brunsfeld
64e512232d Start work on supporting custom languages 2024-01-02 08:01:59 -08:00
Piotr Osiewicz
4fa28b3de2 chore: fix clippy lints for rope2, sum_tree, text2 and util 2024-01-01 23:50:14 +01:00
Marshall Bowers
dc64411cca
Extend theme_importer in preparation for importing Zed1 themes (#3791)
This PR extends the `theme_importer` with the overall structure required
to support importing themes from Zed1.

Release Notes:

- N/A
2023-12-22 13:47:30 -05:00
Mikayla
25df11dd26
Begin porting the PaneAxis element 2023-12-07 17:16:19 -08:00
Antonio Scandurra
9eb98122ec Merge remote-tracking branch 'origin/main' into assistant-2 2023-12-06 12:53:02 +01:00
Antonio Scandurra
d86da04584 WIP 2023-12-05 19:27:15 +01:00
Kirill Bulatov
92fbdb429c Add project search in gitignored test 2023-12-05 12:45:44 +02:00
Kirill Bulatov
2c2c14a360 Fix the regex matcher 2023-12-05 12:45:36 +02:00
Kirill Bulatov
f0ca7141b8 Ignore excluded files on worktree entry refresh 2023-12-05 12:30:29 +02:00
Kirill Bulatov
1f6c69c7dc Allow opening buffers without a project entry 2023-12-05 12:30:29 +02:00
Conrad Irwin
4f885252ab
[Zed2] Collab UI (#3403)
Release Notes:

- N/A
2023-11-27 12:40:59 -07:00
Piotr Osiewicz
c191943849 Add basic call/user UI in top-right corner.
Allow ui::Avatar to take custom data instead of always relying on URI resolution
2023-11-23 15:00:13 +01:00
Kirill Bulatov
92953fb53d If enabled, search in ignored files during project search 2023-11-22 16:41:02 +02:00
Mikayla Maki
e1285b9780
Add nightly release channel for zed2 (#3355)
Release Notes:

- N/A
2023-11-17 22:12:18 -08:00
Max Brunsfeld
a03d062120 Make the commit sha availabe in the app, via a global
Co-authored-by: Mikayla <mikayla@zed.dev>
Co-authored-by: Kirill <kirill@zed.dev>
2023-11-17 14:52:43 -08:00
Max Brunsfeld
a8bea41ad8 Put release channel back to dev 2023-11-17 14:31:49 -08:00
Kirill Bulatov
9373d38434 Rescan worktree on scan exclusions settings change 2023-11-17 21:40:56 +02:00
Kirill Bulatov
1612c90052 More lenient file path matchers 2023-11-17 21:40:56 +02:00
Kirill Bulatov
6680e1e9fe Create new Zed release channel: nightly 2023-11-17 12:13:32 +02:00
Kirill Bulatov
d673efebd2 Add prettier workspace resolution test 2023-11-03 11:02:50 +02:00
Conrad Irwin
4a6a17d866 Merge branch 'main' into zed2 2023-10-27 10:55:15 +02:00
Conrad Irwin
51aa0d6a94 Clearer error on importing both gpui and gpui2 2023-10-26 10:39:52 +02:00
Piotr Osiewicz
bc3572f80e
util: Improve error message for failing requests to GH. (#3159)
Release notes:
- N/A

Co-authored-by: Julia Risley <julia@zed.dev>
2023-10-26 10:39:45 +02:00
Mikayla
26a3d41dc7
Change from try (reserved keyword) to maybe 2023-10-25 07:10:21 -07:00
Mikayla Maki
beb0af9763
Rename IIFE to try
Too good of an idea to forget
2023-10-24 21:13:22 +02:00
Antonio Scandurra
8a11053f1f Checkpoint 2023-10-20 11:44:19 +02:00
Piotr Osiewicz
bfbe4ae4b4
Piotr/z 651 vue support (#3123)
Release Notes:

- Added Vue language support.
2023-10-13 18:58:59 +02:00
Marshall Bowers
ef18aaa66f Merge branch 'main' into gpui2 2023-10-12 17:43:05 -04:00
Antonio Scandurra
23f11fcd5e Merge branch 'main' into gpui2 2023-10-12 10:55:17 +02:00
Kirill Bulatov
4f956d71e2 Slightly better prettier settings and discovery 2023-10-11 12:56:29 +03:00
Nathan Sobo
f1cc62c21f WIP 2023-10-10 22:49:47 -06:00
Conrad Irwin
d4ef764305 Merge branch 'main' into links 2023-10-09 20:08:48 -06:00
Kirill Bulatov
ba4f4e0a3e Detect file paths that end with :
New rustc messages look like

```
thread 'tests::test_history_items_vs_very_good_external_match' panicked at crates/file_finder/src/file_finder.rs:1902:13:
assertion `left == right` failed: Only one history item contains collab_ui, it should be present and others should be filtered out
  left: 0
 right: 1
```

now and we fail to parse that `13:` bit properly, fix that.
2023-10-09 23:55:58 +03:00
Marshall Bowers
f6a4151f60 Merge branch 'main' into gpui2 2023-10-07 10:50:05 -04:00
Conrad Irwin
f6bc229d1d More progress and some debug logs to remove 2023-10-06 16:48:29 -06:00
Conrad Irwin
b58c42cd53 TEMP 2023-10-06 13:47:35 -06:00
Conrad Irwin
13192fa03c
Code to allow opening zed:/channel/1234
Refactored a bit how url arguments are handled to avoid adding too much
extra complexity to main.
2023-10-05 14:57:45 -07:00
Conrad Irwin
a63eccf188
Add url schemes to Zed 2023-10-05 14:55:39 -07:00
Antonio Scandurra
4cf2ba20c2 Checkpoint: render SVGs 2023-10-04 10:51:47 +02:00
Piotr Osiewicz
0a491e773b
workspace: Improve save prompt. (#3025)
Add buffer path to the prompt.

Z-2903

Release Notes:
- Added a "Save all/Discard all" prompt when closing a pane with
multiple edited buffers.
2023-09-25 16:15:29 +02:00
KCaverly
d85acceeec move git2 to workspace dependency globally 2023-09-19 16:13:47 -04:00
Nathan Sobo
4fd4f44bb7 Checkpoint 2023-09-14 18:51:03 -06:00
Nathan Sobo
37ef28a3bf Merge branch 'main' into storybook 2023-09-07 07:56:57 -06:00
Nathan Sobo
99ad60460a Add support for fetching/rendering images 2023-09-06 17:13:43 -06:00
Nathan Sobo
6d4dd0e7a4 Checkpoint 2023-09-06 15:22:35 -06:00
KCaverly
76ce52df4e move queuing to embedding_queue functionality and update embedding provider to include trait items for max tokens per batch"
Co-authored-by: Max <max@zed.dev>
2023-08-30 16:01:28 -04:00
Joseph T. Lyons
c523ccc4c7 Fix code that identifies language via extension 2023-08-08 21:35:11 -04:00
Joseph T. Lyons
580c2ea8eb Fix test name 2023-08-07 17:07:01 -04:00
Joseph T. Lyons
ee1b4a52cc
Add PathExt trait (#2823)
This PR adds a `PathExt` trait. It pulls in our existing `compact()`
function, as a method, and then adds a method, and testing, for
`icon_suffix()`. A test was added to fix:

- https://github.com/zed-industries/community/issues/1877

Release Notes:

- Fixed a bug where file icons would not be registered for files with
with `.` characters in their name
([#1877](https://github.com/zed-industries/community/issues/1877)).
2023-08-03 18:57:43 -04:00
KCaverly
1d737e490b Merge branch 'main' of github.com:zed-industries/zed into vector_store 2023-06-30 09:58:13 -04:00
KCaverly
39137fc19f updated vector_store db to leverage EMBEDDINGS_DIR path 2023-06-29 15:18:32 -04:00
Julia
48bed2ee03
Merge branch 'main' into fix-broken-lsp-installations 2023-06-28 16:46:06 -04:00
Nathan Sobo
882009bc75 Save conversations to ~/.config/zed/conversations
Still need to implement loading / listing.
I'd really be rather write operations to a database. Maybe we
should be auto-saving? Integrating with panes? I just did
the simple thing for now.
2023-06-16 16:15:07 -06:00
Julia
bca625a197 Many steps toward validating and reinstalling server after failure 2023-06-15 12:18:34 -04:00
Mikayla Maki
28ba27c9c5
Merge branch 'main' into stream-git-statuses 2023-06-07 14:12:58 -07:00
Max Brunsfeld
dbbd0558c3 Eliminate assets crate 2023-06-06 11:46:46 -07:00
Mikayla Maki
624467ebca
Add file and line number information to logs 2023-06-05 12:53:37 -07:00
Mikayla Maki
e56fcd69b5
Track git status changes with the changed_paths system 2023-06-05 11:50:23 -07:00
Max Brunsfeld
89446c7fd4 Start work on respecting project-specific settings 2023-05-29 14:25:49 -07:00
Nathan Sobo
747322a02d Merge remote-tracking branch 'origin/main' into zmd 2023-05-24 11:04:07 -06:00
Nathan Sobo
8abaf66602 WIP 2023-05-24 09:21:50 -06:00
Nathan Sobo
7e6cccfa3d WIP: Stream in completions
Drop dependency on tokio introduced by async-openai and do it ourselves.

The approach I'm taking of replacing instead of appending is causing issues. Need to just append.
2023-05-22 20:28:22 -06:00
Max Brunsfeld
89204e85c0 Merge branch 'main' into setting-store 2023-05-17 09:55:24 -07:00
Kirill Bulatov
5d4fc99750 Unit test file:row:column parsing 2023-05-16 21:07:48 +03:00
Kirill Bulatov
106064c734 Do not break Zed & Zed CLI compatibility 2023-05-16 21:07:47 +03:00
Kirill Bulatov
628558aa39 Attempt to open rows and columns from CLI input 2023-05-16 21:07:26 +03:00
Kirill Bulatov
d719352152 Unify path:row:column parsing, use it in CLI 2023-05-16 21:07:26 +03:00
Mikayla Maki
5b2ee63f80
Added status trickle up 2023-05-11 12:01:42 -07:00
Max Brunsfeld
5de9652a22 Create proof-of-concept SettingStore struct 2023-05-10 12:59:22 -07:00
Joseph Lyons
8313414e1e Do not use post_json() to auto update 2023-05-04 12:12:36 -04:00
Joseph Lyons
69a4fffae2 Update post_json to take in a bool for allowing for redirects 2023-05-02 23:22:55 -04:00