Commit Graph

20580 Commits

Author SHA1 Message Date
Mikayla Maki
e7214a429d
Update linux.md 2024-07-01 12:54:02 -07:00
Marshall Bowers
c9ac7b8e35
assistant: Remove unused NowPlaceholder (#13713)
This PR removes the `NowPlaceholder` component, as it was no longer
used.

Release Notes:

- N/A
2024-07-01 15:33:47 -04:00
Bennet Bo Fenner
e243856559
Add terminal inline assistant (#13638)
Release Notes:

- N/A

---------

Co-authored-by: Antonio <antonio@zed.dev>
2024-07-01 20:53:56 +02:00
Marshall Bowers
c516b8f038
zig: Revert 464a4439f7c71e867da481e99e22ad99cc23807e (#13712)
This PR reverts the changes from #13709, now that we've published a new
version of the Zig extension with them.

This reverts commit 464a4439f7.

Release Notes:

- N/A
2024-07-01 14:45:42 -04:00
Marshall Bowers
03447b9e18
zig: Bump to v0.1.3 (#13710)
This PR bumps the Zig extension to v0.1.3 so we can republish with
#13709.

Release Notes:

- N/A
2024-07-01 14:37:40 -04:00
Marshall Bowers
464a4439f7
zig: Temporarily roll back changes depending on new extension API (#13709)
This PR temporarily rolls back the changes in #12173 so that we can
publish a new version of the Zig extension.

There was a problem stemming from #12614 that caused v0.1.2 of the Zig
extension to get re-published with unreleased `zed_extension_api`
changes.

Once we publish v0.1.3 we'll be able to revert this change.

Release Notes:

- N/A
2024-07-01 14:28:27 -04:00
Kirill Bulatov
0e60730742
Slightly improve project panel ergonomics (#13704)
* properly fetch outlines from channel notes and other project-less
external files
* show better messages when for no contents
* make file entries collapsible (hiding all excerpts and outlines
beneath), keep the initial panel state unfolded up to file level


Release Notes:

- Slightly improved project panel ergonomics
2024-07-01 19:36:20 +03:00
Bennet Bo Fenner
25ad3185e0
Remove invalid symlink in title bar crate (#13702)
This removes an invalid symlink to a non-existing license file, which
was added in #13597.

Release Notes:

- N/A
2024-07-01 17:34:46 +02:00
Piotr Osiewicz
bac6e2fee7
tasks: Add experimental support for user-defined task variables (#13699)
Context:
@bennetbo spotted a regression in handling of `cargo run` task in zed
repo following a merge of #13658. We've started invoking `cargo run`
from the folder of an active file whereas previously we did it from the
workspace root. We brainstormed few solutions that involved adding a
separate task that gets invoked at a workspace level, but I realized
that a cleaner solution may be to finally add user-configured task
variables. This way, we can choose which crate to run by default at a
workspace level.

This has been originally brought up in the context of javascript tasks
in
https://github.com/zed-industries/zed/pull/12118#issuecomment-2129232114

Note that this is intended for internal use only for the time being.
/cc @RemcoSmitsDev we should be unblocked on having runner-dependant
tasks now.

Release notes:

- N/A
2024-07-01 15:59:19 +02:00
Gilles Peiffer
065ab93ca7
Use user-defined font weight, where appropriate (#13653)
Release Notes:

- N/A
2024-07-01 09:45:01 -04:00
Aleksei Gusev
83592306c5
Add a test for PageUp/PageDown in completion list (#13670)
This is just tests to verify [the fix for PageUp/PageDown in the
completions list](6e1b99b039) that was
previously added works properly. @SomeoneToIgnore Please check when you
have a moment. Thanks

Release Notes:

- N/A
2024-06-30 16:03:55 +03:00
Kirill Bulatov
e650c0166d
Fix Prettier parser values when formatting files with paths (#13666)
Closes https://github.com/zed-industries/zed/issues/13660

Now, as intended, the parser value is passed only if configured in the
language settings.

Also, allows to format JSONC by default with Prettier and reformats Zed
settings.

Release Notes:

- Fixed Zed Prettier integration always passing parser value for files
with paths ([13660](https://github.com/zed-industries/zed/issues/13660))
2024-06-29 11:37:22 +03:00
Piotr Osiewicz
f1859e3645
Rust: Execute tasks from files ZED_DIRNAME (#13658)
Fixes #13267

Release Notes:

- Fixed Rust tests not working when crates Cargo.toml is not at the root
of a worktree.
2024-06-28 22:17:45 +02:00
Peter Tripp
b1a0188467
Fix: Atom keymap in ProjectPanel (#13655)
- Fix various keys [aAD] which did not function in Project Panel filename entry with Atom Keybind.
2024-06-28 15:29:45 -04:00
Piotr Osiewicz
218629cdd4
language: Memoize value of has_edits_since for a given buffer version (#13656)
As a drive-by of https://github.com/zed-industries/zed/pull/13654, I've
noticed that the editor felt sluggish after I've undone the changes made
by the replacement. It turns out that we are repeatedly checking whether
there are any edits to estabilish dirty/conflict state of a buffer, even
though this operation is pure; this PR stores away the result of a
computation and refers to it before rerunning it.

Release Notes:

- Improve editor's performance with large undo histories
2024-06-28 20:23:59 +02:00
Piotr Osiewicz
0761383752
search: Improve performance of replace_all (#13654)
Previously replace_all amounted to what could be achieved by repeatedly
mashing "Replace" button, which had a bunch of overhead related to
buffer state syncing. This commit gets rid of the automated button
mashing, processing all of the replacements in one go.

Fixes #13455



Release Notes:

- Improved performance of "replace all" in buffer search and project
search
2024-06-28 19:06:44 +02:00
Gilles Peiffer
b616f9c27f
Add doc entry for buffer_font_weight setting (#13651)
As discussed in #13598.

Release Notes:

- N/A
2024-06-28 19:04:26 +03:00
Johannes
5e465f2029
Add duplicate line shortcut to sublime_text.json (#13640)
Release Notes:

- Added duplicate line shortcut to Sublime Text shortcuts
2024-06-28 19:03:27 +03:00
Kirill Bulatov
7d767ff0a3
Use a human-readable date format for the now command's label (#13632)
Before:

![image](https://github.com/zed-industries/zed/assets/2690773/063887fb-1a28-4922-afd1-b2dc4117a03d)

After:
<img width="435" alt="Screenshot 2024-06-28 at 18 52 08"
src="https://github.com/zed-industries/zed/assets/2690773/8e9fd285-1991-4088-a93a-5ea3259d364a">
<img width="480" alt="Screenshot 2024-06-28 at 18 52 10"
src="https://github.com/zed-industries/zed/assets/2690773/7853fc90-6a63-4e66-bb83-2ed37d41b1b9">


Release Notes:

- N/A
2024-06-28 18:57:29 +03:00
Thorsten Ball
3cabd4bf64
gpui example: Fix SVG not showing up when running from root (#13648)
Took me a while to figure out that I can't run

    cargo run -p gpui --example animation

and that it has to run in the `gpui` crate.

So I thought I'd fix this.

Release Notes:

- N/A
2024-06-28 15:58:19 +02:00
Marshall Bowers
2972bdc0e2
docs: Make it clearer how to disable ligatures with buffer_font_features (#13645)
This PR updates the docs around disabling font ligatures to make it
clearer which OpenType features need to be changed.

Release Notes:

- N/A
2024-06-28 09:24:15 -04:00
Peter Tripp
a295b90597
Fix typo in tab_bar.show default value rustdoc (#13641)
Fixes #13639

Release Notes:

- N/A
2024-06-28 08:48:10 -04:00
Peter Tripp
891f195f7b
Add support for .markdown extension (#13609)
Fixes #13608

Release Notes:

- Added recognizing *.markdown files as Markdown
([#13608](https://github.com/zed-industries/zed/issues/13608)).
2024-06-28 08:34:06 -04:00
Aleksei Gusev
6e1b99b039
Fix PageUp for context menu (#13593)
The PageUp key was not working for the context menu. Instead of
selecting one of the previous items in the context menu, `MovePageUp`
closed the menu and scrolled the editor. `MovePageDown` was working
correctly because it has the same fix.



Release Notes:

- Fixed `pageup` key, when bound to `editor::MovePageUp`, not moving context menus as other keys
2024-06-28 12:03:30 +03:00
Kirill Bulatov
00d1561156
Use better names for prompts duplicated (#13630)
Repeats project panel duplicated file name logic for prompts:
* add a ` copy` suffix
* if conflicts still, add a ` i` digit suffix, where `i` is the first
number available starting from 1

Release Notes:

- N/A
2024-06-28 10:26:45 +03:00
Aleksei Gusev
d5fbf75ccf
Add keyboard shortcuts for scrolling in terminal (#13508)
Fixes #4917, #12231

Release Notes:
-  Added keyboard shortcuts for scrolling in terminal ([4917](https://github.com/zed-industries/zed/issues/4917), [12231](https://github.com/zed-industries/zed/issues/12231))
2024-06-28 10:26:14 +03:00
Nathan Sobo
61bbb3539a
Fix a stupid bug that was dropping system prompts for Claude (#13626)
Release Notes:

- Fixed a bug that was causing system prompts to be dropped for
Anthropic models.

@JosephTLyons @notpeter We probably need to hot-fix this as I'm pretty
sure this affects the regular anthropic provider in addition to just the
feature-flagged cloud stuff. Wouldn't mind confirming that first so we
can communicate around it. 😬
2024-06-27 22:08:47 -06:00
Conrad Irwin
c560a24e7d
Default theme to match system (#13621)
Release Notes:

- Default to a light theme during the day (#9627)
2024-06-27 22:06:22 -06:00
Conrad Irwin
da03610555
vim: Fix issues with r/R (#13623)
Release Notes:

- vim: Fix undo after repeated insert/replace mode (#13573)
- vim: Fix 'r' repeating too much (#13566)
2024-06-27 21:54:34 -06:00
Conrad Irwin
363ac6bc96
vim: Empty pane improvements (#13624)
Release Notes:

- vim: Fixed `:` in empty diagnostics view
- vim: Fixed `g/` outside of an editor
2024-06-27 21:54:03 -06:00
Max Brunsfeld
97159bd88d
Associate logs from log_err with the calling crate (#13617)
Now, when you selectively enable logs from particular crates with
`RUST_LOG=call,worktree`, logs created via `log_err` calls in those
crates get correctly enabled. Previously, they were all attributed to
the `util` crate, because they used the normal logging macros, which
implicitly insert the current crate name.

This relies on the regularity of our directory naming. Rust's
`track_caller` feature allows you to obtain the file system path of the
caller, but not its rust module path, so I'm inferring the crate name
from the file system path (which I believe is always valid, in our
codebase).

Release Notes:

- N/A
2024-06-27 17:03:47 -07:00
Nate Butler
0b57df5deb
Extract title_bar crate (#13597)
This PR extracts a singular title bar (`title_bar::TitleBar`) from
`ui::TitleBar` and
`collab_ui::collab_titlebar_item::CollabTitlebarItem`.

This is a first step towards organizing title bar things into one place,
and standardizing platform titlebar/window control implementations.

Release Notes:

- N/A
2024-06-27 19:14:13 -04:00
Conrad Irwin
7652a8ae23
Fix font selection on macOS (#13615)
Release Notes:

- N/A
2024-06-27 17:02:45 -06:00
Conrad Irwin
1d193585b0
Fix multi-keystroke shortcuts better (#13612)
Release Notes:

- N/A
2024-06-27 16:39:05 -06:00
Bennet Bo Fenner
af5efcea1f
Fix typo in README (#13610)
Fixes a typo in the README which (I believe) was accidentally committed
in #13604

Release Notes:

- N/A
2024-06-27 23:58:23 +02:00
Yongkang Chen
228202a469
Store starts open state of outline panel (#13601)
- Fixed issue where outline panel remains open despite being closed
before window close.

Before the release of Outline Panel feature, everything works fine. But
after that, the outline panel keeps open. It's very annoy that I only
want to edit a simple file. Event I close it before I close the window.
The active state of this panel didn't stored.

### Description:
Before the introduction of the Outline Panel feature, the application
behaved as expected. However, with the addition of the Outline Panel, an
issue arose where the panel would persistently remain open. This
behavior was observed even when manually closing the panel before
closing the application window. The problem stemmed from the inactive
state of the panel not being stored properly. This fix addresses the
issue by ensuring that the panel's active state is correctly stored and
retrieved, thereby improving user experience and preventing unnecessary
persistence of the panel's visibility.

### Screen Records

#### Before Release of Outline Panel


https://github.com/zed-industries/zed/assets/704762/2a222c70-c6d7-4472-9f27-7868d1786a5f


#### After Release of Outline Panel


https://github.com/zed-industries/zed/assets/704762/69c16a5d-beed-4d4a-8341-83c53f6a6713


#### After Fixing This Issue


https://github.com/zed-industries/zed/assets/704762/f51c5df7-54e3-4a62-ac54-b5d12cfe69d1

### Release Notes:

- Persist outline panel open state to avoid opening it on Zed startup
2024-06-27 23:51:42 +03:00
Conrad Irwin
e1fbef0dfd
Fix multi-key shortcuts (#13606)
Broken by the shift shift support PR

Release Notes:

- Fix multi-key shortcuts (preview only)
2024-06-27 14:44:18 -06:00
Conrad Irwin
7d7fd7d25d
Move from Zed fonts to IBM Plex (#13596)
Release Notes:

- Changed the default fonts to IBM Plex Sans and IBM Plex Mono. If you'd
like to go back to using Zed Sans/Zed mono you need to
[download](https://github.com/zed-industries/zed-fonts/releases/tag/1.2.0)
them and install them.
2024-06-27 14:36:44 -06:00
Conrad Irwin
6a1b257d39
Fix X11 window activation better (#13604)
Release Notes:

- N/A
2024-06-27 14:36:29 -06:00
Mikayla Maki
a695322f83
Fix incorrect point types in scroll calculations (#13600)
fixes https://github.com/zed-industries/zed/issues/13559

Release Notes:

- Fixed incorrect scroll behavior when using different
`scroll_beyond_last_line` settings
([#13559](https://github.com/zed-industries/zed/issues/13559)) (preview
only)
2024-06-27 11:19:27 -07:00
Evan Liu
cb2d05b78f
editor: Fix scroll_beyond_last_line off for short files (#13571)
Release Notes:

- Fixed bug with `scroll_beyond_last_line: off` for short files
([#13559](https://github.com/zed-industries/zed/issues/13559)).
2024-06-27 10:10:30 -07:00
Aditya Kumar
45d4de75b3
Add jq as a dependency for Linux script for Arch Linux (#13569)
## Error
```sh
./script/install-linux 

+ [[ 0 -gt 0 ]]
+ export ZED_CHANNEL=dev
+ ZED_CHANNEL=dev
++ pwd
+ export 'ZED_UPDATE_EXPLANATION=You need to fetch and rebuild zed in /home/adityakrcodes/repos/zed'
+ ZED_UPDATE_EXPLANATION='You need to fetch and rebuild zed in /home/adityakrcodes/repos/zed'
+ script/bundle-linux
+ getopts h flag
+ export ZED_BUNDLE=true
+ ZED_BUNDLE=true
+ channel=dev
++ script/get-crate-version zed
script/get-crate-version: line 16: jq: command not found <-- ERROR
+ version=
```
The script fails to install zed on Arch Linux due to a missing
dependency, `jq`.
## My machine info
OS: Arch Linux
Kernel: 6.6.34-1-lts 
WM: dwm 
Terminal: kitty
CPU: Ryzen 5 5500U with Radeon Graphics
GPU: AMD ATI 04:00.0 Lucienne 
Memory: 16 GB

## Error Description
The error occurs when running the script in `script/install-linux`,
which is unable to find the `jq` package, which is not installed by
default on the machine.
## Solution
To resolve this issue, you can install `jq` independently by running
`sudo pacman -S jq`. Alternatively, I have updated script `script/linux`
to include `jq` as a dependency ([link to the
commit](2349ad111f)),
ensuring it is installed automatically when running the initial script
for system libraries.

Release Notes:

- N/A
2024-06-27 09:58:53 -06:00
Peter Tripp
20c1f8245a
Improve PageUp/PageDown keybinds for Linux/Mac (#13510)
This makes pageup/pagedown move the cursor too.  Fixes: #13389

Co-authored-by: llogick <16590917+llogick@users.noreply.github.com>
2024-06-27 09:26:53 -04:00
Kirill Bulatov
b16075d00c
Enable "duplicate prompt" button (#13588)
Release Notes:

- N/A
2024-06-27 16:11:43 +03:00
Piotr Osiewicz
da22e0dd0b
Revert "vue: Release 0.0.4" (#13584)
Reverts zed-industries/zed#13580 as it turned out that the issue lied in
incorrect user settings.

Release notes:
- N/A
2024-06-27 11:36:17 +02:00
Tim Havlicek
fb3ef0d140
Add separate JSONC language (#12655)
Resolves https://github.com/zed-industries/extensions/issues/860 and
https://github.com/zed-industries/zed/issues/10921, also
https://github.com/biomejs/biome-zed/issues/11.

### Problem:
When opening .json files, zed allows comments by default in the JSON
language, which can cause some problems.
For example, language-servers also get "json" as the language, which may
show errors for those comments.

<img width="935" alt="image"
src="https://github.com/zed-industries/zed/assets/10381895/fed3d83d-abc0-44b5-9982-eb249bb04c3b">

### Solution:

This PR adds a JSONC language. 

<img width="816" alt="image"
src="https://github.com/zed-industries/zed/assets/10381895/8b40e671-d4f0-4e8d-80cb-82ee7c0ec490">

This allows for more specific configuration for language servers. 
Also any json file can be set explicitly to be JSONC using the
file_types setting:

```jsonc
{
  "file_types": {
    // set all .json files to be seen as JSONC
    "JSONC": ["*.json"]
  }
}
```


Release Notes:

- N/A
2024-06-27 11:12:02 +02:00
Piotr Osiewicz
e71b642f44
vue: Release 0.0.4 (#13580)
Respect user settings in initialization_options.


Release Notes:

- Fixed Vue extension not picking up user-provided initialization
options.
2024-06-27 11:11:22 +02:00
Jason Lee
6cedfa0ce7
example: Fix Input example mistake (#13574)
![CleanShot 2024-06-27 at 15 52
48](https://github.com/zed-industries/zed/assets/5518/71b25759-0cd5-40ed-b7c2-2f1045f81683)

Release Notes:

- N/A
2024-06-27 11:28:44 +03:00
Gilles Peiffer
209b1d1931
Code maintenance in the editor crate (#13565)
Release Notes:

- N/A
2024-06-27 09:40:48 +03:00
Gilles Peiffer
6986ac4c27
Use iterators instead of loops in clock.rs (#13561)
This should be slightly faster and makes the code easier to read.

Release Notes:

- N/A
2024-06-27 09:30:21 +03:00