Commit Graph

184 Commits

Author SHA1 Message Date
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
Jason Lee
e7fcddff69
Parse version from GitHub tag name instead of release name (#7423)
If we not change this, some release will parse error.

https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28

```json
{
  "name": {
    "type": [
      "string",
      "null"
    ]
  }
}
```

<img width="1188" alt="image"
src="https://github.com/zed-industries/zed/assets/5518/bd53dbc4-ae2c-4f19-afd7-58e70b4f87d8">

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-02-08 15:28:51 -05:00
Kirill Bulatov
89b1e76003
Fix gopls langserver downloads (#7571)
Fixes https://github.com/zed-industries/zed/issues/7534 by not requiring
assets for gopls and vscode-eslint langservers — those two are the only
ones in Zed that do not use assets directly when determining langserver
version and retrieving those.
All other servers deal with assets, hence require those to be present.

The problem with https://github.com/tamasfe/taplo/releases is that they
host multiple binary releases in the same release list, so for now the
code works because only the langserver has assets — but as soon as
another release there gets assets, it will break again.
We could filter out those by names also, but they also tend to change
(and can be edited manually), so keeping it as is for now.

Release Notes:

- Fixed gopls language server downloads
([7534](https://github.com/zed-industries/zed/issues/7534))
2024-02-08 16:17:47 +02:00
Marshall Bowers
ccc6d76708
Clean up util::paths (#7536)
This PR cleans up the path definitions in `util::paths` following the
Linux merge.

We were using a bunch of target-specific compilation that made these
declarations kind of messy, when really we can limit the conditional
compilation to just the base directories that we use as the basis for
the other directories.

Release Notes:

- N/A
2024-02-07 21:01:45 -05:00
Max Brunsfeld
7b03e977e4
Reload grammars in extensions when they are updated on disk (#7531)
Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Co-authored-by: Marshall <marshall@zed.dev>
2024-02-07 16:39:11 -08:00
Mikayla
3a53db6502
Merge branch 'main' into kvark-linux 2024-02-07 12:30:36 -08:00
Max Brunsfeld
6edeea7c8a
Add logic for managing language and theme extensions (#7467)
This PR adds the initial support for loading extensions in Zed.

### Extensions Directory

Extensions are loaded from the extensions directory.

The extensions directory has the following structure:

```
extensions/
  installed/
    extension-a/
      grammars/
      languages/
    extension-b/
      themes/
  manifest.json
```

The `manifest.json` file is used internally by Zed to keep track of
which extensions are installed. This file should be maintained
automatically, and shouldn't require any direct interaction with it.

Extensions can provide Tree-sitter grammars, languages, and themes.

Release Notes:

- N/A

---------

Co-authored-by: Marshall <marshall@zed.dev>
2024-02-07 15:14:50 -05:00
Mikayla
67555ee5b4
Merge branch 'main' into kvark-linux 2024-02-07 11:52:44 -08: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
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