Commit Graph
31406 Commits
Author SHA1 Message Date
Max BrunsfeldandKyle 54ec25119d Start work on exposing semantic search via project search view
Co-authored-by: Kyle <kyle@zed.dev>
2023-07-17 18:10:51 -07:00
Nathan Sobo 19e8591069 WIP 2023-07-17 16:48:31 -06:00
Nathan SoboandDerek Briggs 0db546fb3b Paint basic children
Co-Authored-By: Derek Briggs <derek.briggs@me.com>
2023-07-17 16:39:58 -06:00
KCaverly 06f9050678 remove debug logging for enabled settings 2023-07-17 17:09:51 -04:00
KCaverly 09b64c5c16 rename vector_store crate to semantic_index 2023-07-17 17:06:10 -04:00
KCaverly 6f28e301ef add embedding treesitter queries for elixir 2023-07-17 16:29:25 -04:00
Joseph T. Lyons 43e8bf1c6b Prevent multiple submissions of the same feedback text (#2740)
Fixes:
https://linear.app/zed-industries/issue/Z-2416/improvements-to-feedback-submission

We get a lot of duplicate messages through our in-app feedback. My best
guess is that because we do not tell the user we are doing anything, and
because submission takes awhile, users are hitting the submission button
mutliple times. This PR blocks the submission code, once an initial
submission is sent. If the original submission fails, we unblock the
submission code. The submit button is disabled and enabled accordingly
as well.

Release Notes:

- N/A
2023-07-17 16:15:49 -04:00
Mikayla Maki 0895dd48c1 feat(workspace): add option for moving the tab close button to the left (#2739)
Fixes https://github.com/zed-industries/community/issues/1760

Release Notes:

- Add option for chosing where the close button should be displayed on
editor tabs
2023-07-17 13:10:42 -07:00
Joseph T. LyonsandJulia f1099ed9cc Prevent multiple submissions of the same feedback text
Co-Authored-By: Julia <30666851+ForLoveOfCats@users.noreply.github.com>
2023-07-17 16:10:34 -04:00
Alex Viscreanu 1258838a6f feat(workspace): add option for moving the tab close button to the left 2023-07-17 21:17:28 +02:00
Mikayla Maki 49e759446a feat(workspace): show git status on editor tabs (#2736)
Fixes https://github.com/zed-industries/community/issues/1674

Release Notes:

- Added option for showing git status on editor tabs
2023-07-17 12:14:39 -07:00
KCaverly a18daf10f5 add css as a embeddable file type in which the entire file is embedded individually 2023-07-17 14:53:57 -04:00
Alex Viscreanu f4990e2c20 feat(workspace): show git status on editor tabs 2023-07-17 20:53:42 +02:00
Conrad Irwin 63c6387539 Avoid optional on select_match 2023-07-17 12:49:59 -06:00
KCaverly dc8256c7e5 add embedding treesitter query for cpp 2023-07-17 14:43:29 -04:00
Max Brunsfeld 20f910cc12 Make macOS application menu aware of which key bindings are disabled (#2735)
Follow-up of https://github.com/zed-industries/zed/pull/2678
Deals with https://github.com/zed-industries/community/issues/772

Refreshes macOs menu panel on keymap file change and properly ignore
disabled actions.

Release Notes:

- Fixes a bug when disabled actions from macOs menu were still working
2023-07-17 11:20:41 -07:00
Julia e4ad6f2840 After first panic, ignore others and tear down process even if in thread (#2725)
Spent a bit in a deep dive into how to handle this and honestly the
situation is rather unfortunate. The core problem is that when we have a
panic anywhere we need to tear down the app, and we'd like to do that as
cleanly as possible, avoiding throwing any other panics along the way if
possible.

We've been seeing a number of panics being reported which are
nonsensical, seemingly pointing to being a fallout panic from a worker
thread panic-ing, at which point we would write multiple panics to the
panic file, and we could possibly upload either both or the wrong panic
causing a wild goose chase. Unfortunately I've been entirely unable to
reproduce the specific panic we've been seeing but I was able to read
through the code responsible and confirm that under specific situations
a panic on one worker can cause another worker or the main thread to
also panic.

An easy solution to this is just to ignore any panics after the first
one. I'm thinking that *hopefully* we can trust the first panic to reach
the panic hook first so that the flag doesn't accidentally filter out
the panic we actually care about.

That being said we were expecting that to have already been the case
about which panic gets written to the panic file first, the first one in
the file being the one we upload, which doesn't seem to have been the
case. I'm hoping it was IO silliness causing that and that the flag
shouldn't be race-y, however this is still a shot in the dark. 🤞

As for cleanly shutting down, there's not really much we can do. One
thread physically cannot cause another to unwind without somehow sending
a message which isn't super useful. The only way for a thread to shut
down all threads and the process is to go nuclear and abort/exit the
process. This will never unwind other threads, effectively having the
same effect on those threads as compiling with `panic = "abort"` would.

With some (mis)use of `std::panic::resume_unwind` we can at least say
that for whatever thread actually panic-ed we will unwind, and any other
threads that panic as a result will probably get at least partway
through unwinding. This is weird, almost a combination of panic
rewinding and aborting, and may actually be worse than just biting the
bullet and aborting immediately.

I'm really not a fan of where I've ended up but it does seem to at the
very least an improvement. The main question in my mind at this point is
whether it would be better to attempt to unwind what we can or go all in
on abort. I'd love some input on that.

Release Notes:
- Improved panic reporting when a background thread panics.
2023-07-17 13:52:33 -04:00
Julia 923513650e After first panic, ignore others and tear down process even if in thread 2023-07-17 13:43:43 -04:00
Kirill BulatovandMax Brunsfeld 3a56d2b61a Simplify NoAction filtering logic
co-authored-by: Max Brunsfeld <max@zed.dev>
2023-07-17 20:42:35 +03:00
Kirill Bulatov 2ec3dac041 Ignore keybindings with NoAction in config overrides 2023-07-17 18:34:39 +03:00
Conrad Irwin 41775f1244 Merge branch 'main' into vim-search 2023-07-17 09:27:02 -06:00
KCaverly f3d40ba41c update vector_store to accomodate for full file parsing for JSON, TOML and YAML files 2023-07-17 10:04:32 -04:00
KCaverly 8c97989fbe update jsx family of languages for preceeding comments and nested exports 2023-07-17 09:22:37 -04:00
Piotr Osiewicz 03e4d52704 Remove dbg calls 2023-07-17 13:08:41 +02:00
Piotr Osiewicz a6c08cfa79 Remove dbg! calls 2023-07-17 13:03:57 +02:00
Piotr Osiewicz ac9e84262e Remove test 2023-07-17 12:56:25 +02:00
Piotr Osiewicz 6f52c7237d rustfmt 2023-07-17 12:51:00 +02:00
Piotr Osiewicz 7f8162ef81 Cargo fix 2023-07-17 12:38:35 +02:00
Piotr Osiewicz 2b76e19b07 Set language id for PHP. LSP works! 2023-07-17 12:36:08 +02:00
Piotr Osiewicz b61f6bc0ae Merge branch 'main' into piotr/z-2588-php 2023-07-17 11:47:08 +02:00
Piotr Osiewicz 9560f20af8 Add scaffolding of php language server 2023-07-17 11:43:32 +02:00
Kirill Bulatov acc45767c5 Reload menu after keybindings change 2023-07-17 12:30:42 +03:00
Kirill Bulatov 2c27cff163 Use id instead of type_id for actions
Currently, both are the same thing, so the logic is not changed.
2023-07-17 12:24:56 +03:00
Mikayla Maki 5cc106002e Simplify db tests 2023-07-14 16:09:02 -07:00
Nathan SoboandDerek Briggs 721ab15387 Get a red box on screen
Co-Authored-By: Derek Briggs <derek.briggs@me.com>
2023-07-14 17:03:07 -06:00
Joseph T. Lyons 1efda4a2b0 Require only a single click to split pane when using cmd in project panel 2023-07-14 18:27:40 -04:00
Max Brunsfeld f48cf89a42 Optimize two slow code paths (#2728)
Linear:
https://linear.app/zed-industries/issue/Z-2578/zed-launches-very-slow-for-user

I was searching for the cause of a slow startup time reported in the
above issue, and I don't think I found it, but I did find two very
noticeable slow code paths while profiling, and fixed them.

###  Notes

1. When starting the JSON language server, we provide it with a JSON
schema for our settings. For the `theme` setting, the JSON schema needs
to read all of the themes in the registry, to generate a list of valid
theme names. Previously, as part of this, we were deserializing each
theme from JSON, which took a lot of CPU. Now, we don't do that.
2. When an FS event occurs within a git repository, we reload the git
status for all entries in that git repository. Previously, we did that
via a separate `libgit2` call per FS entry (including ignored entries,
so many thousands in the case of the `zed` repo). Now we do one
`libgit2` call, asking for all of the statuses. Git carries an index of
all of the files with statuses, so this is fast.

Release Notes:

- Improved the the performance of starting up a  JSON language server.
- Improved the performance of handling changes to git repositories, such
as changing branches or committing.
2023-07-14 14:38:55 -07:00
Nathan SoboandDerek Briggs 5370235818 Get playground app launching
Not sure if it should be in the workspace, but it's easier for now.

Co-Authored-By: Derek Briggs <derek.briggs@me.com>
2023-07-14 15:34:31 -06:00
Max Brunsfeld 7614c594fc Perform only one git statuses call when reloading a git repo after it changes 2023-07-14 14:29:22 -07:00
Max Brunsfeld a4879a3c2d Avoid deserializing all themes to compute settings JSON schema 2023-07-14 14:29:22 -07:00
Nathan Sobo f37853087c Get cell compiling 2023-07-14 15:20:53 -06:00
Alex ViscreanuandMikayla Maki f1ae1407e7 fix(flexes): reset flexes when collapsing axis
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
2023-07-14 21:49:33 +02:00
Alex ViscreanuandMikayla Maki ef7952c045 feat(workspace): allow alternative actions to open files and symbols in split
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
2023-07-14 21:49:15 +02:00
Piotr Osiewicz 17bc3738b9 branch_list: Bail in case of missing worktrees. (#2726)
Z-2632

Release Notes:
- Fixed a crash that occurred when opening a modal branch picker without
a corktree.
2023-07-14 21:41:11 +02:00
Kirill Bulatov 9b283a6f4d Select all matches (#2717)
Closes https://github.com/zed-industries/community/issues/75
Closes https://github.com/zed-industries/community/issues/1749

The PR 

* changes keybindings for `Editor && mode == auto_height` context:
before, `alt-enter` and `alt-shift-enter` added new lines in such
editors, including the one from buffer search.

New bindings are the same as in `Editor && mode == full` context.

* adds `search::SelectAllMatches` action and binds it to `Alt + Enter`
by default, to select all matches of a buffer search

The behavior mimics VSCode: we do not move the screen even if all
selections are out of the visible range (Cmd+G will navigate there) and
allow reselecting the results from both pane and search field, as long
as the search is not dismissed.

Release Notes:

- Added `search::SelectAllMatches` (`Alt + Enter` default) action to
place carets and select all buffer search results
([#75](https://github.com/zed-industries/community/issues/75),
[#1749](https://github.com/zed-industries/community/issues/1749)).
2023-07-14 21:37:04 +03:00
KCaverly 32c5df544d update embedding query for tsx to accomodate for leading comments 2023-07-14 14:25:08 -04:00
Nathan Sobo 7eaf20238e WIP 2023-07-14 11:58:43 -06:00
KCaverly 2812d729a4 update typescript parsing to manage for leading tsdoc comments 2023-07-14 13:47:10 -04:00
Piotr Osiewicz ffda402e0e branch_list: Bail in case of missing worktrees.
Z-2632
2023-07-14 19:33:27 +02:00
Max Brunsfeld 833cf6a57d Fix syntax map issues that caused bugs in editing HEEx (#2723)
Fixes [Z-2575 : HEEX files are using deprecated commenting
sytle](https://linear.app/zed-industries/issue/Z-2575/heex-files-are-using-deprecated-commenting-sytle)

- Fixed a bug where comment toggling and bracket matching used the wrong
characters in templating languages like ERB and HEEx
([#1724](https://github.com/zed-industries/community/issues/1724)).
- Fixed a bug where interpolated code was sometimes not parsed correctly
within templating languages like ERB and HEEx.
2023-07-14 10:23:25 -07:00