Commit log

10d2353 windows: Treat `settings.json` as JSONC (#14944)

Click to expand commit body
Before this PR, comments in `settings.json` are marked with red lines,
indicating that `"comments are not allowed in JSON."`

![Screenshot 2024-07-22
153951](https://github.com/user-attachments/assets/fbb631e8-43cf-4473-97c0-50c83c4d6ab1)


After this PR, this issue is resolved.

![Screenshot 2024-07-22
153527](https://github.com/user-attachments/assets/ee0f7877-c623-4caa-94cd-97e82f9b8945)

Release Notes:

- N/A

张小白 created

1ea363b Fix typo in `font-weight` setting story (#14958)

Click to expand commit body
Release Notes:

- N/A

Floyd Wang created

0155435 Allow using a custom model when using zed.dev (#14933)

Click to expand commit body
Release Notes:

- N/A

Antonio Scandurra created

a334c69 Add instructions for configuring linting in the Python documentation using Ruff extension (#14896)

Click to expand commit body
Added documentation for #14198

I also suggest replacing format guides from `black` to `ruff` to unify
the tooling in the document.

Ruff is now widely used in the Python community, including
[fastapi](https://github.com/tiangolo/fastapi/blob/cd6e9db0653eabbf0fb14908c73939a11a131058/pyproject.toml#L213).
It's compatible with black but a lot faster.

Release Notes:

- N/A

YeonGyu-Kim created

31d2839 Allow to input spaces in the outline panel filter input (#14951)

Click to expand commit body
Release Notes:

- Fixed outline panel's filter not accepting spaces

Kirill Bulatov created

0ef19de Correct escaping in snippets (#14912)

Click to expand commit body
## Release Notes:

- Fixed issue with backslashes not appearing in snippets
([#14721](https://github.com/zed-industries/zed/issues/14721)),
motivated by a snippet provided by the latex LSP
([texlab](https://github.com/latex-lsp/texlab)) not working as intended
in Zed ([extension
issue](https://github.com/rzukic/zed-latex/issues/5)).

[Screencast from 2024-07-21
14-57-19.webm](https://github.com/user-attachments/assets/3c95a987-16e5-4132-8c96-15553966d4ac)

## Fix details:

Only $, }, \ can be escaped by a backslash as per [LSP spec (under
grammar
section)](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/\#snippet_syntax).
Technically, commas and pipes can also be escaped only in "choice"
tabstops but it does not look like they are implemented in Zed yet.

## Additional tests added for cases currently not covered:
- backslash not being used to escape anything (so just a normal
backslash)
- backslash escaping a backslash (so that the second does not escape
what follows it)

---------

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>

Luke Naylor and Piotr Osiewicz created

83f6a7f assistant: Use square buttons for the inline assist model selector (#14928)

Click to expand commit body
This PR updates the model selector buttons in the inline assistant to
use `IconButtonShape::Square`.

Release Notes:

- N/A

Marshall Bowers created

2d96bba assistant: Respect `ui_font_weight` setting for inline assist in the terminal (#14924)

Click to expand commit body
This PR updates the terminal inline assist to respect the
`ui_font_weight` setting.

Release Notes:

- N/A

Marshall Bowers created

5403916 erlang: Add support for installing `elp` language server (#14923)

Click to expand commit body
This PR updates the Erlang extension with support for installing the
[Erlang Language
Platform](https://github.com/WhatsApp/erlang-language-platform) (`elp`)
language server from the GitHub Release assets.

Release Notes:

- N/A

Marshall Bowers created

45b4515 Treat `tsconfig.json` as JSONC (#14920)

Click to expand commit body
This PR updates the default settings to treat `tsconfig.json` files as
JSONC.

Resolves https://github.com/zed-industries/zed/issues/14906.

Release Notes:

- TypeScript's `tsconfig.json` files are now treated as JSONC.

Marshall Bowers created

a4baba7 Add button to copy SHA from Git blame (#14883)

Click to expand commit body
The git blame dialog doesn't give the user a way to quickly copy the SHA
of the associated commit for a line. Adding an option for users to
quickly access this SHA is helpful for user's to do any more git-fu they
might need, such as viewing the full changes themselves within git,
checking the commit out, bisecting off the commit, etc.

This is also very handy for user's of self-hosted git providers.
Determining what provider a self-hosted repository is using could be
quite difficult and this presents an easy option to allow users to look
up more about a commit without having to memorize the short SHA.

Release Notes:

- Added a button to copy the SHA from a Git blame entry.

<img width="1552" alt="A screenshot showing the new copy SHA button
within the Zed editor's inline blame "
src="https://github.com/user-attachments/assets/9365950d-3a3f-4c11-b119-ab02654f5669">

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>

Ryan Hawkins and Marshall Bowers created

cb2c334 Use defaults for unchanged `TextStyle` fields (#14918)

Click to expand commit body
This PR updates a number of spots where we were setting all of the
`TextStyle` fields even if we were not changing the values from the
defaults.

We now use `..Default::default()`.

Release Notes:

- N/A

Marshall Bowers created

e8bcc41 Fix usability issues with ssh connection modal (#14917)

Click to expand commit body
Release Notes:

- N/A

Max Brunsfeld created

7b88fc5 erlang: Add Erlang Language Platform support (#14879)

Click to expand commit body
Added support for the [Erlang Language
Platform](https://whatsapp.github.io/erlang-language-platform/) language
server to the Erlang extension.

Release Notes:

- N/A

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>

Fabian Bergström and Marshall Bowers created

2f3df9f erlang: Update structure to accommodate multiple language servers (#14915)

Click to expand commit body
This PR updates the structure of the Erlang extension to accommodate
multiple language servers.

Release Notes:

- N/A

Marshall Bowers created

7d063aa erlang: Upgrade `zed_extension_api` to v0.0.6 (#14914)

Click to expand commit body
This PR upgrades the Erlang extension to use v0.0.6 of the
`zed_extension_api`.

Release Notes:

- N/A

Marshall Bowers created

9c26d07 Ensure `ExtensionBuilder` respects the proxy settings (#14899)

Click to expand commit body
Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>

张小白 and Marshall Bowers created

0a9d50b http: Refactor construction of HTTP clients with a proxy (#14911)

Click to expand commit body
This PR refactors the `http` crate to expose a better way of
constructing an `HttpClient` that contains a proxy.

Release Notes:

- N/A

Marshall Bowers created

c7331b4 gpui: Include image URI in `ImageCacheError::BadStatus` (#14910)

Click to expand commit body
This PR updates the `ImageCacheError::BadStatus` variant to include the
URI of the image that failed to load.

This helps contextualize the resulting error logs.

Release Notes:

- N/A

Marshall Bowers created

70f7f2d theme_importer: Output logs to `stderr` (#14890)

Click to expand commit body
Will allow writing directly to a file without logging via `cargo run -p
theme_importer -- /path/to/file`

Release Notes:

- N/A

Mag Mell created

cd9b25d repl: Increase accuracy of error output line height (#14880)

Kyle Kelley created

781633f repl: Ensure that the output's computed line height is at least 1 (#14877)

Kyle Kelley created

6dfb0a4 repl: Push button to clear outputs (#14873)

Kyle Kelley created

a167055 Fix description of -l flag in bundle-mac (#14864)

Click to expand commit body
This removes mention of "copy bundle to `/Applications`" from the help
text for `bundle-mac` because, as far as I can tell, the `-l` flag only
controls the build, not the copy/install. (The copy/install is
controlled by using the `-i` flag in conjunction with `-l`.)


Release Notes:

- N/A

claytonrcarter created

71cbfc6 Ruff: pass initialization_options from settings (#14866)

Click to expand commit body
No version bump, as the extension is not out yet.
Release Notes:

- N/A

Piotr Osiewicz created

1218a84 extensions: Add Ruff extension (#14198)

Click to expand commit body
Release Notes:

- Added extension for [Ruff](https://docs.astral.sh/ruff/), an extremely fast Python linter and code formatter, written in Rust.

Piotr Osiewicz created

48c253f Expand terminal menu actions (#14828)

Click to expand commit body
<img width="422" alt="image"
src="https://github.com/user-attachments/assets/73195894-81a7-4b8e-b5cf-ae60bf5b1fb9">

Release Notes:

- Added `Copy`, `Paste`, `Select All`, & `New Terminal` into terminal's context menu

versecafe created

46b7fa9 Add Sign Out link for Supermaven (#14834)

Click to expand commit body
Adds a menu item to sign out from a linked Supermaven account.


![image](https://github.com/user-attachments/assets/6af3c39f-9ca4-4ac2-a5c0-c7cb3c3aaac2)


Release Notes:

- Added the ability to sign out of a Supermaven account ([#12715(https://github.com/zed-industries/zed/issues/12715))

Kevin Wang created

022e662 Start work on showing progress when initializing ssh remoting

Max Brunsfeld created

d89e259 Fix file name conflict when downloading app update (#14847)

Click to expand commit body
This fixes broken auto-updates on nightly. Unfortunately, nightly users
will need to re-download.

Release Notes:

- N/A

Max Brunsfeld created

a072caa node_runtime: Bump downloaded Node.js version to Current (Jod) (#14687)

Click to expand commit body
This PR bumps the hard-coded Node.js version from v18.x (Hydrogen), which was LTS until October 2023, to v22.x (Jod) which will be the next LTS release in October 2024.

Release Notes:

- Updated Zed's node version (v18.x -> v22.x)

Fabian created

fbe30c6 Fixes for SSH remoting infrastructure (#14844)

Click to expand commit body
* Fixed mis-named macOS remote server archives in actions and packaging
scripts
* Fixed an issue with the ask pass script on linux
* Download nightly versions of remote servers in dev mode (not stable)

Release Notes:

- N/A

Max Brunsfeld created

a5b8094 editor: Implement `From` instead of `Into` for converting `BlockId`s to `ElementId`s (#14839)

Click to expand commit body
This PR replaces the `Into<ElementId> for BlockId` implementation with
`From<BlockId> for ElementId`.

This keeps in line with Rust's guidance for preferring implementing
`From`, and gives us more flexibility when converting.

Release Notes:

- N/A

Marshall Bowers created

d2efa12 vim: Fix gv after actions (#14829)

Click to expand commit body
Fixes: #13720

Co-Authored-By: <tobbe@tlundberg.com>



Release Notes:

- vim: Fixed `gv` after `y`, `d`, etc.
([#13760](https://github.com/zed-industries/zed/issues/13760)).

Conrad Irwin created

5e635b8 ui: Remove absolute positioning for tab slots (#14836)

Click to expand commit body
This PR reworks the `Tab` component to not use absolute positioning in
order to position the tab slots.

This should make any further adjustments we want to make to the spacing
easier to do.

Release Notes:

- N/A

Marshall Bowers created

0a02691 Fix tooltips sometimes continuously displaying when the button is selected (#14832)

Click to expand commit body
Release Notes:

- Fixed sometime tooltip will continuously display when the button is
selected.

---

@mrnugget The #13857 This change has led into a bug, the selected item
before tooltip will continuous display if there are no other tooltips.



https://github.com/user-attachments/assets/06b4a9a4-dede-4c18-b020-e20b6090341f

Jason Lee created

1dc4d42 Add command aliases (#14826)

Click to expand commit body
Co-Authored-By: <tobbe@tlundberg.com>

Release Notes:

- Added `"command_aliases"` setting to let you abbreviate commands

Conrad Irwin created

b22718e Fix log file path for dsymutil in bundle-mac

Max Brunsfeld created

bc16c2f Fix error in bundle-mac

Max Brunsfeld created

1805986 Suppress noisy output from dsymutil in bundle-mac

Max Brunsfeld created

ee0dfe9 elixir: Make `start_lexical.sh` executable (#14831)

Click to expand commit body
This PR fixes an issue in the Lexical language server installation where
the `start_lexical.sh` script was not being made executable when
installed from GitHub.

Release Notes:

- N/A

Marshall Bowers created

f4074d7 Remove spurious self-hosted label for bundle-linux-arm job

Max Brunsfeld created

e58db43 Remove stray step from release nightly workflow

Max Brunsfeld created

ec487d8 Extract completion provider crate (#14823)

Click to expand commit body
We will soon need `semantic_index` to be able to use
`CompletionProvider`. This is currently impossible due to a cyclic crate
dependency, because `CompletionProvider` lives in the `assistant` crate,
which depends on `semantic_index`.

This PR breaks the dependency cycle by extracting two crates out of
`assistant`: `language_model` and `completion`.

Only one piece of logic changed: [this
code](https://github.com/zed-industries/zed/commit/922fcaf5a6076e56890373035b1065b13512546d#diff-3857b3707687a4d585f1200eec4c34a7a079eae8d303b4ce5b4fce46234ace9fR61-R69).
* As of https://github.com/zed-industries/zed/pull/13276, whenever we
ask a given completion provider for its available models, OpenAI
providers would go and ask the global assistant settings whether the
user had configured an `available_models` setting, and if so, return
that.
* This PR changes it so that instead of eagerly asking the assistant
settings for this info (the new crate must not depend on `assistant`, or
else the dependency cycle would be back), OpenAI completion providers
now store the user-configured settings as part of their struct, and
whenever the settings change, we update the provider.

In theory, this change should not change user-visible behavior...but
since it's the only change in this large PR that's more than just moving
code around, I'm mentioning it here in case there's an unexpected
regression in practice! (cc @amtoaer in case you'd like to try out this
branch and verify that the feature is still working the way you expect.)

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>

Richard Feldman and Marshall Bowers created

b9a53ff Add the ability to edit remote directories over SSH (#14530)

Click to expand commit body
This is a first step towards allowing you to edit remote projects
directly over SSH. We'll start with a pretty bare-bones feature set, and
incrementally add further features.

### Todo

Distribution
* [x] Build nightly releases of `zed-remote-server` binaries
    * [x] linux (arm + x86)
    * [x] mac (arm + x86)
* [x] Build stable + preview releases of `zed-remote-server`
* [x] download and cache remote server binaries as needed when opening
ssh project
* [x] ensure server has the latest version of the binary


Auth
* [x] allow specifying password at the command line
* [x] auth via ssh keys
* [x] UI password prompt

Features
* [x] upload remote server binary to server automatically
* [x] opening directories
* [x] tracking file system updates
* [x] opening, editing, saving buffers
* [ ] file operations (rename, delete, create)
* [ ] git diffs
* [ ] project search

Release Notes:

- N/A

---------

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>

Max Brunsfeld and Piotr Osiewicz created

7733bf6 Repl reorder keybinding (#14824)

Click to expand commit body
Ensures that the assistant keybinding for cmd-enter takes precedence
over `repl::Run`.

On Linux, `ctrl-enter` (the equivalent), issues `repl::Run` when in a
jupyter context.

Release Notes:

- N/A

Kyle Kelley created

edddc68 client: Remove leftover `http.rs` file (#14822)

Click to expand commit body
This PR removes an empty `http.rs` file that was leftover from a
previous PR.

Release Notes:

- N/A

Marshall Bowers created

5de5d5b go: Fix quoting of targeting expression for non-fish shells (#14821)

Click to expand commit body
This fixes #14818.

The change in #14055 broke the tasks in `zsh` (and I suspect in `bash`,
`sh` too), because what was executed was NOT

    $ go test . -run '^TestThis$'

but instead this:

    $ go test . -run \'^TestThis$\'

And in `zsh` this means that `'` is part of the argument passed to `go`,
which means the targeting string is wrong.

Since the problem in `fish` doesn't seem to be the `^` but the `$`, we
can only escape that, which makes the escaped string work in `zsh` and
`fish` and `bash` (in which I've tested this change here)

Release Notes:

- go: Fix running single tests by changing the quoted expression in the
`go test` command to work again in `bash`, `zsh`, etc.
([#14818](https://github.com/zed-industries/zed/issues/14818))

Thorsten Ball created

5467e18 repl: Refactor editor registration (#14819)

Click to expand commit body
Cleans up action registration with the editors and also fixes a major
bug where only one workspace's panel was getting session info (due to my
not understanding that `cx.observe_new_views` is for the whole app).

Release Notes:

- N/A

Co-authored-by: Conrad <conrad@zed.dev>

Kyle Kelley and Conrad created

4c7f103 Allow an initial prompt to be associated with inline assist (#14816)

Click to expand commit body
Release Notes:

- Added the ability to create custom inline assist bindings that
pre-fill a prompt from your keymap, e.g.:
    ```json
    [
        {
            "context": "Editor && mode == full",
            "bindings": {
                "ctrl-shift-enter": [
                    "assistant::InlineAssist",
                    { "prompt": "Build a snake game" }
                ]
            }
        }
    ]
    ```

---------

Co-authored-by: Nathan <nathan@zed.dev>

Antonio Scandurra and Nathan created