2021-10-04 22:07:35 +03:00
|
|
|
[package]
|
2021-10-05 02:45:05 +03:00
|
|
|
name = "project"
|
2021-10-04 22:07:35 +03:00
|
|
|
version = "0.1.0"
|
2022-01-23 01:19:14 +03:00
|
|
|
edition = "2021"
|
2023-01-18 23:28:02 +03:00
|
|
|
publish = false
|
2024-01-27 15:51:16 +03:00
|
|
|
license = "GPL-3.0-or-later"
|
2024-01-23 19:40:30 +03:00
|
|
|
|
2024-03-05 20:01:17 +03:00
|
|
|
[lints]
|
|
|
|
workspace = true
|
|
|
|
|
2021-11-30 22:46:39 +03:00
|
|
|
[lib]
|
|
|
|
path = "src/project.rs"
|
2022-03-04 03:15:56 +03:00
|
|
|
doctest = false
|
2021-11-30 22:46:39 +03:00
|
|
|
|
2021-10-04 22:07:35 +03:00
|
|
|
[features]
|
2022-02-09 02:48:44 +03:00
|
|
|
test-support = [
|
|
|
|
"client/test-support",
|
|
|
|
"language/test-support",
|
2022-06-09 11:48:06 +03:00
|
|
|
"settings/test-support",
|
2022-02-09 02:48:44 +03:00
|
|
|
"text/test-support",
|
2023-10-11 19:08:35 +03:00
|
|
|
"prettier/test-support",
|
2024-03-11 21:35:27 +03:00
|
|
|
"worktree/test-support",
|
2024-01-03 22:53:24 +03:00
|
|
|
"gpui/test-support",
|
2022-02-09 02:48:44 +03:00
|
|
|
]
|
2021-10-04 22:07:35 +03:00
|
|
|
|
|
|
|
[dependencies]
|
2024-07-24 12:53:58 +03:00
|
|
|
aho-corasick.workspace = true
|
2024-01-31 05:41:29 +03:00
|
|
|
anyhow.workspace = true
|
|
|
|
async-trait.workspace = true
|
2024-02-06 22:41:36 +03:00
|
|
|
client.workspace = true
|
|
|
|
clock.workspace = true
|
|
|
|
collections.workspace = true
|
2024-05-17 17:48:07 +03:00
|
|
|
dev_server_projects.workspace = true
|
2024-02-06 22:41:36 +03:00
|
|
|
fs.workspace = true
|
2024-01-31 05:41:29 +03:00
|
|
|
futures.workspace = true
|
2024-02-06 22:41:36 +03:00
|
|
|
fuzzy.workspace = true
|
Add `git blame` (#8889)
This adds a new action to the editor: `editor: toggle git blame`. When
used it turns on a sidebar containing `git blame` information for the
currently open buffer.
The git blame information is updated when the buffer changes. It handles
additions, deletions, modifications, changes to the underlying git data
(new commits, changed commits, ...), file saves. It also handles folding
and wrapping lines correctly.
When the user hovers over a commit, a tooltip displays information for
the commit that introduced the line. If the repository has a remote with
the name `origin` configured, then clicking on a blame entry opens the
permalink to the commit on the code host.
Users can right-click on a blame entry to get a context menu which
allows them to copy the SHA of the commit.
The feature also works on shared projects, e.g. when collaborating a
peer can request `git blame` data.
As of this PR, Zed now comes bundled with a `git` binary so that users
don't have to have `git` installed locally to use this feature.
### Screenshots
![screenshot-2024-03-28-13 57
43@2x](https://github.com/zed-industries/zed/assets/1185253/ee8ec55d-3b5e-4d63-a85a-852da914f5ba)
![screenshot-2024-03-28-14 01
23@2x](https://github.com/zed-industries/zed/assets/1185253/2ba8efd7-e887-4076-a87a-587a732b9e9a)
![screenshot-2024-03-28-14 01
32@2x](https://github.com/zed-industries/zed/assets/1185253/496f4a06-b189-4881-b427-2289ae6e6075)
### TODOs
- [x] Bundling `git` binary
### Release Notes
Release Notes:
- Added `editor: toggle git blame` command that toggles a sidebar with
git blame information for the current buffer.
---------
Co-authored-by: Antonio <antonio@zed.dev>
Co-authored-by: Piotr <piotr@zed.dev>
Co-authored-by: Bennet <bennetbo@gmx.de>
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-03-28 20:32:11 +03:00
|
|
|
git.workspace = true
|
2023-05-19 19:13:31 +03:00
|
|
|
globset.workspace = true
|
2024-02-06 22:41:36 +03:00
|
|
|
gpui.workspace = true
|
2024-07-24 01:01:05 +03:00
|
|
|
http_client.workspace = true
|
2024-02-26 04:37:52 +03:00
|
|
|
itertools.workspace = true
|
2024-02-06 22:41:36 +03:00
|
|
|
language.workspace = true
|
2023-04-25 03:41:55 +03:00
|
|
|
log.workspace = true
|
2024-02-06 22:41:36 +03:00
|
|
|
lsp.workspace = true
|
|
|
|
node_runtime.workspace = true
|
2023-04-25 03:41:55 +03:00
|
|
|
parking_lot.workspace = true
|
2024-05-24 17:04:24 +03:00
|
|
|
pathdiff.workspace = true
|
2024-06-18 02:27:42 +03:00
|
|
|
paths.workspace = true
|
2023-04-25 03:41:55 +03:00
|
|
|
postage.workspace = true
|
2024-02-06 22:41:36 +03:00
|
|
|
prettier.workspace = true
|
2024-03-11 21:35:27 +03:00
|
|
|
worktree.workspace = true
|
2023-04-25 03:41:55 +03:00
|
|
|
rand.workspace = true
|
|
|
|
regex.workspace = true
|
2024-07-19 20:27:26 +03:00
|
|
|
remote.workspace = true
|
2024-02-06 22:41:36 +03:00
|
|
|
rpc.workspace = true
|
2024-03-11 21:35:27 +03:00
|
|
|
schemars.workspace = true
|
2024-02-21 15:56:43 +03:00
|
|
|
task.workspace = true
|
2024-05-22 07:39:16 +03:00
|
|
|
tempfile.workspace = true
|
2023-04-25 03:41:55 +03:00
|
|
|
serde.workspace = true
|
|
|
|
serde_json.workspace = true
|
2024-02-06 22:41:36 +03:00
|
|
|
settings.workspace = true
|
2024-02-26 12:08:57 +03:00
|
|
|
sha2.workspace = true
|
2024-07-16 02:04:15 +03:00
|
|
|
shellexpand.workspace = true
|
2024-05-22 07:39:16 +03:00
|
|
|
shlex.workspace = true
|
2022-03-08 21:00:54 +03:00
|
|
|
similar = "1.3"
|
2023-04-25 03:41:55 +03:00
|
|
|
smol.workspace = true
|
2024-05-20 18:00:27 +03:00
|
|
|
snippet.workspace = true
|
2024-07-09 15:02:36 +03:00
|
|
|
snippet_provider.workspace = true
|
2024-02-06 22:41:36 +03:00
|
|
|
terminal.workspace = true
|
|
|
|
text.workspace = true
|
|
|
|
util.workspace = true
|
Detect and possibly use user-installed `gopls` / `zls` language servers (#8188)
After a lot of back-and-forth, this is a small attempt to implement
solutions (1) and (3) in
https://github.com/zed-industries/zed/issues/7902. The goal is to have a
minimal change that helps users get started with Zed, until we have
extensions ready.
Release Notes:
- Added detection of user-installed `gopls` to Go language server
adapter. If a user has `gopls` in `$PATH` when opening a worktree, it
will be used.
- Added detection of user-installed `zls` to Zig language server
adapter. If a user has `zls` in `$PATH` when opening a worktree, it will
be used.
Example:
I don't have `go` installed globally, but I do have `gopls`:
```
~ $ which go
go not found
~ $ which gopls
/Users/thorstenball/code/go/bin/gopls
```
But I do have `go` in a project's directory:
```
~/tmp/go-testing φ which go
/Users/thorstenball/.local/share/mise/installs/go/1.21.5/go/bin/go
~/tmp/go-testing φ which gopls
/Users/thorstenball/code/go/bin/gopls
```
With current Zed when I run `zed ~/tmp/go-testing`, I'd get the dreaded
error:
![screenshot-2024-02-23-11 14
08@2x](https://github.com/zed-industries/zed/assets/1185253/822ea59b-c63e-4102-a50e-75501cc4e0e3)
But with the changes in this PR, it works:
```
[2024-02-23T11:14:42+01:00 INFO language::language_registry] starting language server "gopls", path: "/Users/thorstenball/tmp/go-testing", id: 1
[2024-02-23T11:14:42+01:00 INFO language::language_registry] found user-installed language server for Go. path: "/Users/thorstenball/code/go/bin/gopls", arguments: ["-mode=stdio"]
[2024-02-23T11:14:42+01:00 INFO lsp] starting language server. binary path: "/Users/thorstenball/code/go/bin/gopls", working directory: "/Users/thorstenball/tmp/go-testing", args: ["-mode=stdio"]
```
---------
Co-authored-by: Antonio <antonio@zed.dev>
2024-02-23 15:39:14 +03:00
|
|
|
which.workspace = true
|
2022-09-26 17:59:51 +03:00
|
|
|
|
2021-10-04 22:07:35 +03:00
|
|
|
[dev-dependencies]
|
2024-02-06 22:41:36 +03:00
|
|
|
client = { workspace = true, features = ["test-support"] }
|
|
|
|
collections = { workspace = true, features = ["test-support"] }
|
2024-01-31 05:41:29 +03:00
|
|
|
env_logger.workspace = true
|
2024-02-19 19:41:43 +03:00
|
|
|
fs = { workspace = true, features = ["test-support"] }
|
2024-01-31 05:41:29 +03:00
|
|
|
git2.workspace = true
|
2024-02-06 22:41:36 +03:00
|
|
|
gpui = { workspace = true, features = ["test-support"] }
|
|
|
|
language = { workspace = true, features = ["test-support"] }
|
|
|
|
release_channel.workspace = true
|
|
|
|
lsp = { workspace = true, features = ["test-support"] }
|
|
|
|
prettier = { workspace = true, features = ["test-support"] }
|
2024-01-31 05:41:29 +03:00
|
|
|
pretty_assertions.workspace = true
|
2024-03-11 21:35:27 +03:00
|
|
|
worktree = { workspace = true, features = ["test-support"] }
|
2024-02-06 22:41:36 +03:00
|
|
|
rpc = { workspace = true, features = ["test-support"] }
|
|
|
|
settings = { workspace = true, features = ["test-support"] }
|
2023-04-25 03:41:55 +03:00
|
|
|
unindent.workspace = true
|
2024-02-06 22:41:36 +03:00
|
|
|
util = { workspace = true, features = ["test-support"] }
|