28ba27c
Merge branch 'main' into stream-git-statuses
Mikayla Maki
created
34e134f
Fix several randomized test failures with the new git status implementation
Mikayla Maki
created
351e486
Fix some issues found when testing Elixir-LS (#2583)
Click to expand commit body
Closes
https://linear.app/zed-industries/issue/Z-2209/popovers-dont-always-have-syntax-highlighted-code
Closes
https://linear.app/zed-industries/issue/Z-2206/highlight-syntax-in-hover-docs
* Fix a ton of errors in our logs due to us not recognizing that
`elixir-ls` does not support code actions.
* Syntax-highlight elixir code blocks in hover popovers
Fixes Z-1618. In the current state, this only works for line comments
such as `//` (and whatever's set in `{language}.toml` as a
line_comment).
Release Notes:
- Comments are now extended on new line.
Piotr Osiewicz
created
b1f009c
Merge branch 'main' into sergey/z-1768-update-createcolorscheme-to-accept-a-theme-in-the
This pull request introduces a new assistant panel to Zed that lets
users interact with OpenAI using their API key:

After setting the key up, it will be saved to the keychain and
automatically loaded the next time the assistant panel is opened. The
key can be reset using `assistant: reset key`.

From there, users can type messages in a multi-buffer and hit
`cmd-enter` (`assistant: assist`) to stream assistant responses using
the OpenAI API. Responses can be canceled by hitting `escape`.

Users can quote a selection from the active editor by hitting `cmd->`
(`assistant: quote selection`), which will embed the selected piece of
text in a Markdown fenced code block. Conversations with the assistant
are ephemeral at the moment, but can be easily copy/pasted:

Release Notes:
- Added a new assistant panel feature that enables interacting with
OpenAI using an API key. This replaces the previous experimental `ai:
assist` command that would work on any buffer. The experience is similar
to the one offered by ChatGPT with the added ability to edit, delete or
enhance previous messages. When hitting `cmd-enter`, the assistant will
start streaming responses from OpenAI. A response stream can be canceled
using `escape`. Moreover, the active editor's selection can be quoted in
the assistant panel using `cmd->`, which will automatically embed the
selected piece of text in a Markdown fenced code block.
fccbac4
Handle LSP codeActions capability set to false
Max Brunsfeld
created
0d90c6d
Improve syntax highlighting and outline view for Elixir (#2582)
Click to expand commit body
Fixes
https://linear.app/zed-industries/issue/Z-2208/outline-view-doesnt-differentiate-between-overloaded-functions
Fixes
https://linear.app/zed-industries/issue/Z-2205/elixir-syntax-highlighting-not-working-properly-for-doc-attributes-and
This PR improves syntax highlighting and outline view in Elixir. It's
common to overload elixir functions, with many different versions of the
function for different patterns of parameters, so I updated the outline
view to show functions' parameters in Elixir. But if we showed functions
the same way in the *breadcrumbs*, it would take up too much space.
So I added a new capture in languages' `outline` queries called
`@context.extra`, which is included in the outline view, but not in
breadcrumbs.
Release Notes:
- Improved syntax highlighting of doc attributes and special macros in
Elixir
- Updated the outline view in Elixir to display function parameters, to
allow differentiating between function overloads.
Max Brunsfeld
created
4b9a3c6
Show function parameters in elixir outline view
Click to expand commit body
Introduce a new capture in the outline query called 'context.extra', which
causes text to appear in the outline, but not in the breadcrumbs.
Max Brunsfeld
created
7aeaa84
Fix the order of some patterns in elixir highlight query
6737ee1
Avoid panic when failing to load a language's queries
Max Brunsfeld
created
cc63d3d
chore: add targets to rust-toolchain.toml (#2581)
Piotr Osiewicz
created
a9f865d
Don't apply the 'literal' color to entire markdown code blocks (#2579)
Click to expand commit body
### Before

### After

Release Notes:
* Improved the syntax highlighting of fenced code blocks in markdown.
Max Brunsfeld
created
dfd7277
chore: bump MSRV to 1.70, add rust-toolchain (#2580)
Click to expand commit body
This time I've added a `components` section to rust-toolchain.toml file
to explicitly require a rustfmt component. Fingers crossed.
Piotr Osiewicz
created
3fc2e07
Don't apply the 'literal' color to entire markdown code blocks
Max Brunsfeld
created
bdd3e77
Live-reload tree-sitter queries in development (#2578)
Click to expand commit body
This PR adds live reloading of Tree-sitter queries when running in debug
mode, similar to what we do for the themes. This way, you can change a
highlighting query or an outline query, and immediately see the result
in the app.
Release Notes:
- N/A
Max Brunsfeld
created
7bfb51e
Live-reload tree-sitter queries in development
Per conversation with Antonio, I've suggested enabling full LTO; right
now we use a crate-local ThinLTO, which does not inline function calls
across crates.
| Configuration | Current main (788f97e) | Thin LTO | Full LTO |
|------------------|------------------------|-----------|-----------|
| Size in bytes | 158806721 | 155868753 | 111115553 |
| % of `main` size | 100% | 98.14% | 69.96% |
| Size in bytes (no debug info) | 129186657 | 127942929 | 108281345 |
Previously, all static assets were embedded into Zed using a single
`RustEmbed` struct called `Assets`, which was in a crate of its own,
also called `assets`. Many crates depended on this crate. The problem
with this situation was that changing *any* static asset file caused
almost every crate in the codebase to need recompilation (because of
recursive dependencies on `assets`).
Now, most of the assets are embedded only into the top-level `zed`
crate. A few assets (such as settings JSON files and AI prompts) are
needed in lower-level crates such as `settings` and `ai`. For these,
I've created separate `RustEmbed` structs in those specific crates,
which embed those specific sub-folders of `assets`.
The result is that now, when you change a theme file, the only crate
that needs to recompile is `zed`.
Release Notes:
- N/A