Commit Graph
15132 Commits
Author SHA1 Message Date
Piotr Osiewicz d3ce63694d Uncomment flaky tests 2023-12-01 19:21:30 +01:00
Piotr Osiewicz 89bd5df2de Another batch of tests 2023-12-01 18:43:44 +01:00
Piotr Osiewicz 2525f9249f Uncomment a bunch of tests in the editor 2023-12-01 18:11:27 +01:00
Piotr OsiewiczandAntonio 2f9ce20732 editor tests: Reintroduce block_on_ticks.
Co-authored-by: Antonio <antonio@zed.dev>
2023-12-01 17:24:47 +01:00
Piotr Osiewicz 63f1829187 Revert "editor tests: Reintroduce block_on_ticks."
This reverts commit 80eaa647ce.
2023-12-01 17:24:20 +01:00
Piotr OsiewiczandAntonio 80eaa647ce editor tests: Reintroduce block_on_ticks.
Co-authored-by: Antonio <antonio@zed.dev>
2023-12-01 17:22:12 +01:00
Antonio Scandurra 662695ed46 Add mouse context menu to editor2 (#3473)
We observed some weird behavior in `ContextMenu`, specifically:

- It seems like we don't intercept actions that have been dispatched,
which causes the context menu to stay open.
- The key bindings for editor actions in the context menu seem to come
from Vim

Release Notes:

- N/A
2023-12-01 16:25:07 +01:00
Antonio ScandurraandPiotr 1d8623c379 Add mouse context menu to editor2
Co-Authored-By: Piotr <piotr@zed.dev>
2023-12-01 16:01:56 +01:00
Antonio Scandurra 09bc268398 Get editor2 mostly to feature-parity with editor (#3472)
The only missing piece is the context menu, which I'll work on next.

Release Notes:

- N/A
2023-12-01 14:44:56 +01:00
Antonio Scandurra c195daa651 Respond to modifiers changed event in editor2 and set cursor 2023-12-01 14:26:49 +01:00
Antonio Scandurra 8920271d1b Uncomment git gutter painting 2023-12-01 13:45:14 +01:00
Antonio Scandurra 6effa83e31 Merge remote-tracking branch 'origin/main' into no-more-todos-in-editor
# Conflicts:
#	crates/editor2/src/items.rs
2023-12-01 12:40:48 +01:00
Antonio Scandurra 603181a09c Remove all todos in Editor's Item implementation 2023-12-01 12:32:30 +01:00
Antonio Scandurra c29b7af449 Register NewFile and NewFileInDirection from Editor 2023-12-01 12:11:54 +01:00
Antonio Scandurra 422b8559ed Re-enable opening excerpts in Editor 2023-12-01 12:03:21 +01:00
Antonio Scandurra bf5dd7ca97 Re-introduce auto-height in editor2 (#3471)
Release Notes:

- N/A
2023-12-01 12:02:45 +01:00
Antonio Scandurra c518916af2 🔥 2023-12-01 11:53:47 +01:00
Antonio Scandurra c113762b6e Delete commented out code for editor element 2023-12-01 11:52:40 +01:00
Antonio Scandurra 9bcaacffbb Remove stray dbg statements 2023-12-01 11:49:25 +01:00
Antonio Scandurra 2fe22af4a3 Fix edits not being reported when rewrapping 2023-12-01 11:48:21 +01:00
Joseph T. Lyons 27215013b2 Fix bug preventing spaces from being used in filename (#3454)
This bug was my fault, something I changed months ago to be more
consistent with VS Code - really strange that it took months for someone
to find out spaces couldn't be used in the project panel.

~I didn't apply this fix to zed2 because I dont think the facilities are
in place to do so (@maxbrunsfeld, @mikayla-maki, is there a system in
place for this that I missed?). I did leave a TODO.~

Fix is now in zed 2.

Release Notes:

- Fixed a bug where spaces could not be inserted when editing file names
in the project panel
([#2308](https://github.com/zed-industries/community/issues/2308)).
2023-11-30 21:44:48 -05:00
Joseph T. Lyons ca62d0d968 Move project panel's dispatch_context() to render() 2023-11-30 21:37:41 -05:00
Marshall Bowers 16465bb2e9 Respect label_color for Buttons (#3469)
This PR makes `Button`s respect the `label_color` that is specified,
provided they are not disabled or selected.

Release Notes:

- N/A
2023-11-30 20:36:59 -05:00
Conrad Irwin f5df100bff Show cursor position in status bar (#3464)
Passes the compiler so it must work!

(though it doesn't show up until we fix pane focus)

Release Notes:

- N/A
2023-11-30 16:40:42 -07:00
Max Brunsfeld 51003e46ff Restore some workspace functionality, enable workspace tests (#3468)
* Pane history navigation
* Autosave on focus change
* Setting the window title based on the active path
2023-11-30 15:26:44 -08:00
Max Brunsfeld 04bf9ee4c8 Re-introduce active path tracking in workspace 2023-11-30 14:58:14 -08:00
Max Brunsfeld bcc72567bc Restore auto-save on focus change, re-enable workspace tests 2023-11-30 14:45:27 -08:00
Nate Butler 63ac9de628 Add some text to clarify no api key state (#3462)
This PR is a quick-and-dirty approach to clarify what is happening when
a user doesn't have an API key so the assistant opens with the key
editor.

- Adds some text explaining how to close the panel
- Explains that other subscriptions don't cover the assistant, it needs
an api key.
- Helps people understand where to go to get an API key.

This is a Zed 1 change only, a bandaid. Zed 2 will have a better
solution: [Working
issue](https://github.com/zed-industries/zed/issues/3461)

Release Notes:

- N/A
2023-11-30 17:26:50 -05:00
Marshall Bowers 70e0762838 Rework ListHeader to be more open (#3467)
This PR reworks the `ListHeader` component to be more open.

The `meta` method can now be used to append meta items of any element to
the `ListHeader`, and they will be rendered with the appropriate spacing
between them.

Release Notes:

- N/A
2023-11-30 15:55:31 -05:00
Max Brunsfeld c3fa429b1d Reintroduce pane navigation history in zed2 2023-11-30 12:10:25 -08:00
Max Brunsfeld 4ca67911a6 Bump Tree-sitter to fix another crash triggered by a markdown file (#3466)
Bumps Tree-sitter for
https://github.com/tree-sitter/tree-sitter/pull/2802

This fixes a regression introduced in the last Tree-sitter upgrade.

Release Notes:

- Fixed a crash that occurred when editing certain Markdown files.
2023-11-30 11:46:00 -08:00
Max Brunsfeld 2cb5a395e2 Bump Tree-sitter for a crash fix 2023-11-30 11:36:36 -08:00
Joseph T. LyonsandMikayla Maki 391e43f47f Fix bug preventing spaces from being used in filename (zed2)
Co-Authored-By: Mikayla Maki <mikayla.c.maki@gmail.com>
2023-11-30 14:24:00 -05:00
Marshall Bowers a2d76644cd Implement Selectable for list components (#3465)
This PR implements the `Selectable` trait for the `ListItem` and
`ListHeader` components.

These components already had their own selectable behavior, but weren't
formally adhering to the interface defined by the trait.

Release Notes:

- N/A
2023-11-30 13:37:29 -05:00
Marshall Bowers b2f481567f Implement Selectable for ListItem and ListHeader 2023-11-30 13:26:12 -05:00
Marshall Bowers 53b923ce9d Remove unused GraphicSlot enum 2023-11-30 13:25:26 -05:00
Mikayla Maki f825f085d2 Update main.rs 2023-11-30 10:06:08 -08:00
Conrad Irwin 6da5ae12a0 Show cursor position in status bar 2023-11-30 10:16:24 -07:00
Marshall Bowers 16e5a3e4d5 Rename button-related enums (#3463)
This PR renames the `ButtonStyle2` and `ButtonSize2` enums to
`ButtonStyle` and `ButtonSize`, respectively.

Release Notes:

- N/A
2023-11-30 12:04:23 -05:00
Antonio Scandurra df8dcd42dc WIP 2023-11-30 18:00:41 +01:00
Nate ButlerandJoseph T. Lyons 1e92212052 Add some text to clarify no api key state
Co-Authored-By: Joseph T. Lyons <19867440+JosephTLyons@users.noreply.github.com>
2023-11-30 11:20:51 -05:00
Antonio ScandurraandNathan Sobo 28698b6e48 Pass a WindowContext in request_measured_layout
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-11-30 17:12:40 +01:00
Antonio Scandurra 612200aa3d Lift Send and Sync restriction for measurements 2023-11-30 16:37:57 +01:00
Kirill Bulatov f9ad71c0cf Trim file_finder input queries (#3459)
Addresses a small bit of influencer's feedback

Release Notes:

- Fixed file finder query's whitespaces not being trimmed
2023-11-30 16:22:14 +02:00
Kirill Bulatov 9e31380443 Exclude gitignored files' diagnostics from project panel and its indicator. (#3458)
Based on influencer's feedback.

The diagnostics are collected and available still, since that might
become a settings/UI toggle later.
Also, buffer diagnostics are still updated for gitignored files.

Release Notes:

- Excluded gitignored files' diagnostics from project panel and its
indicator.
2023-11-30 16:06:16 +02:00
Kirill Bulatov d23d643c68 Trim file_finder input queries 2023-11-30 16:05:45 +02:00
Kirill Bulatov afd3f85082 Port to gpui2 2023-11-30 15:46:35 +02:00
Kirill Bulatov cd5018d9cf Exclude gitignored files' diagnostics from project panel and its indicator.
The diagnostics are collected and available still, since that might become a settings/UI toggle later.
Also, buffer diagnostics are still updated for gitignored files.
2023-11-30 15:46:30 +02:00
Kirill Bulatov b80cb3910b Fix TypeScript diagnostics (#3457)
Deals with https://github.com/zed-industries/community/issues/2124

* sends more ClientCapabilities LSP data, diagnostics capabilities in
particular: those are now required by typescript-language-server LSP to
start publishing diagnostics
* sends more parameters during eslint workspace initialization, so it is
able to correctly look up project's typescript config
Presumably, it's not enough and some convoluted project set ups may
break still, but let's wait for examples and feedback.

Release Notes:

- Fixed typescript-language-server diagnostics not appearing for newer
server versions; fixed eslint diagnostics using wrong directory for
typescript config lookup
2023-11-30 13:25:25 +02:00
Antonio Scandurra 45b33ec6d4 Re-introduce screen-sharing in zed2 (#3456)
Release Notes:

- N/A
2023-11-30 12:14:11 +01:00