This PR removes a dependency on the `inline_completion_button` crate
from the `language_model` crate.
We were taking on this dependency solely to call `initiate_sign_in`,
which can easily be moved to the `copilot` crate.
This allows `language_model` to move up in the crate dependency graph.
Release Notes:
- N/A
This PR removes a dependency on the `extensions_ui` from the `title_bar`
crate.
This dependency only existed to reference the `Extensions` action, which
has now been moved to the `zed_actions` crate.
This allows `title_bar` to move up in the crate dependency graph.
Release Notes:
- N/A
The replacement "g" didn't seem to work for everyone.
Closes#20912
Updates #20104
Release Notes:
- vim: Restores `dia` to mean "delete in argument" instead of "delete
within angle brackets". To keep this in your own keymap use:
```
{
"context": "vim_operator == a || vim_operator == i || vim_operator ==
cs",
"use_layout_keys": true,
"bindings": {
"a": "vim::AngleBrackets"
}
}
```
This PR fixes an issue where the `settings` field for a context server
would not show up in the completions when editing the Zed settings.
It seems that `schemars` doesn't like the `serde_json::Value` as a
setting type when generating the JSON Schema. To address this, we are
using a custom schema of an empty object (as we don't yet have any other
information as to the structure of a given context server's settings).
Release Notes:
- context_servers: Fixed `settings` field not being suggested in
completions when editing `settings.json`.
We also need to check whether the selection is empty, not just whether
its head is on an empty line.
Release Notes:
- N/A
Co-authored-by: Antonio <antonio@zed.dev>
This is broken because of the way we try to emulate macOS's
ApplePressAndHoldEnabled.
Release Notes:
- Fixed holding down space in the terminal (preview only)
This PR fixes an issue where slash commands in the output of other slash
commands were not being evaluated when configured to do so.
Closes https://github.com/zed-industries/zed/issues/20820.
Release Notes:
- Fixed slash commands from other slash commands (like `/default`) not
being evaluated (Preview only).
We occasionally see dates in the future appearing in our telemetry. One
hypothesis is that this is caused by a clock change while Zed is running
causing date math based on chrono to be incorrect.
Instant *should* be a more stable source of relative timestamps.
Release Notes:
- N/A
Using `Url::path()` seems fine on POSIX systems as it will leave forward
slash (given hostname is empty). On Windows it will result in error.
Release Notes:
- N/A
Closes #12080, #18649.
Screenshot:
<img width="1499" alt="image"
src="https://github.com/user-attachments/assets/2644c2fc-19cf-4d2c-a992-5c56cb22deed">
Still in progress:
1. I'd like to add configuration options for selecting a Python test
runner (either pytest or unittest) so that users can explicitly choose
which runner they'd like to use for running their tests. This preference
has to be configured as unittest-style tests can also be run by pytest,
meaning we can't rely on auto-discovery to choose the desired test
runner.
2. I'd like to add venv auto-discovery similar to the feature currently
provided by the terminal using detect_venv.
3. Unit tests.
Unfortunately I'm struggling a bit with how to add settings in the
appropriate location (e.g. Python language settings). Can anyone provide
me with some pointers and/or examples on how to either add extra
settings or to re-use the existing ones?
My rust programming level is OK-ish but I'm not very familiar with the
Zed project structure and could use some help.
I'm also open for pair programming as mentioned on the website if that
helps!
Release Notes:
- Added pytest-based test discovery and runnables for Python.
- Adds a configurable option for switching between unittest and pytest
as a test runner under Python language settings. Set "TASK_RUNNER" to
"unittest" under task settings for Python if you wish to use unittest to
run Python tasks; the default is pytest.
---------
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Co-Authored-by: Thorsten <thorsten@zed.dev>
Co-Authored-by: Antonio <antonio@zed.dev>
Screenshot:
![screenshot-2024-11-18-17 11
08@2x](https://github.com/user-attachments/assets/610fd7db-7476-4b9b-9465-a3d55df12340)
TODO:
- [x] docs
Release Notes:
- Added inline hints that guide users on how to invoke the inline
assistant and open the assistant panel. (These hints can be disabled by
setting `{"assistant": {"show_hints": false}}`.)
---------
Co-authored-by: Thorsten <thorsten@zed.dev>
Co-authored-by: Antonio <antonio@zed.dev>
Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
Starts setting up a `RunningKernel` trait to make the remote kernel
implementation easy to get started with. No release notes until this is
all hooked up.
Release Notes:
- N/A
Turns out that in the case you have a somehow valid utf-8 file that
contains almost all ascii control characters, we run out of element
arena space.
Fixes: #20652
Release Notes:
- Fixed a crash when opening a file containing a very large number of
ascii control characters on one line.
Perhaps this was intentional behavior, but if not, I've attempted to
write this hacky fix — I noticed using the vertical arrow keys to move
past the document start/end would reset the goal_x to either zero (for
moving upwards) or the line width (for moving downwards). This change
makes Zed match most native text fields (at least on macOS) which leave
goal_x unchanged, even when hitting the end of the document.
I tested this change manually. Would be happy to add automatic tests for
it too, but couldn't find any existing cursor movement tests.
Release Notes:
- Behavior when moving vertically past the start or end of a document
now matches native text fields; it no longer resets the selection goal
Release Notes:
- Differentiate between function and method calls and definitions.
`function.definition` matches the highlight for e.g. rust,
`function.call` is new.
- Likewise differentiate between class calls and class definitions.
- Better highlighting of function decorators (the `@` symbol is
punctuation, and now the decorator itself has a `function.decorator`
tag)
- Make `cls` a special variable (like `self`)
- Add `ellipsis` as a built-in constant
Note that most themes do not currently make use of the
`function.definition` tags, and none make use of the
`type.class.definition` tag. Hopefully more themes will pick this up.
*Before:*
<img width="248" alt="image"
src="https://github.com/user-attachments/assets/550ccd3d-594c-413a-b543-ef9caf39eee1">
*After:*
<img width="245" alt="image"
src="https://github.com/user-attachments/assets/47aa43b1-006b-4f9f-9029-510880f390ea">
`create_buffer` calls `Buffer::local` which sets `file` to `None`
[here](f12981db32/crates/language/src/buffer.rs (L629)).
So there's no point in then immediately attempting to update maps that
rely on `file` being present.
Release Notes:
- N/A
Closes: #12739
Release Notes:
Solves #12739 by
- Enable snippet parsing to successfully parse snippets with choices
- Show completion menu when tabbing to a snippet variable with multiple
choices
Todo:
- [x] Parse snippet choices
- [x] Open completion menu when tabbing to a snippet variable with
several choices (Thank you Piotr)
- [x] Get snippet choices to reappear when tabbing back to a previous
tabstop in a snippet
- [x] add snippet unit tests
- [x] Add fuzzy search to snippet choice completion menu & update
completion menu based on choices
- [x] add completion menu unit tests
Current State:
Using these custom snippets
```json
"my snippet": {
"prefix": "log",
"body": ["type ${1|i32, u32|} = $2"],
"description": "Expand `log` to `console.log()`"
},
"my snippet2": {
"prefix": "snip",
"body": [
"type ${1|i,i8,i16,i64,i32|} ${2|test,test_again,test_final|} = $3"
],
"description": "snippet choice tester"
}
```
Using snippet choices:
https://github.com/user-attachments/assets/d29fb1a2-7632-4071-944f-daeaa243e3ac
---------
Co-authored-by: Piotr Osiewicz <piotr@zed.dev>
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Fixes shellcheck errors in script/*
Adds a couple trailing newlines.
Adds `script/shellcheck-scripts` and associated CI machinery.
Current set ultra-conservative, does not output warnings, only errors.
- Don't output junk to stderr when cmake unavailable
- Kitware PPA does not include up to date bins for all distros (e.g.
Ubuntu 24 only has 3.30.2 although 3.30.4 has been out for a while) so
don't try to force install a specific version. Take the best we can get.
Follow up to: https://github.com/zed-industries/zed/pull/18682
This PR tweaks the setting value, so it's clear we're referring to
`max-width`, meaning the width will change up to a specific value
depending on the available window size. Then, it also makes `Small` the
default value, which, in practice, makes the modal size the same as it
was before the original PR linked above.
Release Notes:
- N/A
---------
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
Motivation for this is to make things more understandable while figuring
out #20775.
This is intended to be a refactoring that does not affect behavior, but
there are a few tricky spots:
* Previously `File.mtime()` (now `File.disk_state().mtime()`) would
return last known modification time for deleted files. Looking at uses,
I believe this will not affect anything. If there are behavior changes
here I believe they would be improvements.
* `BufferEvent::DirtyChanged` is now only emitted if dirtiness actually
changed, rather than if it may have changed. This should only be an
efficiency improvement.
Release Notes:
- N/A
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
This PR adds a `darken` function that allows to reduce the lightness of
a color by a certain factor. This popped up as I wanted to add hover
styles to tinted-colors buttons.
Release Notes:
- N/A
Meant to avoid the excessive use of "Here's a concise 3-7 word title..."
and "Title:" instances we've been seeing lately.
Follow up to: https://github.com/zed-industries/zed/pull/19530
Release Notes:
- Improve prompt for generating title summaries, avoiding preambles