Commit Graph

19705 Commits

Author SHA1 Message Date
José Olórtegui
6e2be283dd
emmet: Support more languages (#10779)
Hey guys! `emmet-language-server` author here. Thank you so much for the
amazing editor!

This PR adds more languages to the list for the `emmet-language-server`
to attach to.

I have a question though, I saw that you guys don't differentiate yet
between `JavaScript` and `JSX` files. I know that the tree-sitter parser
for `js` comes with the ability to parse both but we still need to make
that difference. Is that part of the plan? or do you have a reason for
doing that?

Aside from that, I've still added support for `JavaScript` files since
is important to have emmet completions in `JSX` files, but I would like
to know what are your thoughts on that since doing this may pollute the
completions in `.js` files.

And one last thing, the emmet language server accepts more filetypes
such as `pug`, `sass`, `scss` and `less` files, which are not currently
supported by zed. Should I create some extensions to add grammar support
to those files later? Should those extensions be part of the zed repo?
I'm just thinking that those are sort of core languages.

Aside from that, let me know if there's anything left to do on my side.
Greetings!

Fixes #10654.

Release Notes:

- N/A
2024-05-06 12:09:19 +02:00
Bennet Bo Fenner
cf6c2daaa2
remoting: Register remote modal action when flag is present (#11426)
Fixes #11391

Release Notes:

- N/A
2024-05-06 11:31:30 +02:00
Bennet Bo Fenner
283d424485
remoting: Prevent user from creating multiple dev servers accidentally (#11425)
Fixes #11389 

Release Notes:

- N/A
2024-05-06 11:02:52 +02:00
Conrad Irwin
c68b700312
Fix install.sh to always install to 'zed' (#11370)
This makes our remoting instructions work regardless of which version of
zed is installed.

Release Notes:

- N/A
2024-05-05 20:17:55 -06:00
Nate Butler
08c9157a1e
Standardize TabBar start_slot and end_slot elements (#11403)
- Unifies spacing between left and right sides of the tab bar
- Use the default icon color for `end_slot` tools. This should help more
clearly differentiate when forward or backward navigation is disabled
due to the tools on the other side not looking so much like the disabled
navigation arrows.
- Rework the TabBar implementation in `pane.rs` to directly pass in
items to the `start_slot` instead of an unneeded extra horizontal
layout.

Left side:

![CleanShot 2024-05-05 at 11 08
35@2x](https://github.com/zed-industries/zed/assets/1714999/ec80fda5-17ce-4cd4-ae54-8c63dcc79e69)

Right side:

![CleanShot 2024-05-05 at 11 09
04@2x](https://github.com/zed-industries/zed/assets/1714999/0281e462-202f-407b-b6b7-7acbcde9138f)

Release Notes:

- Standardized some Tab Bar UI elements. You many notice some slight
spacing or color changes.
2024-05-05 19:59:18 -04:00
Kirill Bulatov
1e84f01041
Use lowercased language name as language id fallback (#11412) 2024-05-05 22:27:18 +03:00
Piotr Osiewicz
5a71d8c7f1
Add support for detecting tests in source files, and implement it for Rust (#11195)
Continuing work from #10873 

Release Notes:

- N/A

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
2024-05-05 16:32:48 +02:00
Piotr Osiewicz
14c7782ce6
chore: Fix main CI after upgrade to Rust 1.78 (#11402)
The CI was green at the time I've merged Rust 1.78, but a change that
violated clippy::empty_doc has slipped through into main in the
meantime. Mea culpa, I should've reran the CI.



Release Notes:

- N/A
2024-05-05 15:37:53 +02:00
Piotr Osiewicz
1a9b0536a2
Rust 1.78 (#11314)
Notable things I've had to fix due to 1.78:
- Better detection of unused items
- New clippy lint (`assigning_clones`) that points out places where assignment operations with clone rhs could be replaced with more performant `clone_into`
Release Notes:

- N/A
2024-05-05 15:02:50 +02:00
Kirill Bulatov
9ec0927701
Respect LSP completion triggers when copilot suggestion is on (#11401) 2024-05-05 13:01:52 +03:00
Max Brunsfeld
89039f6f34
Restore rendering of assistant tool calls (#11385)
Chat message rendering was restructured in
https://github.com/zed-industries/zed/pull/11327, but it caused tool
calls not to be rendered if the assistant hadn't generated any message
text.

before:

![Screenshot 2024-05-03 at 10 02
57 PM](https://github.com/zed-industries/zed/assets/326587/2b7fd763-0c75-4690-9824-3bd37a3efef2)

after:

<img width="518" alt="Screenshot 2024-05-03 at 11 17 45 PM"
src="https://github.com/zed-industries/zed/assets/326587/34de19ba-daf2-4ac1-9fe0-f51d0ce94872">

Release Notes:

- N/A
2024-05-03 23:33:47 -07:00
Max Brunsfeld
6964302d89
More fixes to the semantic index's chunking (#11376)
This fixes a tricky intermittent issue I was seeing, where failed to
chunk certain files correctly because of the way we reuse Tree-sitter
`Parser` instances across parses.

I've also accounted for leading comments in chunk boundaries, so that
items are grouped with their leading comments whenever possible when
chunking.

Finally, we've changed the `debug project index` action so that it opens
a simple debug view in a pane, instead of printing paths to the console.
This lets you click into a path and see how it was chunked.

Release Notes:

- N/A

---------

Co-authored-by: Marshall <marshall@zed.dev>
2024-05-03 19:00:18 -07:00
Marshall Bowers
335c307b93
Fix README links (#11382)
This PR fixes the links in the README to account for the changes in the
docs structure.

Also, somehow the README had gotten added with `\r\n` newlines, so I
changed it back to `\n` newlines.

Release Notes:

- N/A
2024-05-03 19:53:22 -04:00
Marshall Bowers
02a859fb08
docs: Fix favicon (#11381)
This PR fixes the favicon used in the docs so it matches zed.dev.

Release Notes:

- N/A
2024-05-03 19:20:07 -04:00
Kyle Kelley
f576bd3aaf
Clean up some stray todos (#11380)
Quick little todo comment cleanups, either because they aren't needed or
a comment will suffice.

Release Notes:

- N/A
2024-05-03 16:17:56 -07:00
Marshall Bowers
15299dcf80
docs: Update "Themes" page (#11379)
This PR updates the "Themes" page in the docs to remove some outdated
copy.

Release Notes:

- N/A
2024-05-03 19:05:29 -04:00
Marshall Bowers
75a545308d
docs: Update inline code style (#11378)
This PR updates the inline code style on the docs to match what we use
on zed.dev.

Release Notes:

- N/A
2024-05-03 19:00:36 -04:00
Marshall Bowers
d62943930b docs: Put redirects underneath /docs2 path 2024-05-03 18:52:39 -04:00
Marshall Bowers
0969f314b9 docs: Update redirects 2024-05-03 18:50:05 -04:00
Marshall Bowers
8d390f986d docs: Remove unneeded frontmatter from "Themes" 2024-05-03 18:37:59 -04:00
Conrad Irwin
b2582a7b1b
docs: Force light mode syntax highlighting (#11377)
Release Notes:

- N/A

Co-authored-by: Marshall <marshall@zed.dev>
2024-05-03 18:34:38 -04:00
Conrad Irwin
a497c49fb8
update docs content (#11374)
Move all docs to zed repo

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Co-authored-by: Marshall <marshall@zed.dev>
2024-05-03 16:24:04 -06:00
Kyle Kelley
3e5dcd1bec
Attachment store for assistant2 (#11327)
This sets up a way for the user (or Zed) to _push_ context instead of
having the model retrieve it with a function. Our first use is the
contents of the current file.

<img width="399" alt="image"
src="https://github.com/zed-industries/zed/assets/836375/198429a5-82af-4b82-86f6-cb961f10de5c">

<img width="393" alt="image"
src="https://github.com/zed-industries/zed/assets/836375/cfb52444-723b-4fc1-bddc-57e1810c512b">

I heard the asst2 example was deleted in another branch so I deleted
that here too since we wanted the workspace access.

Release Notes:

- N/A

---------

Co-authored-by: Marshall <marshall@zed.dev>
2024-05-03 14:48:00 -07:00
Conrad Irwin
6bdcfad6ad
Zeddish docs (#11372)
Co-Authored-By: Marshall <marshall@zed.dev>

Release Notes:

- N/A

---------

Co-authored-by: Marshall <marshall@zed.dev>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-05-03 15:34:44 -06:00
apricotbucket28
86696d88cf
wayland: Implement xdg-activation when opening urls (#11368)
Since Wayland doesn't have a way for windows to activate themselves,
currently, when you click on a link in Zed, the browser window opens in
the background.

This PR implements the `xdg-activation` protocol to get an activation
token, which the browser can use to raise its window.


https://github.com/zed-industries/zed/assets/71973804/8b3456c0-89f8-4201-b1cb-633a149796b7

Release Notes:

- N/A
2024-05-03 14:02:39 -07:00
Marshall Bowers
dccf6dae01
Setup docs deployments with mdBook (#11369)
This PR sets up deployments for the docs using mdBook.

Right now the new docs are hosted at
[zed.dev/docs2](https://zed.dev/docs2/).

The docs are deployed to Cloudflare Pages on merges to `main`, and we
have a Cloudflare Worker that routes traffic from `zed.dev/docs2` to the
docs deployment.

We can iterate on the docs for a bit, and then promote them to
`zed.dev/docs` when we're all ready for the switchover.

Release Notes:

- N/A

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-05-03 15:52:15 -04:00
Kyle Kelley
6563330239
Supermaven (#10788)
Adds a supermaven provider for completions. There are various other
refactors amidst this branch, primarily to make copilot no longer a
dependency of project as well as show LSP Logs for global LSPs like
copilot properly.

This feature is not enabled by default. We're going to seek to refine it
in the coming weeks.

Release Notes:

- N/A

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Nathan Sobo <nathan@zed.dev>
Co-authored-by: Max <max@zed.dev>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2024-05-03 12:50:42 -07:00
Conrad Irwin
610968815c
Fix backwards mouse selection in vim mode (#11329)
Fixes: #8492

Release Notes:

- vim: Fixed last character of reversed mouse selections (#8492)
2024-05-03 10:29:30 -06:00
Marshall Bowers
ff56ca7280
toml: Bump to v0.1.1 (#11359)
This PR bumps the TOML extension to v0.1.1.

Changes:

- https://github.com/zed-industries/zed/pull/11251

Release Notes:

- N/A
2024-05-03 11:29:53 -04:00
Marshall Bowers
899f7113ba
elixir: Bump to v0.0.3 (#11358)
This PR bumps the Elixir extension to v0.0.3.

Changes:

- https://github.com/zed-industries/zed/pull/11318

Release Notes:

- N/A
2024-05-03 11:12:35 -04:00
Jason Lee
beee79a9e7
toml: Fix language server installation on Windows (#11251)
Release Notes:

- N/A


---

Follow #11156, to make sure extensions install on window.

https://github.com/tamasfe/taplo/releases/tag/0.8.1

The Taplo have `gz` for windows, so we can just use `gz`.

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-05-03 11:11:46 -04:00
Andrei Zvonimir Crnković
b3d969ef3c
elixir: Check for next-ls and lexical in path first (#11318)
Since it's not longer possible to setup a local elixir LSP, @maxdeviant
proposed to look for `next-ls` and `lexical` in path first, just like
it's already done for `elixir_ls`.

For context take a look at #11297 (starting from [this
comment](https://github.com/zed-industries/zed/issues/11297#issuecomment-2091095537)).

Release Notes:

- N/A
2024-05-03 11:03:25 -04:00
Thorsten Ball
55555bb41f
Enable first version of auto-updates on Linux (#11348)
This downloads Nightly/Preview releases on Linux and copies the contents
the `zed-<channel>.app` to `~/.local`.

What's missing:

- Check if we're not installed in ~/.local and abort
- Update `.desktop` file


Release Notes:

- N/A
2024-05-03 16:43:28 +02:00
Kirill Bulatov
f5e155b5a9
When clicking on a hunk expand it, do not move the caret (#11350)
Release Notes:

- N/A
2024-05-03 16:44:33 +03:00
Bennet Bo Fenner
36055505cd
project panel: Allow confirming prompt with keyboard (#11346)
The ability to confirm the file deletion prompt by pressing "Enter" was
broken in #11015

Release Notes:

- Restored the ability to confirm a prompt by pressing "Enter" when
deleting/trashing files
2024-05-03 15:15:39 +02:00
Thorsten Ball
9348e6f7fb
lsp: More information in error if server fails to start (#11343)
We do log that information, but we don't put it in the error message
where it's really useful.



Release Notes:

- N/A
2024-05-03 13:23:52 +02:00
José Olórtegui
f987ff05fd
Improve JSDoc injection in comments (#10800)
This PR improves JSDoc injection for syntax highlighting. Now we are
only injecting JSDoc in block comments. The regex was mostly adapted
from nvim-treesitter's implementation (lua) to a rust regex.


eb93c3b2fb/queries/ecma/injections.scm (L1-L6)

**Before:**
<img width="441" alt="Screenshot 2024-04-20 at 5 51 04 AM"
src="https://github.com/zed-industries/zed/assets/20072509/8e77851d-22ad-4dc4-8e10-9ac558d3cf40">

**After:**
<img width="441" alt="Screenshot 2024-04-20 at 5 52 05 AM"
src="https://github.com/zed-industries/zed/assets/20072509/a607c219-6973-40c3-958c-44a003d008c3">

Release Notes:

- Changed detection of JSDoc to only do syntax highlighting in block
comments. Improved previous work done in #7826.
2024-05-03 11:43:10 +02:00
adorabilis
2306e3cd50
Add brackets and missing operators to Python grammar (#11180)
Release Notes:

- Fixed #4341 

Before:

![before](https://github.com/zed-industries/zed/assets/16101408/34672e47-5131-481a-803e-064db8126cc9)

After:

![after](https://github.com/zed-industries/zed/assets/16101408/7d2405c6-d04f-4738-ad2e-a9424b1c9d19)
2024-05-03 11:37:44 +02:00
Dom Christie
f252d9cf67
Fix alt-shift-(left|right) behaviour (#11292)
Not sure what the etiquette is here, but in the interest of fixing
#10242, I've re-implemented @jish's PR
https://github.com/zed-industries/zed/pull/10535 and have signed the CLA


Release Notes:

- Fixed `alt-shift-left` and `alt-shift-right` in the Textmate default
keybindings.
([#10242](https://github.com/zed-industries/zed/issues/10242))

TextMate keymap uses default option shift arrow selection
2024-05-03 11:29:47 +02:00
Thorsten Ball
5ce45908b1
install.sh: use per-channel binary names in ~/.local/bin (#11339)
Release Notes:

- N/A
2024-05-03 11:19:11 +02:00
Kirill Bulatov
cd03e473c8
Improve deleted hunk blocks' behavior (#11340)
* clear their selections on focus lost
* allow reverting diff hunks when the caret is inside of the deleted
hunk diff editor block

Release Notes:

- N/A
2024-05-03 12:18:50 +03:00
Thorsten Ball
e69e25c171
linux: Use app_id as filepath for desktop file (#11337)
This undoes the changes from #11333 and uses the path of the `.desktop`
file instead.

According ot the spec
(https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html)
the filename and path of the `desktop` file are used to determine the
desktop file ID.

This is enough to match the windows (which have the same WMClass/app-id)
with the desktop entry.

Release Notes:

- N/A
2024-05-03 11:03:55 +02:00
Thorsten Ball
61a60d37a2
Tie the Zed application ID to the release channel (#11335)
Since we do want to have different versions of Zed running on the same
Linux install, we need to give them different application IDs so they're
not grouped together as the same application.

This changes the app_id depending on the releaes channel and, crucially,
it also matches them up with the bundle identifiers that we use on
macOS.

Release Notes:

- N/A
2024-05-03 10:48:35 +02:00
Matthias Grandl
4024b9ac4d
gpui: Fix start_display_link leading to resource leak on hidden windows (#11289)
Release Notes:

- N/A

While developing [Loungy](https://loungy.app), I noticed that everytime
I wake my laptop, Loungy starts consuming 100% CPU. I traced it down to
`start_display_link` as there was this error message at the time of wake
up:

```
[2024-05-02T05:02:31Z ERROR util] /Users/matthias/zed/crates/gpui/src/platform/mac/window.rs:420: could not create display link, code: -6661
```

The timeline is this:

1. The application is hidden with `cx.hide()`
2. The system is put to sleep and later woken up
3. `window_did_change_screen` would trigger immediately after wakeup,
calling `start_display_link`
4. `start_display_link` fails catastrophically as `DisplayLink::new`
starts hogging all the CPU for some reason?
5. throws the error message above
6. Once the window is opened, `window_did_change_occlusion_state` it
retriggers `start_display_link` and the CPU issue subsides
2024-05-03 10:35:51 +02:00
Kirill Bulatov
b523ee6980
Use Rope instead of String for buffer diff base (#11300)
As an attempt to do things better when showing diff hunks, store diff
base as Rope, not String, to have cheaper clones when the diff base text
is reused, e.g. creating another buffer with the diff base text for hunk
diff expanding.

Release Notes:

- N/A
2024-05-03 11:18:43 +03:00
Thorsten Ball
5f0046b923
linux: Set StartupWMClass in .desktop file (#11333)
This has to match the WMClass/AppID, which was added here: #10909

Release Notes:

- N/A
2024-05-03 10:17:30 +02:00
Max Linke
155a80c6a5
Rename test (#11317)
This naming makes the purpose of the test clearer to people new to the
project.
2024-05-02 19:56:34 -06:00
Fernando Tagawa
7bc1025d91
Wayland: Fix segfault when exiting with ctrl+q (#11324)
Release Notes:

- N/A

When closing with `ctrl-q`, drop_window is not called and results in a
segfault.
2024-05-02 16:39:08 -07:00
Nathan Sobo
b58bf64f0a
Increase rate limits for computing embeddings (#11326)
- Also, remove the rate limit for getting cached embeddings entirely.

Release Notes:

- N/A
2024-05-02 16:36:45 -07:00
Nate Butler
47b38a0428
Tidy Assistant2 composer (#11321)
Release Notes:

- N/A
2024-05-02 17:54:55 -04:00