ae6f138
Fix `compute_width_for_char` (#9643)
Click to expand commit body
Release Notes: - N/A
张小白 created
ae6f138
Fix `compute_width_for_char` (#9643)
Release Notes: - N/A
张小白 created
6d5787c
Hard code max token counts for supported models (#9675)
Nathan Sobo created
441677c
Fix typo (mimized -> minimized) (#9674)
Daniel Zhu created
95b2f4c
linux: fix word move/select shortcuts (#9673)
`alt+left/right` are never used on Linux. The Linux keymap still has some other issues, but these shortcuts in particular are really common when editing text. Release Notes: - N/A
apricotbucket28 created
0f15fd3
windows: User installed language server support (#9606)
Release Notes: - N/A
Ezekiel Warren created
4183805
windows: fix window activate action (#9664)
Now, the window activation event can be triggered correctly. As shown in the video, when the window is activated, the caret blinks; when the window loses activation due to me clicking on the PowerShell window, the caret stops blinking. https://github.com/zed-industries/zed/assets/14981363/4c1b2bec-319d-4f21-879e-5a0af0a00d8e Release Notes: - N/A
张小白 created
eaa8032
Fix error handling in buffer open (#9667)
Co-Authored-By: Max <max@zed.dev> Co-Authored-By: Marshall <marshall@zed.dev> Release Notes: - N/A Co-authored-by: Max <max@zed.dev> Co-authored-by: Marshall <marshall@zed.dev>
Conrad Irwin , Max , and Marshall created
caed275
Revert "language: Remove buffer fingerprinting (#9007)"
This reverts commit 6f2f61c9b1bf7a7285ba2a27d10c4c7a6022e670.
Conrad Irwin created
35e3935
Fix invalid highlight position for `(edited)` text (#9660)
This pull request fixes a bug that was inserting the wrong position for the `(edited)` text. This is only an issue when you have other styling inside the markdown that causes the `richt_text.text.len()` to increase. **Before** <img wdth="234" alt="Screenshot 2024-03-21 at 19 53 34" src="https://github.com/zed-industries/zed/assets/62463826/bf9e7fec-1563-415b-9b14-f7b95fc7d784"> **After** <img width="234" alt="Screenshot 2024-03-21 at 19 53 48" src="https://github.com/zed-industries/zed/assets/62463826/c0b7ba3a-5bdc-4b9e-a4f2-c3df4064f0ec"> Release Notes: - N/A
Remco Smits created
3b7cd9c
Remove incorrect venv base directory used (#9661)
Follow-up of https://github.com/zed-industries/zed/pull/8444 Release Notes: - N/A
Stanislav Alekseev created
1e543b9
windows: implement `IME` caret movement and editing while composing (#9659)
https://github.com/zed-industries/zed/assets/14981363/598440f7-0364-4053-9f44-710291f8aa92 Release Notes: - N/A
张小白 created
d557f8e
Revert "chore: Bump Rust version to 1.77 (#9631)" (#9658)
This reverts commit 6184278faf3a4c4034b3b3488a5ec71ef50b5274. We can't upgrade to Rust 1.77 until there are Rust 1.77 Docker images available (https://github.com/docker-library/official-images/pull/16457). Release Notes: - N/A
Marshall Bowers created
b6201a3
Check for user installed clangd (#9605)
Release Notes: - Improved C/C++ support using user installed clangd when available
Ezekiel Warren created
85fdcef
Do not enable venv in terminal for bash-like oneshot task invocations (#8444)
Release Notes:
- Work around #8334 by only activating venv in the terminal not in tasks
(see #8440 for a proper solution)
- To use venv modify your tasks in the following way:
```json
{
"label": "Python main.py",
"command": "sh",
"args": ["-c", "source .venv/bin/activate && python3 main.py"]
}
```
---------
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
Stanislav Alekseev and Kirill Bulatov created
cd61297
collab: Bump minimal client version to 0.127.3 (#9649)
Release Notes: - N/A
Piotr Osiewicz created
e07192e
Implement is_minimized for macOS (#9651)
Release Notes: - N/A
Mikayla Maki created
adcb591
extension_cli: Populate grammars from `grammars` directory for legacy extension formats (#9650)
This PR makes the extension CLI populate the grammars in the manifest from the contents of the `grammars` directory for legacy extensions using the `extension.json` format (`schema_version == 0`). This allows us to continue packaging these older extensions until they can be migrated to the new schema version. Release Notes: - N/A
Marshall Bowers created
d89905f
Fix `IME` window position with scale factor greater than 1.0 (#9637)
In #9456 I forgot to handle this... Release Notes: - N/A
张小白 created
e1d1d57
Windows: Fix XButton direction (#9629)
Release Notes: - N/A
白山風露 created
3fd62a2
windows: display icon (#9571)
Now `Zed` can display icons. The image below shows the icon of the `zed.exe` file and the icon in the right-click properties.  I used the `crates\zed\resources\app-icon@2x.png` file to generate the `.ico` file. Due to some blank space around the logo in the original file, the logo appears slightly smaller on Windows compared to other software.  The current `.ico` file contains logo files of multiple sizes: 16x16, 24x24, 32x32, 48x48, 64x64, 96x96, 128x128, 256x256, 512x512. Release Notes: - N/A
张小白 created
f179158
windows: Avoid recording minimized position to database (#9407)
Minimizing window records strange position to DB. When Zed is restarted, the window goes far away. <img width="975" alt="image" src="https://github.com/zed-industries/zed/assets/6465609/98dbab71-fdbb-4911-b41a-9c3e498e5478"> So I fixed. Release Notes: - N/A
白山風露 created
f88f1bc
Windows: Not logging frequent WM_PAINTs (#9566)
The logging of WM_PAINT for each frame was not very meaningful, so it was eliminated. Other logging levels were also reduced to trace. Release Notes: - N/A Co-authored-by: Mikayla Maki <mikayla@zed.dev>
白山風露 and Mikayla Maki created
20b88b6
Add a script for bumping the extension CLI (#9646)
This PR adds a script for bumping the extension CLI (thus kicking off a new build). Release Notes: - N/A
Marshall Bowers created
6f2f61c
language: Remove buffer fingerprinting (#9007)
Followup to #9005 that actually removes buffer fingerprinting. Release Notes: - N/A
Piotr Osiewicz created
1f21088
Normalize `-` to `_` in resulting Wasm file names (#9644)
This PR updates the extension builder to normalize `-` to `_` in the Rust package names when computing the resulting `.wasm` file name. The `wasm32-wasi` target does this normalization internally already, so we need to do the same to ensure we're looking for the resulting `.wasm` file in the right spot. Release Notes: - N/A
Marshall Bowers created
3831088
extension_cli: Don't propagate errors caused by trying to read `Cargo.toml` (#9641)
This PR fixes an issue where the extension CLI would error if a `Cargo.toml` didn't exist when we were trying to check for its existence. Since we're just checking if it exists for the purposes of detecting a Rust extension, we can safely ignore the errors. Also improved the logging/error handling in a few spots to make other errors easier to troubleshoot in the future. Release Notes: - N/A
Marshall Bowers created
e20508f
lsp: Add partial support for insert/replace completions (#9634)
Most notably, this should do away with completions overriding the whole word around completion trigger text. Fixes: #4816 Release Notes: - Fixed code completions overriding text around the cursor.
Piotr Osiewicz created
6184278
chore: Bump Rust version to 1.77 (#9631)
Release Notes: - N/A
Piotr Osiewicz created
65152ba
Fix `prettier-plugin-organize-imports` plugin removes used imports (#9598)
### Issue
So this pull request fixes an issue that was driven me crazy. The issue
was that when you use the `prettier-plugin-organize-imports` It would
remove some imports that should not be removed before they were used
inside the module itself.
You can reproduce it with the following `prettierrc.json` config and
source code. When you **save** the file, it would remove the `import
clsx from "clsx";` import from the file.
**Prettier config**
```json
{
"semi": true,
"tabWidth": 4,
"trailingComma": "es5",
"useTabs": true,
"plugins": [
"prettier-plugin-tailwindcss",
"prettier-plugin-organize-imports"
]
}
```
**Source code**
```typescript
import clsx from "clsx";
export default function Home() {
return (
<main>
{clsx("asdjklasdjlkasd", "asdjlkasjdjlk")}
</main>
);
}
```
### Findings
After a deep dive with @mrnugget, I was debugging deep down the prettier
plugin system and found the issue that was causing this issue. When I
was looking inside the
`node_modules/prettier-plugin-organize-imports/lib/organize.js`. I saw
the following code that looked strange to me because it falls back to
`file.ts` if `filepath` is not passed through inside the prettier config
options.
<img width="860" alt="Screenshot 2024-03-20 at 21 31 46"
src="https://github.com/zed-industries/zed/assets/62463826/47177fe5-e5a9-41d8-9f2f-0304b2c2159f">
So the issue was small, if you look at the following code, the `path`
key should be `filepath` inside the
`crates/prettier/src/prettier_server.js:205`

Release Notes:
- Fixed prettier integration not using the correct filepath when
invoking prettier, which could lead to some prettier plugins failing to
format correctly.
([#9496](https://github.com/zed-industries/zed/issues/9496)).
Remco Smits created
65c6bfe
get-preview-channel-changes errors on invalid token (#9616)
Release Notes: - N/A
Conrad Irwin created
ac4c6c6
Make it (a tiny bit) easier to run your own collab (#9557)
* Allow creating channels when seeding * Allow configuring a custom `SEED_PATH` * Seed the database when creating/migrating it so you don't need a separate step for this. Release Notes: - N/A
Conrad Irwin created
1062c5b
Fix copilot modal (#9613)
Release Notes: - Fixed copilot modal not responding ([#9596](https://github.com/zed-industries/zed/issues/9596)). (preview only)
Conrad Irwin created
0b01928
Wayland: double click (#9608)
This PR builds off of an earlier version of https://github.com/zed-industries/zed/pull/9595, rearranges some of the logic, and removes an unused platform API. Release Notes: - N/A --------- Co-authored-by: apricotbucket28 <agustin.nicolas.marcos@outlook.com>
Mikayla Maki and apricotbucket28 created
9b0949b
Allow specifying no base keymap (#9471)
This PR is a bit of a shot in the dark. I'm not sure if this will be acceptable and I understand if it gets rejected. I've been trying to integrate Zed as my daily driver and the key bindings have been a major hurdle for me. Mostly due to the windows/linux keybindings being messed up, but also me wanting to have more chained key bindings similar to helix or common in custom neovim configurations. I think having a `None` base keymap would allow someone to more easily implement a new base keymap (#4642) and would make my daily use of Zed a little nicer 😅. Also I am aware that there would need to be a little more work done in this PR for the other base keymaps such as 'atom' since they assume the 'default' (vscode) base keymaps are loaded. I'm happy to do that work if a 'none' base keymap is acceptable. Release Notes: - Added ability to specify no base keymap which allows for full keybinding customization
Ezekiel Warren created
5602c48
Action release handlers (#8782)
This PR adds support for handling action releases — events that are fired when the user releases all the modifier keys that were part of an action-triggering shortcut. If the user holds modifiers and invokes several actions sequentially via shortcuts (same or different), only the last action is "released" when its modifier keys released. ~The following methods were added to `Div`:~ - ~`capture_action_release()`~ - ~`on_action_release()`~ - ~`on_boxed_action_release()`~ ~They work similarly to `capture_action()`, `on_action()` and `on_boxed_action()`.~ See the implementation details in [this comment](https://github.com/zed-industries/zed/pull/8782#issuecomment-2009154646). Release Notes: - Added a fast-switch mode to the file finder: hit `p` or `shift-p` while holding down `cmd` to select a file immediately. (#8258). Related Issues: - Implements #8757 - Implements #8258 - Part of #7653 Co-authored-by: @ConradIrwin
Andrew Lygin and @ConradIrwin created
91ab95e
Fix bugs in linux text system (#9604)
Supersedes https://github.com/zed-industries/zed/pull/9579 by manually including it. Release Notes: - N/A
Mikayla Maki created
585e867
Add a schema to extensions, to prevent installing extensions on too old of a Zed version (#9599)
Release Notes: - N/A --------- Co-authored-by: Marshall <marshall@zed.dev>
Max Brunsfeld and Marshall created
b1feeb9
Windows: Refactoring (#9580)
Aggregate `DefWindowProc` calls with individual handler return value as `Option<isize>` Release Notes: - N/A
白山風露 created
78e116c
Fix skip prompt warning (#9590)
This fixes a non-panicking log error caused by https://github.com/zed-industries/zed/pull/9452 Release Notes: - N/A
Mikayla Maki created
d699b8e
Allow extensions to define more of the methods in the LspAdapter trait (#9554)
Our goal is to extract Svelte support into an extension, since we've seen problems with the Tree-sitter Svelte parser crashing due to bugs in the external scanner. In order to do this, we need a couple more capabilities in LSP extensions: * [x] `initialization_options` - programmatically controlling the JSON initialization params sent to the language server * [x] `prettier_plugins` - statically specifying a list of prettier plugins that apply for a given language. * [x] `npm_install_package` Release Notes: - N/A --------- Co-authored-by: Marshall <marshall@zed.dev> Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Max Brunsfeld , Marshall , and Marshall Bowers created
0ce5cdc
Only allow opening one Extensions view (#9569)
Release Notes: - Changed the extensions view to only allow one open instance at a time. ## Before <img width="494" alt="image" src="https://github.com/zed-industries/zed/assets/5518/9329e685-1946-4384-bec3-f7eadf18a0cc">
Jason Lee created
3853991
Format `prettier_server.js` (#9583)
This PURELY formats the file by opening it in Zed and hitting save with save-on-format on. It's been bugging me that I can't change the file without the whole thing getting reformatted, so here we are. Release Notes: - N/A
Thorsten Ball created
3a2eb12
Fix binary name for extension CLI (#9591)
This PR fixes the binary name for the extension CLI. This was originally done in #9541, but got accidentally reverted in #9549. Release Notes: - N/A
Marshall Bowers created
59bc81d
v0.129.x dev
Mikayla created
88857f8
VS Code -> Zed tasks converter (#9538)
We can convert shell, npm and gulp tasks to a Zed format. Additionally, we convert a subset of task variables that VsCode supports. Release notes: - Zed can now load tasks in Visual Studio Code task format --------- Co-authored-by: Piotr Osiewicz <piotr@zed.dev> Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Anthony Eid , Piotr Osiewicz , and Piotr Osiewicz created
269d251
Add support for applying theme after extension is installed (#9529)
Release Notes: - Added support for opening the theme selector with installed themes after installing an extension containing themes. ([#9228](https://github.com/zed-industries/zed/issues/9228)). <img width="1315" alt="Screenshot 2024-03-20 at 11 00 35 AM" src="https://github.com/zed-industries/zed/assets/1486634/593389b3-eade-4bce-ae17-25c02a074f21"> --------- Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Jason Lee and Marshall Bowers created
6cec389
ui: Make `top_padding` an associated function on the `TitleBar` (#9577)
This PR makes the function for computing the top padding for the `TitleBar` an associated function. Release Notes: - N/A
Marshall Bowers created
9ab7a22
Fix licensing errors
Antonio Scandurra created
f2394c7
Fix licensing
Antonio Scandurra created
7855b9e
Allow to handle autoclosed characters differently (#8666)
Adds the `always_treat_brackets_as_autoclosed` setting to control how the autoclosed characters are handled. The setting is off by default, meaning the behaviour stays the same (following how VSCode handles autoclosed characters). When set to `true`, the autoclosed characters are always skipped over and auto-removed no matter how they were inserted (following how Sublime Text/Xcode handle this). https://github.com/zed-industries/zed/assets/471335/304cd04a-59fe-450f-9c65-cc31b781b0db https://github.com/zed-industries/zed/assets/471335/0f5b09c2-260f-48d4-8528-23f122dee45f Release Notes: - Added the setting `always_treat_brackets_as_autoclosed` (default: `false`) to always treat brackets as "auto-closed" brackets, i.e. deleting the pair when deleting start/end, etc. ([#7146](https://github.com/zed-industries/zed/issues/7146)). --------- Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
Tim Masliuchenko and Thorsten Ball created