Commit Graph

18469 Commits

Author SHA1 Message Date
Joseph T. Lyons
850ddddcac v0.127.x dev 2024-03-06 12:30:14 -05:00
Conrad Irwin
563c4db350
Install perf tools in production containers (#8957)
Release Notes:

- N/A
2024-03-06 10:27:08 -07:00
Conrad Irwin
8eb0239d5a
Remove console-subscriber (#8955)
It doubles CPU and RAM usage for not really enough benefit

Release Notes:

- N/A
2024-03-06 10:26:59 -07:00
Conrad Irwin
deb86a1ffc
Fix ./script/symbolicate on Preview crashes (#8956)
Release Notes:

- N/A
2024-03-06 10:26:50 -07:00
Kirpal Grewal
b622dcbc64
Enable clippy::cast_abs_to_unsigned (#8912)
Thankfully this one is a simple, single change that also prevents
overflow in the `abs()`
2024-03-06 12:21:48 -05:00
Jason Lee
2f15676b7c
Update App Menus to add ... for some modal action menu, and group menu items by type. (#8951)
Release Notes:

- Improved App Menu, add `...` for modal action menu, and group menu
items by type.

In macOS and Windows, the `...` suffix of menu item, is means that will
open a dialog.
2024-03-06 12:10:09 -05:00
Jason Lee
4a60326c1c
Remove workspace border, avoid the main window having double borders (#8922)
Release Notes:

- Fixed main window border, avoid double borders.



## Diff (Left is Before, Right is After)


![SCR-20240306-g2v](https://github.com/zed-industries/zed/assets/5518/b13bab55-9d74-4181-ae43-e338bb6f7112)

![SCR-20240306-g0x](https://github.com/zed-industries/zed/assets/5518/af9d4190-a974-4c26-8466-dce1c78c3f31)




Reference to Safari:

![SCR-20240306-ejo](https://github.com/zed-industries/zed/assets/5518/14c41898-8218-4bec-8574-8915a7186926)


## More Theme tests

![SCR-20240306-g0d](https://github.com/zed-industries/zed/assets/5518/8938671e-bc7c-4a6a-8c06-0992beb92bb1)

![SCR-20240306-g0j](https://github.com/zed-industries/zed/assets/5518/73a68663-70f5-4f83-aea0-2079236079e7)

![SCR-20240306-g0q](https://github.com/zed-industries/zed/assets/5518/0a2b4905-3dd1-4081-b538-a78728470004)



![SCR-20240306-fu9](https://github.com/zed-industries/zed/assets/5518/dd3a9e2c-ea28-46c6-a993-047dae8b2d8f)
2024-03-06 10:03:59 -05:00
Jason Lee
567fee4219
Update Project search to Project Search. (#8943)
Release notes:

- N/A
2024-03-06 15:23:55 +01:00
Max Brunsfeld
6036830049
Throttle the sending of UpdateFollowers messages (#8918)
## Problem

We're trying to figure out why we sometimes see high latency when
collaborating, even though the collab server logs indicate that messages
are not taking long to process.

We think that high volumes of certain types of messages, including
`UpdateFollowers` may cause a lot of messages to queue up, causing
delays before collab sees certain messages.

## Fix

This PR reduces the number of `UpdateFollowers` messages that clients
send to collab when scrolling around or moving the cursor, using a
time-based throttle.

The downside of this change is that scrolling will not be as smooth when
following someone. The advantage is that it will be much easier to keep
up with the stream of updates, since they will be sent much less
frequently.

## Release Notes:

- Fixed slowness that could occur when collaborating due to excessive
messages being sent to support following.

---------

Co-authored-by: Nathan <nathan@zed.dev>
Co-authored-by: Conrad <conrad@zed.dev>
Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Thorsten <thorsten@zed.dev>
Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
2024-03-06 14:58:41 +01:00
Antonio Scandurra
c8383e3b18 Use a string for ZED_LOAD_BALANCER_SIZE_UNIT in k8s template
Co-Authored-By: Thorsten <thorsten@zed.dev>
2024-03-06 11:03:14 +01:00
Antonio Scandurra
334c3c670b Use a string for ZED_LOAD_BALANCER_SIZE_UNIT
Co-Authored-By: Thorsten <thorsten@zed.dev>
2024-03-06 10:52:35 +01:00
Antonio Scandurra
e3a7192c11
Give a name to load balancers and increase node count for production (#8939)
Release Notes:

- N/A

Co-authored-by: Thorsten <thorsten@zed.dev>
2024-03-06 10:38:17 +01:00
Hans
6327f3ced8
Modify the link to the latest (#8925)
Fixed the link for Vue LSP server

Release Notes:

- N/A
2024-03-06 08:02:24 +02:00
Conrad Irwin
c58422cb3f Fix YAML indentation 2024-03-05 22:11:58 -07:00
Conrad Irwin
6d53846824
0-downtime collab deploys? (#8926)
Before this change Kubernetes would send a SIGTERM to the old server
before the new one was ready. Now it will wait.

From my reading it seems like startupProbe should not be necessary if we
have a
readinessProbe; but from testing it seems like without startupProbe we
still
drop requests when using `rollout restart`

Release Notes:

- Fixed connectivity issues during Zed deploys.
2024-03-05 21:58:00 -07:00
Max Brunsfeld
01e5e4224a Fix numeric sign of queue duration in logs 2024-03-05 16:00:03 -08:00
Max Brunsfeld
4de80688b9 Revert "Install perf on collab image (#8910)"
Keep the removal of the collab resource requests.

This reverts commit ce6bde5a24.
2024-03-05 15:23:15 -08:00
Max Brunsfeld
ce6bde5a24
Install perf on collab image (#8910)
Release Notes:

- N/A

---------

Co-authored-by: Conrad <conrad@zed.dev>
2024-03-05 14:59:31 -08:00
Max Brunsfeld
35c516fda9
Log the time incoming RPC messages were queued (#8909)
Release Notes:

- N/A

Co-authored-by: Conrad <conrad@zed.dev>
2024-03-05 14:40:09 -08:00
Kirpal Grewal
bca98caa07
Enable clippy::unnecessary_to_owned (#8908)
lint for `unnecessary_to_owned` and fix the sole violation in the
codebase
2024-03-05 17:28:58 -05:00
Max Brunsfeld
b68a277b5e
Fix tracing subscriber after introducing Tokio-console (#8907)
We've also upgraded `Axum` in order to avoid having two versions of that
library in Collab (one due to Tokio-console).

Release Notes:

- N/A

---------

Co-authored-by: Conrad <conrad@zed.dev>
2024-03-05 14:11:33 -08:00
Kirill Bulatov
703c9655a0
Always resolve code action if needed (#8904)
Follow-up of https://github.com/zed-industries/zed/pull/8874 and
https://github.com/zed-industries/zed/pull/7635
Closes https://github.com/zed-industries/zed/issues/7609

* mentions all `lsp::CodeActions` properties in the Zed client resolve
capabilities to remove more json out of general actions request
potentially
* removes odd `CodeActions.data` field checks, as that field is opaque
and is intended to store data, needed by the langserver to resolve this
code action
* if any `CodeAction` lacks either `command` or `edits` fields, tries to
resolve the action

This all effectively causes Zed to always fire an action resolve
request, since we update actions list (replacing the resolved actions
with the new, unresolved ones) via `refresh_code_actions`

9e66d48ccd/crates/editor/src/editor.rs (L3650)
that is being called on selections change and the actions menu open.

Yet, we do not query the resolve until the action is either applied
(selected in the list), or called for formatting, so it seems to be fine
to resolve them always, as it's not a frequent operation such as
reacting to every keystroke.


Release Notes:

- Fixed certain code actions not being resolved properly ([7609](https://github.com/zed-industries/zed/issues/7609))

---------

Co-authored-by: Derrick Laird <swampdonk@gmail.com>
2024-03-05 23:42:12 +02:00
Marshall Bowers
addfcdea8d
Enable clippy::implied_bounds_in_impls (#8906)
This PR enables the
[`clippy::implied_bounds_in_impls`](https://rust-lang.github.io/rust-clippy/master/index.html#/implied_bounds_in_impls)
rule and fixes the outstanding violations.

Release Notes:

- N/A
2024-03-05 16:04:55 -05:00
Conrad Irwin
d112bcfadf
Fix project subscription order (#8900)
Co-Authored-By: Antonio <as-cii@zed.dev>

Release Notes:

- Fixed a bug that prevents project joining

Co-authored-by: Antonio <as-cii@zed.dev>
2024-03-05 13:34:25 -07:00
Marshall Bowers
9e66d48ccd
Enable clippy::cmp_owned (#8899)
This PR enables the
[`clippy::cmp_owned`](https://rust-lang.github.io/rust-clippy/master/index.html#/cmp_owned)
rule and fixes the outstanding violations.

Release Notes:

- N/A
2024-03-05 14:36:53 -05:00
Joseph T. Lyons
d98b61e3d6 Improve wording on recent projects placeholder instructions 2024-03-05 13:51:25 -05:00
Joseph T. Lyons
ad0c5731e5 Update config.yml 2024-03-05 13:23:17 -05:00
Conrad Irwin
cfffa29f9a
Enable tokio-console (#8897)
Release Notes:

- Added tokio-console in production
2024-03-05 10:56:14 -07:00
白山風露
9a2ed4bf1a
Windows: use folders under AppData (#8828)
To be honest, I am not sure how to use these directories. But since it
is difficult to change these later, if we are going to change them, I
think it is time to do.

Release Notes:

- N/A
2024-03-05 09:48:27 -08:00
Marshall Bowers
b6af393e6d
Enable clippy::borrow_deref_ref (#8894)
This PR enables the
[`clippy::borrow_deref_ref`](https://rust-lang.github.io/rust-clippy/master/index.html#/borrow_deref_ref)
rule and fixes the outstanding violations.

Release Notes:

- N/A
2024-03-05 12:24:54 -05:00
Owen Law
a25edcc5a8
Add libxcb-devel build dep to void linux script (#8872)
Added missing libxcb-devel to build dependency script for void-linux.
2024-03-05 09:16:08 -08:00
Marshall Bowers
22fe03913c
Move Clippy configuration to the workspace level (#8891)
This PR moves the Clippy configuration up to the workspace level.

We're using the [`lints`
table](https://doc.rust-lang.org/cargo/reference/workspaces.html#the-lints-table)
to configure the Clippy ruleset in the workspace's `Cargo.toml`.

Each crate in the workspace now has the following in their own
`Cargo.toml` to inherit the lints from the workspace:

```toml
[lints]
workspace = true
```

This allows for configuring rust-analyzer to show Clippy lints in the
editor by using the following configuration in your Zed `settings.json`:

```json
{
  "lsp": {
    "rust-analyzer": {
      "initialization_options": {
        "check": {
          "command": "clippy"
        }
      }
    }
  }
```

Release Notes:

- N/A
2024-03-05 12:01:17 -05:00
Dzmitry Malyshau
52f750b216
Update blade to latest: work around Intel+NVidia driver bug (#8811)
Picks up https://github.com/kvark/blade/pull/92
Should unblock some of the unhappy users.
Upstream bug - https://gitlab.freedesktop.org/mesa/mesa/-/issues/4688

Release Notes:
- N/A
2024-03-05 08:48:34 -08:00
Ezekiel Warren
36c4831806
windows: mouse and keyboard (#8791)
Windows mouse and keyboard working! I also tweaked the message loop so
that it didn't get stuck. The peek message loop was almost never
returning for me during testing.

Release Notes:

- Added windows mouse and keyboard support

![windows-mouse-and-keyboard](https://github.com/zed-industries/zed/assets/1284289/08578fbf-0cb2-4e44-bab1-3c4f0291ea4b)
2024-03-05 08:35:07 -08:00
Nathan Sobo
7c9f680b1b
Request more resources for collab pods on Kubernetes (#8890)
Worried that if we don't do this, they don't give us enough. We're
maxing out the pod's CPU but the node is barely sweating.

Release Notes:

- N/A
2024-03-05 09:15:08 -07:00
Thorsten Ball
2b8b913b6b
Use correct worktree when getting permalink to line (#8888)
Previously this code would call `project.visible_worktrees(cx).next`
which might not necessarily return the worktree matching the currently
open file.

What this change does is it adds `get_repo` method on `Project` that
allows us to get the `GitRepository` for the current buffer.

Release Notes:

- Fixed `open permalink to line` not working when multiple folders are
added to the project.

Co-authored-by: Mikayla <mikayla@zed.dev>
2024-03-05 16:59:00 +01:00
Dzmitry Malyshau
d286c56ebb
Optimize rustybuzz and ttf-parser in Dev (#8873)
This PR improves the `draw()` time from hundreds to about 30ms, so
roughly 10x.
It makes Zed quite usable in Dev profile.

Release Notes:
- N/A
2024-03-05 06:37:28 -08:00
Jason Lee
0b34b1de7b
Fix first/last item margin on scroll (#8880)
![output](https://github.com/zed-industries/zed/assets/5518/e39a3600-99c4-4d3c-baee-efd53a474f38)

Before:

https://github.com/zed-industries/zed/assets/5518/f7a4563a-504a-4a41-bfd4-21e9439cd02b

After:

https://github.com/zed-industries/zed/assets/5518/0ba41527-46fd-404f-8207-1b8c5cf37434


Release Notes:

- Fixed first and last item margin when scroll view has padding
2024-03-05 15:54:48 +02:00
Thorsten Ball
537d92533c
Backport code_actions_on_format docs and update them (#8881)
Release Notes:

- N/A
2024-03-05 11:06:49 +01:00
Jason Lee
fae5e83d93
Fix all Picker Item cursor to use Pointer. (#8877)
Before:

https://github.com/zed-industries/zed/assets/5518/84874858-7847-4fa4-b7a3-41ecc65a2f7d

After: 

https://github.com/zed-industries/zed/assets/5518/d395ea96-aa26-4de1-8bfc-73cc43ee75cf


Release Notes:

- Made picker items to use `Pointer` cursor style
2024-03-05 11:32:57 +02:00
Jason Lee
6a268e959f
Improve VCS Menu header top margin. (#8879)
## Before

![SCR-20240305-nga](https://github.com/zed-industries/zed/assets/5518/e814d770-a5b1-4289-acc4-808bf7d96690)

![SCR-20240305-nge](https://github.com/zed-industries/zed/assets/5518/abba4f7c-7e6c-447f-8e4f-fbecdf802f62)

## After

![SCR-20240305-nfp](https://github.com/zed-industries/zed/assets/5518/5539b15c-c67d-466b-9c46-44e488788b04)

![SCR-20240305-nfu](https://github.com/zed-industries/zed/assets/5518/5cfdf861-b55c-4f1e-a41f-dcd42a449488)

Release Notes:

- Improve VCS Menu header top margin, and use `TextMuted` color for
matched count label.
2024-03-05 10:19:52 +01:00
Kirill Bulatov
4b2e774594
Fix license generation and Closure LSP repo link (#8876)
Release Notes:

- N/A
2024-03-05 10:43:02 +02:00
Conrad Irwin
e0c66b30c8
Fix panic in enclosing bracket ranges (#8870)
This function was operating in the wrong co-ordinate space (c.f. #8081)

Release Notes:

- Fixed a panic on `ctrl-m` in a multibuffer
2024-03-04 21:27:01 -07:00
Conrad Irwin
27c5343707
hosted projects (#8627)
- **Allow joining a hosted project**

You can't yet do anything in a hosted project, but you can join it and
look how empty it is.

Release Notes:

- N/A
2024-03-04 19:17:40 -07:00
Quadri A. Adekunle
4167c66b86
macOS: Fix center window with fixed bounds size (#8475)
This PR fixes window showing up in the center of the monitor when
`center: true` option is provided.

The idea is to set the `window_wize` when creating the `window` using
`native_window.initWithContentRect_styleMask_backing_defer_screen_()`

Before: 

<img width="851" alt="SCR-20240227-qokf"
src="https://github.com/zed-industries/zed/assets/20229808/27494966-2e97-4771-8837-ccb6658ced78">

After:

<img width="1132" alt="SCR-20240227-qlmg"
src="https://github.com/zed-industries/zed/assets/20229808/439568da-d380-4331-8d19-cd501f211c4c">


Release Notes:

- N/A
2024-03-04 17:08:29 -07:00
Noritada Kobayashi
d223fe446d
vim: Add support for ap and ip paragraph text objects (#7687)
This PR adds support for `ap`/`ip` text objects in Vim mode and allows
users to perform paragraph-based operations.

Cases where compatibility with Neovim's behavior is checked, cases where
there are known differences in behavior with Neovim (cases where the
landing position is other than the beginning of the line), and cases
where the Neovim behavior in the test suite seems strange are separated
in the test code so that they can be identified.

Release Notes:

- Added support for `ap` and `ip` paragraph text objects in Vim mode
([#7359](https://github.com/zed-industries/zed/issues/7359)).
2024-03-04 16:39:02 -07:00
snorkypie
b742db65fe
vim: Support keybinding z. (#8702)
`z.` is similar to zz but moves the cursor to the first non-blank
character.

From the documentation:
```
z.   Redraw, line [count] at center of window (default cursor line). Put cursor at first non-blank in the line.
zz   Like "z.", but leave the cursor in the same column.
```

Release Notes:

- Support the `z.` vim keybinding: Center cursor in window and put
cursor at first non-blank
2024-03-04 16:34:42 -07:00
Conrad Irwin
f53823c840
Remove release channel from Zed URLs (#8863)
Also adds a new command `cli: Register Zed Scheme` that will cause URLs
to be opened in the current zed version, and we call this implicitly if
you install the CLI

Also add some status reporting to install cli

Fixes: #8857



Release Notes:

- Added success/error reporting to `cli: Install Cli`
([#8857](https://github.com/zed-industries/zed/issues/8857)).
- Removed `zed-{preview,nightly,dev}:` url schemes (used by channel
links)
- Added `cli: Register Zed Scheme` to control which zed handles the
`zed://` scheme (defaults to the most recently installed, or
the version that you last used `cli: Install Cli` with)
2024-03-04 16:08:47 -07:00
Piotr Osiewicz
2201b9b116
task: Add task contexts (#8675)
This PR supplements tasks with additional environment variables; ideally
we'll be able to write a task like:
`cargo test -p $ZED_CURRENT_PACKAGE -- $ZED_CURRENT_FUNCTION`
- [x] Flesh out multibuffer interactions
- [x] Add ZED_SYMBOL detection based on tree-sitter queries
- [ ] Add release note and demo
- [x] Figure out a solution for rerun dilemma - should `task: rerun`
reevaluate contexts for tasks?

This PR introduced the following variables:
- ZED_COLUMN - current line column
- ZED_ROW - current line row
and the following, which are available for buffers with associated
files:
- ZED_WORKTREE_ROOT - absolute path to the root of the current worktree.
- ZED_FILE - absolute path to the file
- ZED_SYMBOL - currently selected symbol; should match the last symbol
shown in a symbol breadcrumb (e.g. `mod tests > fn test_task_contexts`
should be equal to ZED_SYMBOL of `test_task_contexts`). Note that this
isn't necessarily a test function or a function at all.

Also, you can use them in `cwd` field of definitions (note though that
we're using https://docs.rs/subst/latest/subst/#features for that, so
don't expect a full shell functionality to work); the syntax should
match up with your typical Unix shell.


Release Notes:

- Added task contexts, which are additional environment variables set by
Zed for task execution; task content is dependent on the state of the
editor at the time the task is spawned.

---------

Co-authored-by: Anthony <anthonyeid7@protonmail.com>
2024-03-04 21:04:53 +01:00
Conrad Irwin
b2f18cfe71
Ensure followed cursors are always visible (#8849)
Before this change they would disappear if you blurred the pane.

Release Notes:

- Fixed an issue where the followed users' cursor would disappear if you
blurred the pane.
2024-03-04 12:39:08 -07:00