Commit Graph

20877 Commits

Author SHA1 Message Date
Kirill Bulatov
89fbd6528f
Do not fold excerpts by default in the outline panel (#14378)
Release Notes:

- N/A
2024-07-13 04:08:21 +03:00
Kirill Bulatov
9ce989a704
Tidy up collab-related signature help data (#14377)
Follow-up of https://github.com/zed-industries/zed/pull/12909

* Fully preserve LSP data when sending it via collab, and only strip it
on the client.
* Avoid extra custom request handlers, and extend multi LSP server query
protocol instead.


Release Notes:

- N/A
2024-07-13 04:06:01 +03:00
Kirill Bulatov
dd63e25f23
Revert hold: true for macOS tasks (#14376)
Otherwise, ctrl-c makes them stuck being held from time to time

Follow-up of https://github.com/zed-industries/zed/pull/13898 that
reverts the macOS-related part of the PR.

Release Notes:

- N/A
2024-07-13 04:02:38 +03:00
Max Brunsfeld
489077befc
Extract a BufferStore object from Project (#14037)
This is a ~small~ pure refactor that's a step toward SSH remoting. I've
extracted the Project's buffer state management into a smaller, separate
struct called `BufferStore`, currently in the same crate. I did this as
a separate PR to reduce conflicts between main and `remoting-over-ssh`.

The idea is to make use of this struct (and other smaller structs that
make up `Project`) in a dedicated, simpler `HeadlessProject` type that
we will use in the SSH server to model the remote end of a project. With
this approach, as we develop the headless project, we can avoid adding
more conditional logic to `Project` itself (which is already very
complex), and actually make `Project` a bit smaller by extracting out
helper objects.

Release Notes:

- N/A
2024-07-12 15:25:54 -07:00
FilipeBisinella
21c5ce2bbd
Add pyright workspace configuration (#14265)
Release Notes:

- Added support for pyright workspace configuration, as described in
https://microsoft.github.io/pyright/#/settings .
2024-07-12 15:13:09 -07:00
Marshall Bowers
3deb000f70
assistant: Add basic glob support for expanding items in /docs (#14370)
This PR updates the `/docs` slash command with basic globbing support
for expanding docs.

A `*` can be added to the item path to signify the end of a prefix
match.

For example:

```
# This will match any documentation items starting with `auk::`.
# In this case, it will pull in the docs for each item in the crate.
/docs docs-rs auk::*

# This will match any documentation items starting with `auk::visitor::`,
# which will pull in docs for the `visitor` module.
/docs docs-rs auk::visitor::*
```


https://github.com/user-attachments/assets/5e1e21f1-241b-483f-9cd1-facc3aa76365

Release Notes:

- N/A
2024-07-12 17:57:50 -04:00
Mikayla Maki
fe3fe945a9
linux: Indicate when the window is focused (#14266)
fixes #14202

Release Notes:

- Added a representation of the current focus state to Zed's window
style ([#14202](https://github.com/zed-industries/zed/issues/14202))
2024-07-12 14:20:58 -07:00
Stanislav Alekseev
11178eacc7
Fix diagnostic popover not overflowing when necessary (#14322)
It was broken after #13996 moved rendering text one level deeper,
causing `max_h` and `overflow_y_scroll` to apply to different widgets
Release Notes:

- Fixed large diagnostic popovers not overflowing when nessesary

Before:
<img width="814" alt="Screenshot 2024-07-12 at 15 25 46"
src="https://github.com/user-attachments/assets/4f615600-2857-4470-8b77-864e3a9e38d5">

After:
<img width="813" alt="Screenshot 2024-07-12 at 15 26 10"
src="https://github.com/user-attachments/assets/83c1f344-b3b1-4929-8197-4b24a0e9c65e">
2024-07-12 14:14:11 -07:00
Stanislav Alekseev
59bc027750
Fix direnv option being named direnv and not load_direnv in the docs (#14309)
This is a quick followup to #13902 that fixes a mistake with the setting
naming in the docs, I accidentally made
Release Notes:

- N/A
2024-07-12 14:12:02 -07:00
张小白
0a718c65e2
windows: Return client size and position from window_bounds (#14228)
This is a follow up of #14218 , since we open the window based on the
size of the client area, `window_bounds` should also return the size of
the client area to maintain consistency.

Release Notes:

- N/A
2024-07-12 13:19:36 -07:00
Marshall Bowers
85d77a3eec
Clarify /docs error message when target/doc does not exist (#14364)
This PR improves the error message shown by the `/docs` slash command
when indexing fails due to the absence of `target/doc`.

We now distinguish between the overall `target/doc` directory missing
and an individual crate directory missing beneath it.

Release Notes:

- N/A
2024-07-12 16:09:16 -04:00
Marshall Bowers
ca80343486
assistant: Add docs provider for docs.rs (#14356)
This PR adds an indexed docs provider for retrieving docs from `docs.rs`
using the `/docs` slash command.

Release Notes:

- N/A
2024-07-12 13:22:52 -04:00
Semen Fomchenkov
739038ddaf
docs: Add ALT Linux (Sisyphus) (#14351)
Added ALT Linux (Sisyphus) as one of the ways to install via the package
manager in linux.md.

Release Notes:

- N/A
2024-07-12 12:59:17 -04:00
Peter Tripp
106e0623dd
PlainText language: Default to SoftWrap::EditorWidth (#14331)
- Remove wrap guide / vertical ruler in untitled buffers
- Fixes https://github.com/zed-industries/zed/issues/12473
2024-07-12 11:10:59 -04:00
Peter Tripp
607ad6de3c
zig: Improve indentation (#14332)
- Fixes https://github.com/zed-industries/zed/issues/14140
2024-07-12 10:24:07 -04:00
Kirill Bulatov
ea26a01f5f
Do not render a signature popover when its location is before the visible range (#14307)
Follow-up of https://github.com/zed-industries/zed/pull/12909

Release Notes:

- N/A
2024-07-12 11:31:52 +03:00
Stanislav Alekseev
8abc000553
Fix nushell local env detection by using direnv export (#13902)
I don't intend fully on getting this merged, this is just an experiment
on using `direnv` directly without relying on shell-specific behaviours.
It works though, so this finally closes #8633
Release Notes:

- Fixed nushell not picking up `direnv` environments by directly
interfacing with it using `direnv export`

---------

Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
2024-07-12 10:29:32 +02:00
Kirill Bulatov
9f5309cedd
Remove non-default wrap setting for markdown (#14304)
With this setting, markdown files are one of the few that get a line
wrap indicator, a vertical line on the right, which confuses people.

Release Notes:

- N/A
2024-07-12 11:15:57 +03:00
Conrad Irwin
adf74fdc14
linux: Fix panic handling unknown keys (#14274)
Pulls in https://github.com/rust-x-bindings/xkbcommon-rs/pull/54 to
avoid
panicking.

Release Notes:

- linux: Fix a panic in keyboard handling
2024-07-11 17:03:19 -06:00
sherwyn
e402d7e96a
vim: Add support for vim::PreviousLineStart motion (#14193)
Release Notes:

- vim: Added `-`/`+` to go to beginning of line above/below
([#14183](https://github.com/zed-industries/zed/issues/14183)).
- vim: (Breaking) Removed non-standard builtin binding from `-` to open
the project panel. You can re-add it to your keymap file with:
`{"context":"VimControl", "bindings":{ "-":
"pane::RevealInProjectPanel"}}`


Optionally, include screenshots / media showcasing your addition that
can be included in the release notes.


https://github.com/zed-industries/zed/assets/32429059/0e9e9348-265e-4a81-a45a-4739034dc5d9

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-07-11 16:36:07 -06:00
Conrad Irwin
12dfd4a2c2
Don't panic on unknown cursor style on x11 (#14264)
Release Notes:

- linux: Fixed a panic if we request a cursor style your system doesn't
support
2024-07-11 16:05:01 -06:00
Conrad Irwin
b87d1eabcc
linux: Panic less on window init (#14255)
This change pulls in https://github.com/kvark/blade/pull/135 and updates
the simplelog dependency for compatibility with that.


Release Notes:

- linux: Show link to troubleshooting docs when we can't open a window
2024-07-11 16:04:46 -06:00
Max Brunsfeld
ac528dda64
Fix panic when evaluating a code snippet containing multi-byte characters (#14269)
Also, don't retrieve code snippets when rendering the repl quick action
button

Release Notes:

- N/A

---------

Co-authored-by: Kyle Kelley <kylek@zed.dev>
Co-authored-by: Kyle Kelley <rgbkrk@gmail.com>
2024-07-11 15:04:13 -07:00
Marshall Bowers
906688f012
assistant: Show a warning indicator when the user needs to run cargo doc (#14262)
This PR updates the `/docs` slash command to show a warning to the user
if a crate's docs cannot be indexed due to the target directory not
containing docs:

<img width="782" alt="Screenshot 2024-07-11 at 5 11 46 PM"
src="https://github.com/user-attachments/assets/2f54f7a1-97f4-4d2d-b51f-57ba31e50a2f">

Release Notes:

- N/A
2024-07-11 17:37:31 -04:00
Nate Butler
c18e9aedcd
Add items_baseline to Styled (#14238)
Add support for aligning items to the baseline.

Release Notes:

- N/A

---------

Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
2024-07-11 16:38:21 -04:00
Marshall Bowers
cd4847ca22
assistant: Use a more generic icon for the /docs command (#14247)
This PR updates the `/docs` slash command to use a more generic icon to
convey docs.

It was still using the Rust icon, a relic of when it was still
`/rustdoc`.

Release Notes:

- N/A
2024-07-11 15:46:33 -04:00
Brad Pitcher
4c63e8b203
docs: Fix Linux aarch64 tarball links (#14245)
Fixed tarball documentation links for linux aarch64 (they were pointing
at x86_64 tarballs)

Release Notes:

- N/A
2024-07-11 15:43:10 -04:00
TC
d9d8c1f6d9
assistant: Handle http:// links in /fetch (#14243)
Previously http://google.com would get modified to
https://http://google.com which doesn't work. I assume http links should
be supported.

Release Notes:

- N/A
2024-07-11 15:30:45 -04:00
Conrad Irwin
b0dbc80575
vim: (BREAKING) clean up keymap contexts (#14233)
Release Notes:

- vim: (BREAKING) Improved vim keymap contexts.

Previously `vim_mode == normal` was true even when operators were
pending, which led to bugs like #13789 and a requirement for custom
keymaps to exclude various conditions like (`!VimObject` and
`!VimWaiting`) to avoid bugs.

Now `vim_mode` will be set to `operator` or `waiting` in these cases as
described in [the docs](https://zed.dev/docs/vim#keybindings). For most
custom keymaps this change will be a no-op or an improvement, but if you
were deliberately relying on the old behaviour (if you were relying on
`VimObject` or `VimWaiting` becoming true) you will need to update your
keymap.

---------

Co-authored-by: Thorsten <thorsten@zed.dev>
2024-07-11 13:16:26 -06:00
Mikayla Maki
8e853e2b56
Update linux.md 2024-07-11 12:05:59 -07:00
Mikayla Maki
47a78907d6
Update system-requirements.md 2024-07-11 11:59:52 -07:00
Mikayla Maki
0c1a3db87d
Update getting-started.md 2024-07-11 11:50:36 -07:00
Omer Tuchfeld
3541a1175f
Disrupt blink for immediate feedback on cursor shape changes (#14177)
# Issue

When a user does something that changes the cursor shape, such as when
switching between vim modes, there may be an up to 500ms (cursor blink
interval) delay until the user receives feedback for their action. This
happens when the shape change happens during the invisible phase of a
blink - the user will not see the cursor shape change until the next
phase, which could be 500ms away.

# Solution

Cursor shape changes should disrupt blinking by forcing the cursor to be
shown, this results in immediate feedback for shape changes. This is in
line with the behavior of other editors I've tried.

Release Notes:

- Improved visual feedback when changing cursor shape
2024-07-11 12:47:10 -06:00
Kyle Kelley
e51d469025
Invalidate anchors when they get deleted (#14116)
Allows deleting the outputs directly within the editor. This also fixes
the overlap logic to make sure that the ends and the starts are
compared.


https://github.com/zed-industries/zed/assets/836375/84f5f582-95f3-4c6a-a3c9-54da6009e34d

Release Notes:

- N/A

---------

Co-authored-by: Antonio <antonio@zed.dev>
2024-07-11 11:21:41 -07:00
Conrad Irwin
018a2a29ea
vim: Fix c when range ends in a multibyte character (#14139)
Release Notes:

- vim: Fixed `c <motion>` omitting trailing multibyte characters
([#13909](https://github.com/zed-industries/zed/issues/13909)).
2024-07-11 12:01:56 -06:00
Donough Liu
d49727ff10
terminal: Set TERM_PROGRAM and TERM_PROGRAM_VERSION environment variables in integrated terminal (#14213)
![image](https://github.com/zed-industries/zed/assets/31354274/9d1c5410-897b-40a1-8256-2d7e207f69ff)

These two environment variables are essential when people need to detect
terminal type and do something. Many popular terminals set them.

fixes https://github.com/zed-industries/zed/issues/4571

Release Notes:

- Set `TERM_PROGRAM` and `TERM_PROGRAM_VERSION` environment variables in
the integrated terminal
([#4571](https://github.com/zed-industries/zed/issues/4571)).
2024-07-11 20:48:46 +03:00
oliverpool
c195c4ddff
docs: Document buffer_line_height (#14168)
`buffer_line_height` has been requested in #5590 and implemented in
#2718, however the documentation was still lacking.

Release Notes:

- N/A
2024-07-11 13:42:27 -04:00
Stanislav Alekseev
fd03454540
Fix reverse selections always being cleared (#14150)
When I implemented #13701, I kinda messed up with the reversed
selections, thinking that their anchors are flipped, so I flipped them
again. This caused the reverse selections to always be cleared

Release Notes:

- Fix reverse selections always being cleared, even if the right click
was performed inside
2024-07-11 11:35:18 -06:00
张小白
6eeec9b403
windows: Create window with correct size (#14218)
The `Bounds<DevicePixels>` we use to create a window represents the size
of the drawable area.

### Before:



https://github.com/zed-industries/zed/assets/14981363/52f0d196-b113-4b64-a0d1-407972674990

### After



https://github.com/zed-industries/zed/assets/14981363/83298b6c-5e5f-4a47-b051-35b4a02404ac



Release Notes:

- N/A
2024-07-11 09:54:59 -07:00
Marshall Bowers
b558e8da1e
svelte: Bump to v0.0.2 (#14220)
This PR bumps the Svelte extension to v0.0.2.

Changes:

- https://github.com/zed-industries/zed/pull/12788

Release Notes:

- N/A
2024-07-11 11:47:44 -04:00
Peter Tripp
1d7b28c658
Add Upper/LowerCase binds to Linux Sublime Text keybinds (#14155) 2024-07-11 11:15:49 -04:00
Peter Tripp
de78eb44b1
Keymap changes for editor::JoinLines (#14136)
- Linux (default) add ctrl-shift-j
- Linux (default) remove ctrl-j
  - Conflicted with: `"ctrl-j": "workspace::ToggleBottomDock",`
- MacOS (sublime) add cmd-shift-j
2024-07-11 11:14:25 -04:00
Danilo Leal
c071e19899
docs: Add stray design tweaks (#14205)
- Mostly just tweaking some design (colors & spacing) stuff
- Some small accessibility things—e.g., underline decoration for links
and one h1 only per page
- Most of the other captured changes are really just Prettier indenting
stuff

Release Notes:

- N/A
2024-07-11 11:57:22 -03:00
Marshall Bowers
37fc4ce09d
Allow Zed Nightly to use v0.0.7 of the Zed extension API (#14209)
This PR updates the Wasm API compatibility check to allow Nightly to
load extensions using v0.0.7 of the Zed extension API.

Release Notes:

- N/A
2024-07-11 10:54:15 -04:00
Danilo Leal
99f56252be
docs: Tiny formatting tweaks on the Linux page (#14208)
Release Notes:

- N/A
2024-07-11 11:53:34 -03:00
Aleksei Gusev
f61abe0247
Pass hold: true to Alacritty for tasks (#13898)
It seems `hold: false` causes alacritty to close the channel earlier,
without waiting for the output from the child command to go to Zed.

Fixes [#13683](https://github.com/zed-industries/zed/issues/13683)

Release Notes:

- Fixed loosing output of a spawned task
([#13683](https://github.com/zed-industries/zed/issues/13683)).

[Screencast from 2024-07-06
18-28-56.webm](https://github.com/zed-industries/zed/assets/39293/4ebef8b5-7c0d-46be-9341-4ac0d809458d)
2024-07-11 17:50:00 +03:00
Marshall Bowers
45c54d189a
assistant: Show a message when no docs providers are available (#14207)
This PR updates the `/docs` slash command to show a message to more
clearly indicate when there are no available docs providers.

<img width="379" alt="Screenshot 2024-07-11 at 10 31 53 AM"
src="https://github.com/zed-industries/zed/assets/1486634/d079f87c-4933-4da9-ad82-34dbfe6a284c">

Release Notes:

- N/A
2024-07-11 10:49:13 -04:00
Piotr Osiewicz
2727f55772
Add support for projects managed with Yarn (#13644)
TODO:
- [ ] File a PR with Yarn to add Zed to the list of supported IDEs.

Fixes: https://github.com/zed-industries/zed/issues/10107
Fixes: https://github.com/zed-industries/zed/issues/13706
Release Notes:

- Improved experience in projects using Yarn. Run `yarn dlx
@yarnpkg/sdks base` in the root of your project in order to elevate your
experience.

---------

Co-authored-by: Saurabh <79586784+m4saurabh@users.noreply.github.com>
2024-07-11 14:56:07 +02:00
tomoikey
291d64c803
lsp: Implement textDocument/signatureHelp for ProjectClientState::Local environment (#12909)
Closes https://github.com/zed-industries/zed/issues/5155
Closes https://github.com/zed-industries/zed/issues/4879


# Purpose
There was no way to know what to put in function signatures or struct
fields other than hovering at the moment. Therefore, it was necessary to
implement LSP's `textDocument/signatureHelp`.

I tried my best to match the surrounding coding style, but since this is
my first contribution, I believe there are various aspects that may be
lacking. I would greatly appreciate your code review.

# Description
When the window is displayed, the current argument or field at the
cursor's position is automatically bolded. If the cursor moves and there
is nothing to display, the window closes automatically.
To minimize changes and reduce the burden of review and debugging, the
SignatureHelp feature is implemented only when `is_local` is `true`.
Some `unimplemented!()` macros are embedded, but rest assured that they
are not called in this implementation.

# How to try it out
Press `cmd + i` (MacOS), `ctrl + i` (Linux).

# Enable auto signature help (2 ways)
### Add `"auto_signature_help": true` to `settings.json`
<img width="426" alt="image"
src="https://github.com/zed-industries/zed/assets/55743826/61310c39-47f9-4586-94b0-ae519dc3b37c">

Or

### Press `Auto Signature Help`. (Default `false`)
<img width="226" alt="image"
src="https://github.com/zed-industries/zed/assets/55743826/34155215-1eb5-4621-b09b-55df2f1ab6a8">

# Disable to show signature help after completion
### Add `"show_signature_help_after_completion": false` to
`settings.json`
<img width="438" alt="image"
src="https://github.com/zed-industries/zed/assets/55743826/5e5bacac-62e0-4921-9243-17e1e72d5eb6">

# Movie

https://github.com/zed-industries/zed/assets/55743826/77c12d51-b0a5-415d-8901-f93ef92098e7

# Screen Shot
<img width="628" alt="image"
src="https://github.com/zed-industries/zed/assets/55743826/3ebcf4b6-2b94-4dea-97f9-ac4f33e0291e">

<img width="637" alt="image"
src="https://github.com/zed-industries/zed/assets/55743826/6dc3eb4d-beee-460b-8dbe-d6eec6379b76">

Release Notes:

- Show function signature popovers
([4879](https://github.com/zed-industries/zed/issues/4879),
[5155](https://github.com/zed-industries/zed/issues/5155))

---------

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
2024-07-11 13:38:33 +03:00
Piotr Osiewicz
6a11184ea3
dart: Release 0.0.3 (#14176)
Includes: https://github.com/zed-industries/zed/pull/13686

Release Notes:

- Added Flutter tasks to Dart extension.
2024-07-11 11:48:04 +02:00