Commit Graph

20590 Commits

Author SHA1 Message Date
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
Peter Tripp
d50d1611b9
Release notes upload fix (#13560)
- Action for release notes upload (softprops/action-gh-release) configured with incorrect key. 
- Valid keys here: https://github.com/softprops/action-gh-release?tab=readme-ov-file#-customizing
2024-06-26 17:24:59 -04:00
Gilles Peiffer
1260c616ba
Simplify font feature tag validation (#13548)
Simplifies the logic for the changes of #13542.

Release Notes:

- N/A
2024-06-26 17:11:57 -04:00
Joseph T. Lyons
89951f7e66
Add shift shift to open command palette (#13556)
I've add `shift shift` as a default keybinding to open command palette,
when using JetBrains keymap, along with the already existing
`cmd-shift-a`. This isn't quite right, as in JetBrains, `cmd-shift-a`
opens the actions modal, which would be our command palette, and `shift
shift` actually opens up a view for searching everything, commands,
actions, settings, etc - we do not have a unified modal for these
things, so I think this is the best thing we can do. Some users might
want to change this to be our file picker, but I think adding it as the
default at least puts it on their radar that they can use this type of
binding; they can change it if they want.

Release Notes:

- Added `shift shift` as a default binding to open the command palette
in the JetBrains keymap.
2024-06-26 16:44:40 -04:00
Conrad Irwin
cd81dad2fa
fix panics (#13554)
Release Notes:

- Fixed a panic when editing HTML near the end of a file
- Fixed a panic when editing settings.json from inside the .zed
directory
2024-06-26 14:32:16 -06:00
Piotr Osiewicz
3a08d7ab43
json: Fix package-version-server referencing the wrong path to the binary (#13555)
We were trying to access the binary at
package-version-server-{VERSION}/package-version-server, whereas the
binary itself is placed at package-version-server-{VERSION}

Release Notes:

- Fixed package.json language server failing to start.

Co-authored-by: Peter Tripp <peter@zed.dev>
2024-06-26 16:17:55 -04:00
Josef Zoller
49dc63812a
Stop relying on binary location to be in libexec on Linux (#13374)
This fixes #13360 by adding fallback directories that are searched by
the CLI if the main executable cannot be found in the `libexec`
directory.

Release Notes:

- Added the fallback directories `lib/zed` and `lib/zed-editor` for the
main executable search in the CLI
([#13360](https://github.com/zed-industries/zed/issues/13360)).

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-06-26 13:00:52 -06:00
Tristan Hume
c0a3642f77
Improve prompt for Claude models (#13531)
This inline assistant prompt is one I designed that in my experience
works much better with Claude 3.5 Sonnet than the default prompt.

Mainly because it takes advantage of a weird property of our finetuning
which is that when you use XML tags it knows that it's doing a
machine-read tasks and stops trying to elide things for brevity. The
default prompt will often remove comments and otherwise add elisions for
brevity when doing large rewrites.

It also avoids giving the entire file content twice when the rewrite
region is large relative to the non-rewritten region.

Not necessarily meant to be merged as-is since it may mess up OAI
models. This is mainly meant for your reference. But everyone should be
using 3.5 Sonnet for coding use cases now anyhow 😛

Release Notes:

- N/A
2024-06-26 20:41:40 +02:00
Nate Butler
4d5441c09d
Add UI setting components (#13550)
Adds some of the UI components to allow us to visually render settings.

These are UI only and are not functional yet (@maxdeviant will be
working on these when he is back.)

You can see some examples by running `script/storybook setting`.

![CleanShot 2024-06-26 at 12 38
37@2x](https://github.com/zed-industries/zed/assets/1714999/b5e6434d-3bc5-4fcd-9c0a-d280950cbef2)

Release Notes:

- N/A
2024-06-26 13:02:58 -04:00
Peter Tripp
2dc840132b v0.143.x dev 2024-06-26 12:20:15 -04:00
Fernando Tagawa
5d766f61fa
linux: Fix some panics related to xkb compose (#13529)
Release Notes:

- N/A

Fixed #13463 Fixed crash when the locale was non UTF-8 and fixed the
fallback locale.
Fixed #13010 Fixed crash when `compose.keysym()` was `XKB_KEY_NoSymbol`

I also extracted the `xkb_compose_state` to a single place
2024-06-26 09:34:39 -06:00
张小白
18b4573064
Fix font feature tag validation (#13542)
The previous implementation that I implemented had two issues:
1. It did not throw an error when the user input some invalid values
such as "panic".
2. The feature tag for OpenType fonts should be a combination of letters
and digits. We only checked if the input was an ASCII character, which
could lead to undefined behavior.

Closes #13517 

Release Notes:

- N/A
2024-06-26 11:01:48 -04:00
Toshimaru
d044dc8485
Update Docker Compose configuration (#13530)
- Fix Docker Compose obsolete setting

## Remove `version`

Fix the following error:

```
WARN[0000] /docker-compose.yml: `version` is obsolete
```

see also.
https://github.com/compose-spec/compose-spec/blob/master/spec.md#version-top-level-element-obsolete

## Rename: docker-compose.yml -> compose.yml

The preferred file name is now `compose.yml`.

> The default path for a Compose file is compose.yaml (preferred)

ref.
https://docs.docker.com/compose/compose-application-model/#the-compose-file

Release Notes:

- N/A
2024-06-26 08:05:23 -04:00
Alexander Mankuta
f00bea5d0f
docs: Fix Decrease buffer font size key binding (#13453)
Release Notes:

- N/A
2024-06-26 10:48:00 +03:00
Conrad Irwin
b43df6048b
Add an input example to gpui (#13534)
Add a single-line text input example to gpui

(I'm hoping to be able to debug keyboard issues without rebuilding the
whole
app every time)

Release Notes:

- N/A
2024-06-25 22:06:50 -06:00
Conrad Irwin
eb914682b3
Fix multi-cursor copy/paste on linux (#13523)
The clipboard library we use for X11 doesn't yet support multiple
formats on the clipboard, so for now we just store this in memory for
the current zed process, as we do for Wayland.

Fixes: #11971

Release Notes:

- N/A

---------

Co-authored-by: Mikayla Maki <mikayla@zed.dev>
2024-06-25 14:54:52 -06:00
Joseph T. Lyons
5b7e31c075
Add metrics_id to editor_events (#13525)
Release Notes:

- N/A
2024-06-25 16:47:55 -04:00
ᴀᴍᴛᴏᴀᴇʀ
922fcaf5a6
Add the ability to customize available models for OpenAI-compatible services (#13276)
Closes #11984, closes #11075.

Release Notes:

- Added the ability to customize available models for OpenAI-compatible
services ([#11984](https://github.com/zed-industries/zed/issues/11984))
([#11075](https://github.com/zed-industries/zed/issues/11075)).


![image](https://github.com/zed-industries/zed/assets/32017007/01057e7b-1f21-49ad-a3ad-abc5282ffaf0)
2024-06-25 16:37:02 -04:00
Nate Butler
9f88460870
Move token count in prompt editor (#13524)
Moves the token count back up to the editor header.

Release Notes:

- N/A
2024-06-25 16:10:05 -04:00
Mikayla Maki
e5d1cf84cf
Fix 9263 (#13521)
Fix #9263

Release Notes:

- N/A
2024-06-25 11:35:50 -07:00
Mikayla Maki
41d2c52638
Adjust keybindings for deletion in the project panel (#13326)
- Improve compatibility keybindings (Atom, JetBrains, TextMate)
- Revert MacOS cmd+backspace regression. Should trash without prompting (like MacOS)

Co-authored-by: Peter Tripp <peter@zed.dev>
2024-06-25 14:21:44 -04:00
张小白
d1a55d64a8
Change window_min_size from Size<Pixels> to Option<Size<Pixels>> (#13501)
Now we can set `window_min_size` to `None` instead of `Size::default()`.
I think this makes more sense.

Release Notes:

- N/A
2024-06-25 12:09:08 -06:00
Shubham Kanodia
db06244972
typescript: Pass hostInfo to tsserver (#12055)
- Added `hostInfo` property to zed's typescript plugin. This can be
useful for telemetry (for e.g. identifying the usage of editors based on
typescript usage) when building typescript plugins.

- VSCode / IntelliJ based editors already set this property
([see](aa31bfc9fd/extensions/typescript-language-features/src/typescriptServiceClient.ts (L574)))

The config option as available —
https://github.com/typescript-language-server/typescript-language-server/blob/master/docs/configuration.md#initializationoptions

Release Notes:

- N/A
2024-06-25 13:51:30 -04:00
Marshall Bowers
597469bbbd
Remove blank line (#13519)
This PR removes an extra blank line that was missed in #13518.

Release Notes:

- N/A
2024-06-25 13:11:25 -04:00
Marshall Bowers
e0c192d831
Clean up json! literal for vtsls configuration (#13518)
This PR cleans up the formatting of the `json!` literal used to provided
`vtsls` configuration.

Release Notes:

- N/A
2024-06-25 13:04:31 -04:00
Mikayla Maki
b2a0a7fa3c
Fix a bug introduced by #13479 (#13516)
Fixes a bug introduced by
https://github.com/zed-industries/zed/pull/13479 where dot files might
not be processed in the correct order.

Release Notes:

- N/A
2024-06-25 10:03:29 -07:00
Dov Alperin
0b1a589183
keymap: Allow modifiers as keys (#12047)
It is sometimes desirable to allow modifers to serve as keys themselves
for the purposes of keybinds. For example, the popular keybind in
jetbrains IDEs `shift shift` which opens the file finder.

This change treats modifers in the keymaps as keys themselves if they
are not accompanied by a key they are modifying.

Further this change wires up they key dispatcher to treat modifer change
events as key presses which are considered for matching against
keybinds.


Release Notes:

- Fixes #6460

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-06-25 10:17:23 -06:00
ᴀᴍᴛᴏᴀᴇʀ
7e694d1bcf
Fix an issue where provider settings were lost when switching between Ollama models (#13402)
Closes #13399.

Release Notes:

- Fixed an issue where provider settings were lost when switching
between Ollama models
([#13399](https://github.com/zed-industries/zed/issues/13399)).
2024-06-25 11:58:13 -04:00
Nate Butler
890443241d
Prompt Library Refinements (#13470)
TODO:

- [x] Moving the cursor out of the title editor should unselect any
selected text

Release Notes:

- N/A

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Richard <richard@zed.dev>
2024-06-25 11:43:30 -04:00
Gilles Peiffer
b014f9f017
docs: Fix some typos (#13509)
Minor fixes I came across while reading the docs.

Release Notes:

- N/A
2024-06-25 10:58:11 -04:00
Hamir Mahal
f40d2313fb
Use string interpolation (#13482)
Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-06-25 10:57:50 -04:00
Matin Aniss
2dee4f87fd
windows: Fix title bar font for Windows 10 (#13425)
This should fix the title bar font for Windows 10 as `Segoe Fluent
Icons` is only for Windows 11 and Windows 10 should be using `Segoe MDL2
Assets`, I haven't tested this myself on a Windows 10 machine but the
fonts work fine.

Release Notes:

- N/A
2024-06-25 10:51:00 -04:00
Matin Aniss
54afa6f69f
Bump image crate (#13397)
Bumping the image crate for better support of image formats.

The latest version does not have a `BGRA` type it only has `RGBA` it
doesn't really matter as the size is the same but the type name is a
little confusing as we need it as `BGRA`. Also there is no `into_bgra8`
but we can use `into_rgba8` but then it must be converted before
creating the `ImageData`.

Release Notes:

- N/A
2024-06-25 15:12:45 +02:00
Piotr Osiewicz
55511d1591
JSON: Show package.json dependency tooltips on hover (#13481)
Fixes https://github.com/zed-industries/zed/issues/13303

Release Notes:

- Added package version tooltips when hovering over package.json
dependency entries.
2024-06-25 14:59:29 +02:00
Piotr Osiewicz
6c0cb9eaa3
project panel: Respect y offset of a click-and-drag on a scrollbar (#13506)
Previously we've always snapped the scrollbar to the cursor position,
without regard for the position of the thumb.



Release Notes:

- N/A
2024-06-25 14:20:37 +02:00
Piotr Osiewicz
24e7b69f8f
Rust: fix module names not showing in completion list (#13505)
This is a regression from
https://github.com/zed-industries/zed/issues/13043

Fixes https://github.com/zed-industries/zed/issues/13494



Release Notes:

- Fix crate names not being shown in Rust completions menu.
2024-06-25 13:42:29 +02:00
Antonio Scandurra
a4cdca5141
Refine UX for assistants (#13502)
<img width="1652" alt="image"
src="https://github.com/zed-industries/zed/assets/482957/376d1915-1e15-4d6c-966e-48f55f7cb249">


Release Notes:

- N/A
2024-06-25 13:41:55 +02:00
Bennet Bo Fenner
86cd87e993
indent guides: Fix edge case when line is folded (#13498)
https://github.com/zed-industries/zed/assets/53836821/6c79cdc8-c0e1-4f5e-807e-be4a4bde32c3



Release Notes:

- Fixed an edge case where some indent guides would disappear when a
folded line is the first visible line on screen
2024-06-25 12:00:40 +02:00
Tristan Hume
88000eb7e2
Fix bug with inline assist and indentation on empty lines (#13489)
Fix a minor bug when the inline assistant model spits out an empty line
with leading indentation on it. This happens sometimes with Claude 3.5
Sonnet and currently it causes the following line to have the wrong
indentation.

Release Notes:

- N/A
2024-06-25 10:11:21 +02:00
Matt Fellenz
ab5a462e0c
Use likely-newer KeyPress serial for wl clipboard (#13483)
The KeyEnter serial will be too old if another client replaces the
selection before the user unfocuses and refocuses the window (i.e.,
triggers another KeyEnter event).
The KeyPress event is more likely to be new enough.

Release Notes:

- Fixed setting clipboard sometimes not working on wayland
([#13445](https://github.com/zed-industries/zed/issues/13445)).
2024-06-24 22:16:58 -06:00
Conrad Irwin
79430fc7d2
vim: Fix panic in search (#13487)
Release Notes:

- vim: Fixed a panic when searching after focusing search bar with mouse
2024-06-24 22:16:49 -06:00