Commit Graph

17993 Commits

Author SHA1 Message Date
Kieran Gill
8bafc61ef5
Add initial markdown preview to Zed (#6958)
Adds a "markdown: open preview" action to open a markdown preview.

https://github.com/zed-industries/zed/assets/18583882/6fd7f009-53f7-4f98-84ea-7dd3f0dd11bf


This PR extends the work done in `crates/rich_text` to render markdown
to also support:

- Variable heading sizes
- Markdown tables
- Code blocks
- Block quotes

## Release Notes

- Added `Markdown: Open preview` action to partially close
([#6789](https://github.com/zed-industries/zed/issues/6789)).

## Known issues that will not be included in this PR

- Images.
- Nested block quotes.
- Footnote Reference.
- Headers highlighting.
- Inline code highlighting (this will need to be implemented in
`rich_text`)
- Checkboxes (`- [ ]` and `- [x]`)
- Syntax highlighting in code blocks.
- Markdown table text alignment.
- Inner markdown URL clicks
2024-02-01 11:03:09 +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
5e64d45194
Remove links to docs.zed.dev (#7187)
Release Notes:

- N/A
2024-01-31 22:26:15 -07: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
d1y
cbc2746d70
docs: add gitcommit language and update go language (#7181)
Release Notes:

- N/A
2024-01-31 19:27:17 -07:00
Conrad Irwin
aaba98d8ec
Debug build (#7176)
Release Notes:

- N/A
2024-01-31 19:22:58 -07:00
Conrad Irwin
2cc2a61c77 collab 0.44.0 2024-01-31 19:10:19 -07:00
Conrad Irwin
3025e5620d
Tell the user when screen-sharing fails (#7171)
Release Notes:

- Added an alert when screen-sharing fails
2024-01-31 16:28:32 -07:00
Marshall Bowers
c4083c3cf6
Watch the themes directory for changes (#7173)
This PR makes Zed watch the themes directory for changes.

When theme files are added or modified, we reload the theme and apply
any changes to Zed.

Release Notes:

- Added live reloading for the themes directory.
2024-01-31 18:17:31 -05: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
Conrad Irwin
5b7b5bfea5
Add a checksum telemetry request (#7168)
We're seeing a bit of nonsense on telemetry. Although the checksum seed
isn't secret per-se, it does make sending nonsense a little more effort.

Release Notes:

- N/A
2024-01-31 15:44:38 -07:00
Marshall Bowers
a588a7dd4d
Fix some typos in comments (#7169)
This PR fixes a couple typos I found in some comments/doc comments.

Release Notes:

- N/A
2024-01-31 16:21:33 -05:00
Conrad Irwin
dcca48482b
disallow opening private files (#7165)
- Disallow sharing gitignored files through collab
- Show errors when failing to open files
- Show a warning to followers when view is unshared

/cc @mikaylamaki, let's update this to use your `private_files` config
before merge.


Release Notes:

- Added the ability to prevent sharing private files over collab.

---------

Co-authored-by: Piotr <piotr@zed.dev>
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-31 12:05:51 -08:00
Joseph T. Lyons
c983c9b6df v0.122.x dev 2024-01-31 14:44:24 -05:00
Mikayla Maki
f98d636203
WIP: Add a setting to visually redact enviroment variables (#7124)
Release Notes:

- Added bash syntax highlighting to `.env` files. 
- Added a `private_files` setting for configuring which files should be
considered to contain environment variables or other sensitive
information.
- Added a `redact_private_values` setting to add or remove censor bars
over variable values in files matching the `private_files` patterns.
-(internal) added a new `redactions.scm` query to our language support,
allowing different config file formats to indicate where environment
variable values can be identified in the syntax tree, added this query
to `bash`, `json`, `toml`, and `yaml` files.

---------

Co-authored-by: Nathan <nathan@zed.dev>
2024-01-31 11:42:09 -08:00
Ben Hamment
5333eff0e4
Improve file finder by ignoring spaces in query (#7068)
Release Notes:

- Changed file finder to ignore spaces in queries ([#5324
](https://github.com/zed-industries/zed/issues/5324)).


![image](https://github.com/zed-industries/zed/assets/7274458/14f3d511-129d-4e73-b9d3-12ce1aaa892f)

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-01-31 14:18:21 -05:00
Conrad Irwin
135bca262c
vim: Make H/M/L work in visual mode (#7166)
Release notes:
- N/A
2024-01-31 12:13:35 -07:00
d1y
5d85801d1f
Add highlighting for go.work (#7142)
<img width="617" alt="image"
src="https://github.com/zed-industries/zed/assets/45585937/ecb28152-db02-450e-bc81-395abd1c1eef">

Release Notes:

- Added  highlighting for go.work
2024-01-31 12:11:03 -07:00
Vishal Bhavsar
ebdabb907a
vim: Support counts for H and L motions (#7149)
Release Notes:

- Added support for counts to `H` and `L` motions
([#4941](https://github.com/zed-industries/zed/issues/4941)).
2024-01-31 11:50:08 -07:00
Conrad Irwin
689d43047d
Don't panic when collaborating with older Zed versions (#7162)
Older Zed versions may send a buffer id of 0, which is no-longer
supported. (as of #6993)

This doesn't fix that, but it does ensure that we don't panic in the
workspace by maintaining the invariant that from_proto_state returns
Some(Task) if the variant matches.

It also converts the panic to an error should something similar happen
again in the future.


Release Notes:

- N/A
2024-01-31 11:46:03 -07:00
Ares Andrew
59f77d316f
Use mimalloc as default allocator (#7140)
From https://github.com/microsoft/mimalloc:
> In our benchmarks (see
[below](https://github.com/microsoft/mimalloc#performance)), mimalloc
outperforms other leading allocators (jemalloc, tcmalloc, Hoard, etc),
and often uses less memory. A nice property is that it does consistently
well over a wide range of benchmarks. There is also good huge OS page
support for larger server programs.


Release Notes:

- Changed default allocator to mimalloc.
2024-01-31 09:50:37 -08:00
d1y
b7ced3943e
Add highlighting for git_commit (#7147)
https://github.com/zed-industries/zed/assets/45585937/32cf5622-e960-4775-986d-bcfd30c81098

Release Notes:

- Added highlighting for git_commit
2024-01-31 09:41:19 -08:00
Marshall Bowers
39200ec9f7
Adjust heading levels in docs (#7163)
This PR adjusts the heading levels in the docs, as some of them weren't
following the right hierarchy.

I also formatted all of the docs with Prettier.

Release Notes:

- N/A
2024-01-31 12:34:31 -05:00
Pyae Sone Aung
6e443ac298
Add PHP file type icon (#7159)
Add PHP file type icon from
[file-icons/icons](https://github.com/file-icons/icons)


[https://github.com/file-icons/icons/blob/master/svg/PHP.svg](https://github.com/file-icons/icons/blob/master/svg/PHP.svg)

<img width="408" alt="Screenshot 2024-01-31 at 23 14 55"
src="https://github.com/zed-industries/zed/assets/44226349/26c3d19d-3a5d-4fc6-b551-f5351ba62b7d">


Release Notes:

- Added PHP file type icon.
2024-01-31 12:14:28 -05:00
Piotr Osiewicz
5941102aac
gpui: Add runtime-shaders feature so that Xcode.app is no longer necessary for Nix-based workflows (#7148)
Release Notes:

- N/A

Co-authored-by: Niklas <niklas@niklaskorz.de>
2024-01-31 17:37:16 +01:00
Marshall Bowers
8c8a5ad275
Make theme parsing more lenient (#7154)
This PR improves the theme parsing to be a bit more lenient, allowing
things like comments and trailing commas in theme files.

Release Notes:

- N/A
2024-01-31 11:05:22 -05:00
Julia
7cb97e57f9 Add debounce for re-querying completion documentation 2024-01-31 09:50:26 -05:00
Andrey Kuzmin
634fe99fa5
Add LSP support for Elm (#7116)
Closes #4595

Release Notes:

- Added LSP support for Elm
([#4595](https://github.com/zed-industries/zed/issues/4595)).

---------

Co-authored-by: Jared M. Smith <absynce@gmail.com>
2024-01-31 11:05:38 +02:00
d1y
c3d4fa4336
Permalink add Gitee host support (#7134)
China's largest git code hosting platform
About Gitee: https://gitee.com/about_us

Release Notes:

- Added Gitee host support   with Git-Permalink
2024-01-31 08:54:03 +01:00
Derrick Laird
ba91adf48a
languages: add highlighting for go.mod (#7137)
Release Notes:

- Added syntax highlighting for go.mod files. Fixes #7133 

<img width="863" alt="image"
src="https://github.com/zed-industries/zed/assets/8725798/dc521a02-c53a-44aa-b0c1-eebf31835679">
2024-01-31 08:46:13 +01:00
Marshall Bowers
e5fe811d7a
theme_importer: Add ability to print theme JSON schema (#7129)
This PR adds a quick subcommand to the `theme_importer` to facilitate
printing out the JSON schema for a theme.

Note that you do need to pass a `<PATH>` to the subcommand still, even
though it will be ignored. I'll rework the CLI to this at some point.

The JSON schema for the current version of the theme can also be found
at
[`https://zed.dev/schema/themes/v0.1.0.json`](https://zed.dev/schema/themes/v0.1.0.json).

Release Notes:

- N/A
2024-01-30 23:33:54 -05:00
Max Brunsfeld
9459394ea0
Re-enable language plugin functionality with some fixes (#7105)
Part of https://github.com/zed-industries/zed/issues/7096

* [x] Load all queries for language plugins, not just highlight query
* [x] Auto-reload languages when changing the `plugins` directory
* [x] Bump Tree-sitter for language loading and unloading fixes
* [x] Figure out code signing

Release Notes:

- N/A

---------

Co-authored-by: Antonio <antonio@zed.dev>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-01-30 19:59:13 -08:00
Conrad Irwin
db99d4fef1
No more nightly/preview collab anymore (#7112)
Release Notes:

- N/A
2024-01-30 20:11:06 -07:00
Conrad Irwin
aee0f65b26
Attempt to fix a panic in worktree scanning (#7128)
Somehow (and this should be investigated separately) we're ending up
with paths that look like: /path/to/project/../../path/to/dependency,
these pass the Ok(repo_path) = path.strip_prefix(), but then fail.

Release Notes:

- Fixed (hopefully) a panic that could occur due to path confusing in
git status
2024-01-30 20:10:52 -07:00
Marshall Bowers
dbb5fad147
Fix some formatting issues in Cargo.toml files (#7127)
This PR fixes some formatting issues in some of the `Cargo.toml` files.

I tried to fix most of these in #7126, but there were a few that I
missed.

Release Notes:

- N/A
2024-01-30 22:01:35 -05:00
Zongle Wang
28f875f5f9
Note installation step via Homebrew (#7053)
https://formulae.brew.sh/cask/zed
2024-01-30 21:47:30 -05: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
d97e780135
Restrict access to global Audio (#7122)
This PR restricts access to the `Audio` global to force consumers to go
through the `Audio` public interface to interact with it.

Release Notes:

- N/A
2024-01-30 20:49:58 -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
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
Conrad Irwin
871b8525b4
Fix per-env settings override (#7114)
Due to a misplaced .trim(), the RELEASE_CHANNEL_NAME included the
trailing newline.

Release Notes:

- N/A
2024-01-30 14:38:51 -07:00
Derrick Laird
a5826e22f5
Add Go file icon (#7110)
![IMG_4664](https://github.com/zed-industries/zed/assets/8725798/75436116-7c7e-4ae6-b76c-13f21c52bee8)

Release Notes:

- Added icon to `.go` files
2024-01-30 15:48:33 -05:00
Conrad Irwin
7f66e366b4
Release version of clippy? (#7107)
Release Notes:

- N/A
2024-01-30 13:29:39 -07:00
Conrad Irwin
3075e58729 collab 0.43.0 2024-01-30 13:22:54 -07:00
Conrad Irwin
911b4b5ae8
Migrate automatically on service start (#7103)
This avoids a forgettable manual step in deploying collab

Release Notes:

- N/A
2024-01-30 13:19:35 -07:00
Marshall Bowers
2e7f9c48bb
Use fully-qualified name to avoid an unused import (#7104)
This PR adjusts how we implement `Global` conditionally to avoid an
unused import when compiling in release mode.

Release Notes:

- N/A
2024-01-30 14:57:54 -05:00
Mikayla Maki
a54eaaecee
Add raw window handle implementations to GPUI (#7101)
This is in preparation for experiments with wgpu. This should have no
external effect.

Release Notes:

- N/A
2024-01-30 11:42:28 -08:00
Marshall Bowers
1d794dbb37
Only impl Global for DebugBelow when compiling with debug_assertions (#7102)
This PR fixes this error when compiling a release build:

<img width="504" alt="Screenshot 2024-01-30 at 2 30 38 PM"
src="https://github.com/zed-industries/zed/assets/1486634/96470735-2b9e-4945-b4c3-c86ef0168b8c">

`DebugBelow` only exists when compiling with `debug_assertions`, so we
only want to implement it using that same criterion.

Release Notes:

- N/A
2024-01-30 14:37:29 -05:00
Piotr Osiewicz
e756602610
log: Use local timezone in log timestamps (#7079)
I'm gonna let it sit for a day in case anybody has any objections to
that change.

Release Notes:

- Logs now use local timestamps instead of UTC-based timestamps

---------

Co-authored-by: Beniamin <beniamin@zagan.be>
2024-01-30 20:18:39 +01:00