Commit Graph

2181 Commits

Author SHA1 Message Date
Bennet Bo Fenner
51ee60b421
assistant: Feature flag terminal inline assistant (#13732)
This PR adds a feature flag for the terminal inline assistant because we
want to keep it internal for now.

Release Notes:

- N/A
2024-07-02 11:47:11 +02:00
Marshall Bowers
ecd9422d11
gleam: Add /gleam-docs (#13721)
This PR adds a `/gleam-docs` slash command to the Gleam extension, which
can be used to fetch docs from HexDocs.

Release Notes:

- N/A
2024-07-01 17:58:21 -04:00
Bennet Bo Fenner
e243856559
Add terminal inline assistant (#13638)
Release Notes:

- N/A

---------

Co-authored-by: Antonio <antonio@zed.dev>
2024-07-01 20:53:56 +02:00
Marshall Bowers
c516b8f038
zig: Revert 464a4439f7c71e867da481e99e22ad99cc23807e (#13712)
This PR reverts the changes from #13709, now that we've published a new
version of the Zig extension with them.

This reverts commit 464a4439f7.

Release Notes:

- N/A
2024-07-01 14:45:42 -04:00
Marshall Bowers
03447b9e18
zig: Bump to v0.1.3 (#13710)
This PR bumps the Zig extension to v0.1.3 so we can republish with
#13709.

Release Notes:

- N/A
2024-07-01 14:37:40 -04:00
Marshall Bowers
464a4439f7
zig: Temporarily roll back changes depending on new extension API (#13709)
This PR temporarily rolls back the changes in #12173 so that we can
publish a new version of the Zig extension.

There was a problem stemming from #12614 that caused v0.1.2 of the Zig
extension to get re-published with unreleased `zed_extension_api`
changes.

Once we publish v0.1.3 we'll be able to revert this change.

Release Notes:

- N/A
2024-07-01 14:28:27 -04:00
Nate Butler
0b57df5deb
Extract title_bar crate (#13597)
This PR extracts a singular title bar (`title_bar::TitleBar`) from
`ui::TitleBar` and
`collab_ui::collab_titlebar_item::CollabTitlebarItem`.

This is a first step towards organizing title bar things into one place,
and standardizing platform titlebar/window control implementations.

Release Notes:

- N/A
2024-06-27 19:14:13 -04: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
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
Peter Tripp
2dc840132b v0.143.x dev 2024-06-26 12:20:15 -04: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
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
Conrad Irwin
8949460bd7
fix cli welcome screen (#13474)
Release Notes:

- Fixed first launch via cli

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
2024-06-24 12:55:30 -06:00
d1y
b58dfe502e
Update Cargo.toml (#13375)
miss nightly build https://github.com/servo/pathfinder/issues/565

Release Notes:

- N/A
2024-06-24 14:15:40 +02:00
Piotr Osiewicz
78bc3a9a36
snippets: Release 0.0.5 (#13434)
Fix invalid platform name on Linux.
Related to:
https://github.com/zed-industries/zed/pull/13253#issuecomment-2185323702
Release Notes:

- N/A
2024-06-24 00:39:42 +02:00
Conrad Irwin
fe7d53cb96
Dynamicer builds (#13074)
Fixes https://github.com/zed-industries/zed/issues/13073

Note that, contrary to the issue's text, we're still shipping a
statically bundled sqlite3 after this PR. We use enough new features of
sqlite, like `sqlite3_error_offset` and `STRICT`, that our minimum
version (v3.38.0) is higher than is presumably accessible on Ubuntu.

Release Notes:

- N/A

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
2024-06-21 16:32:32 -07:00
Thorsten Ball
6b04b668ad
settings: Load .zed/settings.json even if .gitignored (#13370)
This fixes #4432 by ensuring that we scan & watch the `.zed` folder,
just like we watch the `.git`, for changes.

Release Notes:

- Settings are now loaded from local `.zed/settings.json` files even if
they are `.gitignore`d.
([#4432](https://github.com/zed-industries/zed/issues/4432)).

Co-authored-by: Bennet <bennet@zed.dev>
2024-06-21 18:39:14 +02:00
Antonio Scandurra
cb0b8b4c4b
Introduce multi-cursor inline transformations (#13368)
https://github.com/zed-industries/zed/assets/482957/591def34-e5c8-4402-9c6b-372cbca720c3

Release Notes:

- N/A

---------

Co-authored-by: Richard Feldman <oss@rtfeldman.com>
2024-06-21 17:41:43 +02:00
Piotr Osiewicz
9bdb154a9b
snippets: Read user settings for workspace configuration (#13356)
Fixes #13334

Use `settings` field in `lsp` subsettings to fix up the settings as
wish:
```
  "lsp": {
    "snippet-completion-server": {
      "settings": {
        "max_completion_items": 20, 
        "snippets_first": false,
        "feature_words": true,
        "feature_snippets": true,
        "feature_paths": true,
        "feature_unicode_input": false
      }
    }
  }
```


Release Notes:

- N/A
2024-06-21 12:44:19 +02:00
Bennet Bo Fenner
0150192e26
assistant: Add term slash command (#13162)
This adds a `term` slash command to the assistant which allows to inject
the latest terminal output into the context.

Release Notes:

- N/A
2024-06-20 20:20:34 +02:00
Lukas Lihotzki
d5b0df6efa
blade: Bump rev to fix GLES (#13114)
Based on the work on GLES support of @kvark, only two pieces were
missing for usable GLES support:
- https://github.com/kvark/blade/pull/125 was upstreamed 2 weeks ago and
is contained in the currently referenced zed-industries/blade fork
- https://github.com/kvark/blade/pull/126 was upstreamed 17 hours ago
and is not contained in the zed-industries fork. As the zed-industries
fork was also upstreamed in https://github.com/kvark/blade/pull/128, we
can switch back to mainline blade.

If you don't want to switch back to mainline blade, please integrate
https://github.com/kvark/blade/pull/126 to your fork.

Release Notes:

- Fix GLES backend (#9581)
2024-06-20 10:40:03 -07:00
Joseph T Lyons
0129d4e250 v0.142.x dev 2024-06-19 12:09:32 -04:00
Piotr Osiewicz
2ca83b2f17
snippets: Bump to 0.0.3, add support for more languages (#13265)
This fixes issues spotted by @eproxus in
https://github.com/zed-industries/zed/pull/13253#issuecomment-2178724849
Release Notes:
 -N/A
2024-06-19 16:01:41 +02:00
Piotr Osiewicz
59c005b086
snippets: Fix package metadata (#13261)
Release Notes:

- N/A
2024-06-19 14:30:15 +02:00
Piotr Osiewicz
d665f28671
Add language-agnostic snippets (#13253)
Note that right now we can't attach a language server to arbitrary
buffer, which is why I've listed a bunch of languages verbatim.
See
https://github.com/zed-industries/simple-completion-language-server/tree/main
for docs on how to define your snippets. They should be placed in
~/.config/zed/snippets ; `snippets.(toml|json)` file can be used to
define language-agnostic snippets, and any other name (e.g.
`python.toml`) will apply only to buffers of that particular type.

There's https://github.com/rafamadriz/friendly-snippets you can use as a
repository of snippets, for your convenience.

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

Release Notes:
- Added support for snippets via simple-completion-language-server
2024-06-19 14:03:04 +02:00
Mikayla Maki
17bc0d1b17
Dynamically link libwayland (#13241)
Fixes a bug in current nightly.

Release Notes:

- N/A
2024-06-18 15:07:45 -07:00
Mikayla Maki
6b9ddbfef2
Add more menus to Zed (#12940)
### TODO

- [x] Make sure keybinding shows up in pane + menu
- [x] Selection tool in the editor toolbar
- [x] Application Menu
- [x] Add more options to pane + menu
   - Go to File...
  - Go to Symbol in Project... 
- [x] Add go items to the selection tool in the editor:
   - Go to Symbol in Editor...
   - Go to Line/Column...
   - Next Problem
   - Previous Problem
- [x] Fix a bug where modals opened from a context menu aren't focused
correclty
- [x] Determine if or what needs to be done with project actions:
- Difficulty is that these are exposed in the UI via clicking the
project name in the titlebar or by right clicking the root entry in the
project panel. But they require reading and are two clicks away. Is that
sufficient?
    - Add Folder to Project
    - Open a new project
    - Open recent
 - [x] Get a style pass 
 - [x] Implement style pass
   - [x] Fix the wrong actions in the selection menu
   - [x] Show selection tool toggle in the 'editor settings' thing
- [x] Put preferences section from the app menu onto the right hand user
menu
- [x] Add Project menu into app menu to replace 'preferences' section,
and put the rest of the actions there
- [ ] ~~Adopt `...` convention for opening a surface~~ uncertain what
this convention is.
   - [x] Adopt link styling  for webview actions
   - [x] Set lucide hamburger for menu icon
   - [x] Gate application menu to only show on Linux and Windows




Release Notes:

- Added a 'selection and movement' tool to the Editor's toolbar, as well
as controls to toggle it and a setting to remove it (`"toolbar":
{"selections_menu": true/false }`)
- Changed the behavior of the `+` menu in the tab bar to use standard
actions and keybindings. Replaced 'New Center Terminal' with 'New
Terminal', and 'New Search', with the usual 'Deploy Search'. Also added
item-creating actions to this menu.
- Added an 'application' menu to the titlebar to Linux and Windows
builds of Zed
2024-06-18 12:16:54 -07:00
apricotbucket28
f6fa6600bc
wayland: Refactor clipboard implementation (#12405)
Fixes https://github.com/zed-industries/zed/issues/12054

Replaces the `copypasta`/`smithay-clipboard` implementation with a new,
custom one

TODO list:

- [x] Cleanup code
- [x] Remove `smithay-clipboard`
- [x] Add more mime types to the supported list

Release Notes:

- Fixed drag and drop on Gnome
- Fixed clipboard paste on Hyprland
2024-06-18 10:04:19 -07:00
Marshall Bowers
01b836a191
util: Replace lazy_static! with OnceLock (#13215)
This PR replaces the `lazy_static!` usages in the `util` crate with
`OnceLock` from the standard library.

This allows us to drop the `lazy_static` dependency from this crate.

Release Notes:

- N/A
2024-06-18 12:44:58 -04:00
Marshall Bowers
81475ac4cd
paths: Replace lazy_static! with OnceLock (#13213)
This PR replaces the `lazy_static!` usages in the `paths` crate with
`OnceLock` from the standard library.

This allows us to drop the `lazy_static` dependency from this crate.

The paths are now exposed as accessor functions that reference a private
static value.

Release Notes:

- N/A
2024-06-18 12:22:37 -04:00
Antonio Scandurra
e4ba336971
Preserve sections generated by slash commands when reloading a context (#13199)
Release Notes:

- N/A
2024-06-18 14:49:53 +02:00
Piotr Osiewicz
3a26a4809d
lsp: Revert URL type change (#13193)
This reverts URI changes made in
https://github.com/zed-industries/zed/pull/12928 while keeping the perf
goodies in tact. We should keep an eye out for
https://github.com/gluon-lang/lsp-types/issues/284
Fixes: https://github.com/zed-industries/zed/issues/13135
Fixes: https://github.com/zed-industries/zed/issues/13131
Release Notes:

- N/A
2024-06-18 12:39:56 +02:00
Piotr Osiewicz
be02b2faf4
chore: Bump git2 to 0.19 (#13180)
Related to: https://github.com/zed-industries/zed/issues/8242

Release Notes:

- N/A
2024-06-18 01:31:42 +02:00
Marshall Bowers
258a8a37d8
Extract paths out of util (#13182)
This PR extracts the definition of the various Zed paths out of `util`
and into a new `paths` crate.

`util` is for generic utils, while these paths are Zed-specific. For
instance, `gpui` depends on `util`, and it shouldn't have knowledge of
these paths, since they are only used by Zed.

Release Notes:

- N/A
2024-06-17 19:27:42 -04:00
Joseph T. Lyons
ca035dbdd8
Move project event logic to telemetry.rs (#13166)
I previously put this logic directly into `project.rs`, but it doesn't
feel good to pollute that code with telemetry logic, so I've moved it
over to `telemetry.rs`.

Release Notes:

- N/A
2024-06-17 15:52:59 -04:00
Kyle Kelley
221edfc267
Bring Jupyter to Zed Editing (#12062)
Run any Jupyter kernel in Zed on any buffer (editor):

<img width="1074" alt="image"
src="https://github.com/zed-industries/zed/assets/836375/eac8ed69-d02b-4d46-b379-6186d8f59470">

## TODO

### Lifecycle

* [x] Launch kernels on demand
* [x] Wait for kernel to be started
* [x] Request Kernel info on start
* [x] Show in progress indicator
* [ ] Allow picking kernel (it defaults to first matching language name)
* [ ] Menu for interrupting and shutting down the kernel
* [ ] Drop running kernels once editor is dropped

### Media Outputs

* [x] Render text and tracebacks with ANSI color handling
* [x] Render markdown as text
* [x] Render PNG and JPEG images using an explicit height based on
line-height
* ~~Render SVG~~ -- not happening for this PR due to lack of text in SVG
support
* [ ] Process `update_display_data` message and related `display_id`
* [x] Process `page` data from payloads as outputs
* [ ] Render markdown as, well, rendered markdown -- Note: unsure if we
can get line heights here

### Document

* [x] Select code and run
* [x] Run current line
* [x] Clear previous overlapping runs
* [ ] Support running markdown code blocks
* [ ] Action to export session as notebook or output files
* [ ] Action to clear all outputs
* [ ] Delete outputs when lines are deleted

## Other missing features

The following is a list of missing functionality or expectations that
are out of scope for this PR.

### Python Environments

Detecting python environments should probably be done in a separate PR
in tandem with how they're used with LSP. Users likely want to pick an
environment for their project, whether a virtualenv, conda env, pyenv,
poetry backed virtualenv, or the system. Related issues:

* https://github.com/zed-industries/zed/issues/7646
* https://github.com/zed-industries/zed/issues/7808
* https://github.com/zed-industries/zed/issues/7296

### LSP Integration

* Submit `complete_request` messages for completions to interleave
interactive variables with LSP
* LSP for IPython semantics (`%%timeit`, `!ls`, `get_ipython`, etc.)

## Future release notes

- Run code in any editor, whether it's a script or a markdown document

Release Notes:

- N/A
2024-06-17 10:02:31 -07:00
Kirill Bulatov
0afb3abfd2
Improve outline panel entries' revealing and grouping (#13127)
Release Notes:

- N/A
2024-06-17 13:08:25 +03:00
Marshall Bowers
064bdab459
theme: Warn when deprecated scrollbar_thumb.background style is used (#13081)
This PR adds a warning when the deprecated `scrollbar_thumb.background`
style property is present in a theme.

This property has been succeeded by `scrollbar.thumb.background`.

The primary reason for this is to get it into the `zed-extension` CLI so
that we can use it to detect which themes need to be updated.

Release Notes:

- N/A
2024-06-15 22:14:39 -04:00
apricotbucket28
38cb95f427
linux: Update cosmic_text (#13095)
Bumps cosmic_text, removes some stale `todo`s and stores a ShapeBuffer
to prevent reallocations

Improvements:

- Performance should be a lot better (haven't actually tested it)
- Fixed display of `\t` in the terminal

![image](https://github.com/zed-industries/zed/assets/71973804/ca994912-851d-48ef-8dc7-b244c9eb484d)

![image](https://github.com/zed-industries/zed/assets/71973804/42fa9acf-ec10-4247-a5e3-2d4fe664ded6)


Release Notes:

- N/A
2024-06-15 15:23:00 -07:00
Conrad Irwin
fab4b01655
Make linux prompts a bit better (#13067)
Also prompt with a sensible error on install:cli

Release Notes:

- N/A
2024-06-14 16:40:54 -06:00
Marshall Bowers
9bc3c6810b
Register Markdown language in some tests to silence error logs (#13066)
This PR registers the Markdown language in some of the tests in the
`zed` crate to silence the error logs about the language not being found
when the chat panel attempts to load it.

Release Notes:

- N/A
2024-06-14 15:29:20 -04:00
Marshall Bowers
b03653321f
Update Cargo.lock (#13061)
This PR updates `Cargo.lock`, since it was missed in #12818.

Release Notes:

- N/A
2024-06-14 13:26:25 -04:00
张小白
4cb45e63f4
windows: Update windows-rs crate and better error handling in DirectWrite (#12818)
- Update `windows-rs` from `0.56` to `0.57`
- Use the newly introduced `Owned` struct in `0.57` to handle the RAII
stuff of `HANDLE`
- Better error handling in `DirectWrite`

Release Notes:

- N/A
2024-06-14 10:12:20 -07:00
Marshall Bowers
44f66aa426
rustdoc: Add CrateName newtype (#13056)
This PR adds a `CrateName` newtype used to represent crate names.

This makes the code a bit more self-descriptive and prevents confusing
other string values for a crate name.

It also changes the internal representation from a `String` to an
`Arc<str>` for cheaper clones.

Release Notes:

- N/A
2024-06-14 12:21:03 -04:00
Kirill Bulatov
a8481099ca
Prefer the same order of entries inside outline and project panels, project search multi buffer (#13044)
Release Notes:

- N/A
2024-06-14 18:33:36 +03:00
Kirill Bulatov
eb7a09b459
Add excerpts into outline panel (#13034)
Follow-up of https://github.com/zed-industries/zed/pull/12637

Adds excerpt items into the outline panel: now all outline items are
initially hidden under excerpt items that could be toggled open/closed
similar to directories.


![Screenshot 2024-06-14 at 10 45
04](https://github.com/zed-industries/zed/assets/2690773/9c9ef91b-1666-43c3-acc4-96f850098a28)

On active editor's selection change, a corresponding outline will be
revealed still, expanding the corresponding excerpt

![Screenshot 2024-06-14 at 10 45
13](https://github.com/zed-industries/zed/assets/2690773/7dfd14f7-4aca-48f2-8760-8e1362b9a043)

Release Notes:

- N/A
2024-06-14 12:03:16 +03:00
Marshall Bowers
86167138a9
rustdoc: Automatically index crates (#13014)
This PR removes the need to use `/rustdoc --index <CRATE_NAME>` and
instead indexes the crates once they are referenced.

As soon as the first `:` is added after the crate name, the indexing
will kick off in the background and update the index as it goes.

Release Notes:

- N/A
2024-06-13 18:30:15 -04:00
Marshall Bowers
85acc2be44
Persist index for /rustdoc in LMDB (#12988)
This PR updates the `/rustdoc` command with persistence for the
documented rustdoc items.

Now when you run `/rustdoc --index <CRATE_NAME>` it will index the crate
and store the results in LMDB.

The documented items will then be read from the database when searching
using `/rustdoc` and persist across restarts of Zed.

Release Notes:

- N/A
2024-06-13 12:07:26 -04:00
Piotr Osiewicz
7798f64d1b
chore: Bump lsp-types to 0.97.0 (#12928)
This also includes https://github.com/gluon-lang/lsp-types/pull/287,
which should significantly reduce the time it takes for us to
deserialize completion lists.


Release Notes:
- N/A
2024-06-13 13:48:12 +02:00
Marshall Bowers
0ac9af94e0
assistant: Add MVP for /rustdoc using indexed docs (#12952)
This PR adds an MVP of retrieving docs using the `/rustdoc` command from
an indexed set of docs.

To try this out:

1. Build local docs using `cargo doc`
2. Index the docs for the crate you want to search using `/rustdoc
--index <CRATE_NAME>`
    - Note: This may take a while, depending on the size of the crate
3. Search for docs using `/rustdoc my_crate::path::to::item`
    - You should get completions for the available items

Here are some screenshots of it in action:

<img width="640" alt="Screenshot 2024-06-12 at 6 19 20 PM"
src="https://github.com/zed-industries/zed/assets/1486634/6c49bec9-d084-4dcb-a92c-1b4c557ee9ce">

<img width="636" alt="Screenshot 2024-06-12 at 6 52 56 PM"
src="https://github.com/zed-industries/zed/assets/1486634/636a651c-7d02-48dc-b05c-931f33c49f9c">

Release Notes:

- N/A
2024-06-12 19:33:31 -04:00