Commit Graph
11489 Commits
Author SHA1 Message Date
Nathan Sobo ffecaaa75e Rework element system, phase 1 (#2881)
This is a deep cut. There's still more work to do until we start
building UI with this. I've approached this as additively as possible,
but I've made a few changes to the rest of the code that I think would
be good to upstream before proceeding too much further.

Most of the interesting pieces are in gpui/playground, which is a
standalone binary that opens a single window and renders a new kind of
element. The layout of these new elements is provided by the taffy
layout engine crate, which conforms to web conventions. The idea is that
playground is relatively cheap to build and work on. As concepts
coalesce in playground, we can drop them into gpui and start
transitioning.
2023-08-23 08:26:38 -06:00
Joseph T. Lyons 260a97a1a7 Update textmate.json 2023-08-23 01:31:01 -04:00
Nathan Sobo 298aeb0f11 Mark new crates as publish = false 2023-08-22 20:47:05 -06:00
Conrad Irwin ae7b6c9a5b vim: Rewrite paste (#2878)
A complete overhaul of the way vim did paste. This ended up being more
involved than I expected because of the variety of different behaviors
that vim exhibits when copying/pasting between various modes.

Release Notes:

- vim: support P for paste before
([#1869](https://github.com/zed-industries/community/issues/1869)).
- vim: support P in visual modes for paste without overriding clipboard
- vim: fix position when using `p` on text copied outside zed
([#469](https://github.com/zed-industries/community/issues/469)).
- vim: fix indentation when using `p` on text copied from zed
([#1015](https://github.com/zed-industries/community/issues/1015)).
- all: Separate copied multi-selections by `\n`
2023-08-22 20:21:58 -06:00
Nathan Sobo ec9bebc7f4 Merge branch 'main' into divs 2023-08-22 16:35:56 -06:00
Conrad Irwin 6df5f15880 Ensure editor clipboard contains \n too 2023-08-22 13:52:04 -06:00
Conrad Irwin ec55ac38f6 vim: Dismiss menu in insert mode with escape (#2879)
Release Notes:

- vim: Fix escape to dismiss suggestions in insert mode.
2023-08-22 13:38:12 -06:00
Conrad Irwin fa6cb5033b vim: Dismiss menu in insert mode with escape 2023-08-22 13:28:50 -06:00
Conrad Irwin 21b6d69d61 Rewrite paste
- vim: support P for paste before
- vim: support P in visual mode for paste without overriding clipboard
- vim: fix position when using `p` on text copied outside zed
- vim: fix indentation when using `p` on text copied from zed
2023-08-22 13:27:57 -06:00
Conrad Irwin 3a2fdcf51c Vim z 2819 (#2875)
Add `$` and `#` and a smoke test for vim-mode respecting the
configuration.
2023-08-22 11:38:06 -06:00
Nathan SoboandAntonio Scandurra 93b10e6626 Checkpoint
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-08-22 11:34:06 -06:00
Piotr Osiewicz 3800a42500 chore: fmt 2023-08-22 18:14:07 +02:00
Piotr OsiewiczandConrad Irwin 3231bf5e96 Query char_kind for completion triggers.
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2023-08-22 18:12:05 +02:00
Joseph T. Lyons e8a7311c11 Add default bindings for new file and directory (#2877)
Release Notes:

- Added default key bindings for `NewFile` and `NewDirectory` in the
project panel (bound to `cmd-n` and `alt-cmd-n`, respectively).
2023-08-22 11:48:02 -04:00
Joseph T. Lyons 07a815a3bc Add default bindings for new file and directory 2023-08-22 11:33:40 -04:00
Nathan Sobo 8ddfc32685 Add more style helpers 2023-08-22 09:16:05 -06:00
Nathan Sobo ac8408ac9b Checkpoint 2023-08-22 09:07:45 -06:00
Piotr OsiewiczandJulia Risley 9a197a63f8 Z 2819 (#2872)
This PR adds new config option to language config called
`word_boundaries` that controls which characters should be recognised as
word boundary for a given language. This will improve our UX for
languages such as PHP and Tailwind.

Release Notes:

- Improved completions for PHP
[#1820](https://github.com/zed-industries/community/issues/1820)

---------

Co-authored-by: Julia Risley <julia@zed.dev>
2023-08-22 10:35:20 +02:00
Joseph T. LyonsandMikayla 12462785e9 Add a default_open_ai_model setting for the assistant (#2876)
[This PR has been sitting around for a
bit](https://github.com/zed-industries/zed/pull/2845). I received a bit
of mixed opinions from the team on how this setting should work, if it
should use the full model names or some simpler form of it, etc. I went
ahead and made the decision to do the following:

- Use the full model names in settings - ex: `gpt-4-0613`
- Default to `gpt-4-0613` when no setting is present
- Save the full model names in the conversation history files (this is
how it was prior) - ex: `gpt-4-0613`
- Display the shortened model names in the assistant - ex: `gpt-4`
- Not worry about adding an option to add custom models (can add in a
follow-up PR)
- Not query what models are available to the user via their api key (can
add in a follow-up PR)

Release Notes:

- Added a `default_open_ai_model` setting for the assistant (defaults to
`gpt-4-0613`).

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
2023-08-22 02:55:27 -04:00
Conrad Irwin 3b7b5bc3f7 Add test for word characters in vim 2023-08-21 22:37:14 -06:00
Conrad Irwin b59df7df6d Add # and $ for js 2023-08-21 22:36:58 -06:00
Piotr Osiewicz c2df72d499 Remove comment;for real now 2023-08-22 01:04:55 +02:00
Piotr Osiewicz 5eda997e42 Revert "Remove dead comment"
This reverts commit ba0b744132.
2023-08-22 01:04:15 +02:00
Piotr Osiewicz 1228f3ddb3 Rename word_boundaries to word_characters 2023-08-22 01:02:25 +02:00
Piotr Osiewicz ba0b744132 Remove dead comment 2023-08-22 01:01:27 +02:00
Nathan Sobo fe69caadb4 Checkpoint 2023-08-21 16:14:59 -06:00
Joseph T. Lyons 52d13092c7 Add channel id to call events (#2873)
Release Notes:

- N/A
2023-08-21 14:11:35 -04:00
Joseph T. LyonsandMax Brunsfeld b6fc142f3e Add channel id to call events
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
2023-08-21 13:50:04 -04:00
Piotr Osiewicz 9cbc680636 Merge branch 'main' into Z-2819 2023-08-21 17:41:27 +02:00
Piotr Osiewicz f134b20104 ..and use it in PHP language config 2023-08-21 17:41:05 +02:00
Piotr Osiewicz 0a0daa6842 Use new char_kind (parameterized by language) 2023-08-21 17:39:38 +02:00
Piotr OsiewiczandJulia Risley 6a6ae93462 WIP: Saved state from Friday.
Co-authored-by: Julia Risley <julia@zed.dev>
2023-08-21 17:09:03 +02:00
Kyle Caverly 067f5836b2 Semantic index rough edges (#2871)
Small PR aimed at improving a few edge cases for semantic indexing large
projects.

Release Notes (Preview-only).

- Batched large files with a number of documents greater than
EMBEDDINGS_BATCH_SIZE.
- Ensured that the job handle counting mechanism is consistent with
inner file batching.
- Updated tab content names for semantic search, to match text/regex
searches.
2023-08-21 13:43:08 +02:00
Piotr OsiewiczandKyle 02b3120896 chore: fix compiler warning
Co-authored-by: Kyle <kyle@zed.dev>
2023-08-21 13:31:45 +02:00
Piotr OsiewiczandKyle 1020f10c1c project_search: use search history's current entry as a tab name.
Previously the tab name for Semantic Search was not updated, as we didn't have an active query to go off of

Co-authored-by: Kyle <kyle@zed.dev>
2023-08-21 13:30:32 +02:00
Piotr OsiewiczandKyle 5d177b2878 Do not attempt to reindex a file if previous attempts have failed.
Add doc comment to JobHandle

Co-authored-by: Kyle <kyle@zed.dev>
2023-08-21 13:23:11 +02:00
Piotr OsiewiczandKyle ae4347f9fc Increment job counter on JobClient::new
Co-authored-by: Kyle <kyle@zed.dev>
2023-08-21 13:00:56 +02:00
KCaverlyandPiotr df70842411 update job handle to ensure file count is consistent
Co-authored-by: Piotr <piotr@zed.dev>
2023-08-21 12:47:43 +02:00
Piotr Osiewicz 45d7ec8260 chore: Update Cargo.lock following rodio PR (#2870)
That's merely a follow-up to a previous PR.
Release Notes:
- N/A
2023-08-21 11:33:06 +02:00
KCaverly cdb0c58a6e manage for edge case in which file documents are larger than the allowable limit 2023-08-21 11:29:45 +02:00
Piotr Osiewicz 9211fe3c2d chore: remove unused features from rodio crate. (#2869)
This reduces our dep count by 1% at the expense of not supporting
playback of .flac, .mp3 and .vorbis formats. We only use .wav anyways.


Release Notes:
- N/A
2023-08-21 11:07:31 +02:00
Nathan Sobo dbe9de13ea WIP 2023-08-19 23:16:20 -06:00
Nathan Sobo 29078d6b0b Checkpoint 2023-08-19 22:33:28 -06:00
Nathan Sobo aed075b43e Checkpoint 2023-08-19 21:24:28 -06:00
Nathan Sobo a9db2ade4f Checkpoint 2023-08-19 20:29:55 -06:00
Nathan Sobo e1034181ec Compiling checkpoint 2023-08-19 19:51:22 -06:00
Mikayla Maki 034edacac9 Update components.rs 2023-08-19 04:30:49 -07:00
Nathan Sobo 39eb2c88c1 WIP: Trying to find a composable approach to styling that plays nice with layout engine 2023-08-18 20:08:29 -06:00
Mikayla Maki 5a238a5885 Revert "Remove semantic search UI" (#2865)
This reverts commit 63477cf1f1, where I
deleted the semantic-search related UI code.

Apologies to @KCaverly for the misunderstanding

Release Notes:

- N/A
2023-08-18 18:05:19 -07:00
Mikayla Maki c0bee782b6 Remove potential osascript hijacking attack (#2867)
Fixes
https://linear.app/zed-industries/issue/Z-2818/security-vulnerability-dylib-injection

Release Notes:

- Fixed a potential local code-injection if a user installs the Zed CLI
for the first time with a hijacked `osascript` in their path.
2023-08-18 18:00:39 -07:00