Commit Graph

14192 Commits

Author SHA1 Message Date
rmu
dbe1f48f95
ocaml: Small query improvements and fix autoclose brackets (#7769)
Turns out auto-closing words was a bad idea. win**do**w, **struct**ure,
**sig**n and so on

They don't serve any purpose in `config.toml` nor `brackets.scm` at this
point, so I removed them>

Release Notes:
- N/A
2024-02-24 19:06:25 -05:00
Marshall Bowers
401798d9b8
Remove unused plugin crates (#8350)
This PR removes the unused crates for plugin support.

We're currently exploring Wasm-based extensions, and it's unlikely that
we'll be reusing any of this existing work.

Release Notes:

- N/A
2024-02-24 19:05:18 -05:00
Dzmitry Malyshau
35bec9803a
Clean up dependencies of call,lsp,project,settings,vim,welcome, and workspace (#8330)
Based on the product of
[cargo-machete](https://blog.benj.me/2022/04/27/cargo-machete/):

[dependencies.txt](https://github.com/zed-industries/zed/files/14392213/dependencies.txt)

Release Notes:
- N/A
2024-02-25 00:41:28 +02:00
Max Brunsfeld
d4973846c0
Bump tree-sitter, wasmtime (#8306)
Fixes
https://github.com/zed-industries/zed/issues/8296#issuecomment-1961957369

Release Notes:

- Fixed a crash that would happen when loading an extension that added a
grammar that was generated using a very old version of Tree-sitter
([#8296](https://github.com/zed-industries/zed/issues/8296)).

---------

Co-authored-by: Conrad <conrad@zed.dev>
Co-authored-by: Marshall <marshall@zed.dev>
2024-02-24 14:24:29 -08:00
Kirill Bulatov
16d826a3f4 Show keybindings instead of the action names in the recent project modal 2024-02-25 00:08:57 +02:00
Kirill Bulatov
c29ea9bdbc Allow using context in the placeholder_text method 2024-02-25 00:08:57 +02:00
Chase Bellisime
d1b58601a1
Add plus and dollar sign to terminal paths (#8321)
After fix (file path is now clickable):
<img width="1019" alt="Screenshot 2024-02-23 at 8 59 45 PM"
src="https://github.com/zed-industries/zed/assets/63214891/cbdcb0f5-cd58-436b-9980-f657436f2bc0">

Before fix:
<img width="936" alt="Screenshot 2024-02-23 at 9 15 25 PM"
src="https://github.com/zed-industries/zed/assets/63214891/72d27155-a708-4b8d-a0b6-85d1e9031627">

Release Notes:

- Fixed an issue with terminal paths not allowing links when the path
included `+` or `$` symbols.
([#8256](https://github.com/zed-industries/zed/issues/#8256)).
2024-02-24 21:39:34 +02:00
Dzmitry Malyshau
d895388809 linux: profile text system functions 2024-02-24 00:04:00 -08:00
Dzmitry Malyshau
76196694b7 Fix unused warning in time_format 2024-02-24 00:04:00 -08:00
Marshall Bowers
ba4e1699ae
Rename ZedHttpClient for clarity (#8320)
This PR renames the `ZedHttpClient` to `HttpClientWithUrl` to make it
slightly clearer that it still is holding a `dyn HttpClient` as opposed
to being a concrete implementation.

Release Notes:

- N/A
2024-02-24 00:07:24 -05:00
Marshall Bowers
03b0764df4 Replace time_format license with symlink 2024-02-23 21:54:39 -05:00
Marshall Bowers
c59aab5090
Adjust labels of buttons in extension list based on status (#8319)
This PR makes the labels of the buttons in the extension list adapt to
reflect the current status.

Release Notes:

- Changed the button labels in the extension list to reflect the current
status.
2024-02-23 21:53:14 -05:00
vultix
2e616f8388
Add new argument vim text object (#7791)
This PR adds a new `argument` vim text object, inspired by
[targets.vim](https://github.com/wellle/targets.vim).

As it's the first vim text object to use the syntax tree, it needed to
operate on the `Buffer` level, not the `MultiBuffer` level, then map the
buffer coordinates to `DisplayPoint` as necessary.

This required two main changes:
1. `innermost_enclosing_bracket_ranges` and `enclosing_bracket_ranges`
were moved into `Buffer`. The `MultiBuffer` implementations were updated
to map to/from these.
2. `MultiBuffer::excerpt_containing` was made public, returning a new
`MultiBufferExcerpt` type that contains a reference to the excerpt and
methods for mapping to/from `Buffer` and `MultiBuffer` offsets and
ranges.

Release Notes:
- Added new `argument` vim text object, inspired by
[targets.vim](https://github.com/wellle/targets.vim).
2024-02-23 19:37:13 -07:00
Bennet Bo Fenner
dc7e14f888
Respect user preferences when formatting timestamp (#7994)
This is a follow up to #7945. The current behaviour reads the locale and
infers from that which type of time format should be used (12 hour/24
hour).
However, in macOS you can override this behaviour, e.g. you can use
en_US locale but still use the 24 hour clock format (Can be customized
under Settings > General > Date & Format > 24-hour time). You can even
customize the date format.

This PR uses the macOS specific `CFDateFormatter` API, which outputs
time format strings, that respect those settings.

Partially fixes #7956 (as its not implemented for linux)

Release Notes:

- Added localization support for all macOS specific date and time
configurations in chat
2024-02-23 19:18:06 -07:00
Marshall Bowers
7599933f30
Fix uploads to edit_events table (#8318)
This PR fixes uploads the `edit_events` table.

We were trying to insert into a column that didn't exist:

```
HTTP error 500 Internal Server Error: failed to upload to table 'edit_events'

Caused by:
    bad response: Code: 16. DB::Exception: No such column os_name in table default.edit_events
```

Release Notes:

- N/A
2024-02-23 20:58:45 -05:00
Max
622cae19eb
Fix alignment of traffic lights (#8128)
closes #7339
2024-02-23 20:09:14 -05:00
Marshall Bowers
e06ff5f507
Use SystemClock in EventCoalescer (#8317)
This PR updates the `EventCoalescer` to use the `SystemClock` trait to
abstract over the clock.

This allows us to test the advancement of time without relying on the
caller passing in the current time.

Release Notes:

- N/A
2024-02-23 20:07:13 -05:00
Paul Berg
9b44ba9382
linux/text: fix invalid span creation (#8286)
This fixes a crash when showing completions.

Release Notes:

- N/A
2024-02-23 17:03:00 -08:00
白山風露
aef299be3d
CI: Enable clippy on Windows (#8240)
Release Notes:

- N/A
2024-02-23 16:23:42 -08:00
Dzmitry Malyshau
885ae2d863
linux/x11: prioritize input in the event loop (#8253)
With this change, interaction with Zed is actually real-time and usable
🚀 🎉

The gist of it is - trying to process all of the input events before
rendering anything.

Release Notes:
- N/A

**Note**: this can be further improved in a follow-up.
Currently, once the input and runnables are processed, we'd try to draw
+ render a frame.
Presentation starts with acquiring a new frame. We currently have FIFO
presentation method, so acquiring a frame is blocking on that swapchain
image to become available. As the result, presentation takes around 16
ms, most of which is just busy wait.
Ideally, we'd be able to process more input in this time frame, instead.

**Note2**: it's a bit laggy in Debug for me, but that's just because of
the extra-long `draw` times, which is unrelated to rendering (or
platform support, for the matter). I'm curious how come on MacOS the
`draw()` times in Debug are more modest.
2024-02-23 16:22:54 -08:00
Mikayla Maki
cab8b5a9a3
Switch LSP prompts to use a non-blocking toast (#8312)
This fixes a major degradation in usability that some users ran into.

Fixes https://github.com/zed-industries/zed/issues/8255 
Fixes https://github.com/zed-industries/zed/issues/8229

Release Notes:

- Switch from using platform prompts to toasts for LSP prompts.
([8255](https://github.com/zed-industries/zed/issues/8255),
[8229](https://github.com/zed-industries/zed/issues/8229))

<img width="583" alt="Screenshot 2024-02-23 at 2 40 05 PM"
src="https://github.com/zed-industries/zed/assets/2280405/1bfc027b-b7a8-4563-88b6-020e47869668">

Co-authored-by: Marshall <marshall@zed.dev>
2024-02-23 15:18:32 -08:00
Wes Morgan
d993dd3b2c
Add .cljc, .edn, & .bb to Clojure filename extensions (#8285)
Release Notes:

- Added .cljc, .edn, & .bb to Clojure filename extensions
([#7845](https://github.com/zed-industries/zed/issues/7845)).
2024-02-23 23:46:27 +02:00
Conrad Irwin
351e6a5de2
Expose extensions API from api.zed.dev (#8307)
This avoids the need to pay for bandwidth

Co-Authored-By: Marshall <marshall@zed.dev>



Release Notes:

- N/A

Co-authored-by: Marshall <marshall@zed.dev>
2024-02-23 16:08:14 -05:00
Conrad Irwin
41949d7b6c
Log HTTP path in http logs (#8305)
Co-Authored-By: Marshall <marshall@zed.dev>


Release Notes:

- N/A

Co-authored-by: Marshall <marshall@zed.dev>
2024-02-23 15:50:27 -05:00
Conrad Irwin
0fbd0d6649
collab: Log HTTP requests (#8297)
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-02-23 14:50:06 -05:00
Conrad Irwin
69c7d0e549 oops 2024-02-23 12:38:36 -07:00
Marshall Bowers
d3a38c69cd
Only spawn the extensions reconciliation task in the collab service (#8301)
This PR makes it so the background task that reconciles the extensions
database with the blob store only runs on the `collab` service.

This avoids us having multiple of these jobs running at once.

Release Notes:

- N/A
2024-02-23 14:38:16 -05:00
Conrad Irwin
7c514d044f
Fix collab (#8298)
Co-Authored-By: Marshall <marshall@zed.dev>

We broke it by deploying two servers simultaneously.

Release Notes:

- N/A

Co-authored-by: Marshall <marshall@zed.dev>
2024-02-23 14:23:15 -05:00
ethan
a11ebe01ff
Fix Flashing Hover Popover (#8238)
Release Notes:

- Use an inclusive range for local range containment check to match LSP
behavior & fix popover flashing while the cursor moves over the last
character of a symbol.


https://github.com/zed-industries/zed/assets/17223924/6c3ddc9c-04fb-4414-812f-025ede5ecaf7
2024-02-23 11:38:20 -07:00
Conrad Irwin
c5bb032224
Fix error logging (#8295)
and some more clickhouse type mismatches,

Co-Authored-By: Marshall <marshall@zed.dev>

Release Notes:

- N/A

Co-authored-by: Marshall <marshall@zed.dev>
2024-02-23 13:36:20 -05:00
Conrad Irwin
58fd84308d
Disable swift for now (#8291)
It causes segfaults on load

Release Notes:

- Fixed a segfault opening a Swift file with the Swift extension
installed.
2024-02-23 11:04:48 -07:00
Rom Grk
008d99d206
Wayland: implement key repeat (#8038)
Wayland requires the client to implement key repetition. This PR
implements the functionality as it's supposed to, but I don't see the
`repeat_info` event come in so the feature uses the default values (but
my system is configured for a much smaller `delay` and a much faster
`rate`). But this is good enough for now.

https://wayland-book.com/seat/keyboard.html#key-repeat


[Kooha-2024-02-20-20-42-12.webm](https://github.com/zed-industries/zed/assets/1423607/fb9fc327-efb7-43d1-9b53-1f8a3d9ba608)
2024-02-23 12:48:27 -05:00
Conrad Irwin
3bc7cd66b7
Allow typing space in workspace::SendKeystrokes (#8288)
Fixes #8222

Release Notes:

- N/A
2024-02-23 10:40:12 -07:00
Conrad Irwin
b0872b5b57
Deploy the ZED_CLIENT_CHECKSUM_SEED too (#8289)
Release Notes:

- N/A
2024-02-23 10:40:02 -07:00
Uladzislau Kaminski
602fd58929
Fix for toggles on the Welcome page (#8159)
Release Notes:

The issue is that when welcome page appears settings.json file is not
created yet. So the idea of this fix is to create the file in case it is
not there yet.

- Fixed the toggles on the welcome screen not working if no settings
file exists yet.
([#8153](https://github.com/zed-industries/zed/issues/8153)).

---------

Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
Co-authored-by: Marshall <marshall@zed.dev>
2024-02-23 18:24:04 +01:00
Thorsten Ball
ed3bb68206
Do not display inlay hints as bold (#8283)
I think bold is the least fitting font weight for inlay hints, which
should be subtle hints and not, well, bold.

If someone feels strongly about this, I can revert, but only if we add
the ability to change this per theme.

Until then: beautiful, thin, subtle inlay hints!

Release Notes:

- Improved styling of inlay hints by not making them bold in the editor.


![screenshot-2024-02-23-17 30
29@2x](https://github.com/zed-industries/zed/assets/1185253/89c2a162-76bb-45cd-8b45-2a5bdf8ca87b)
2024-02-23 18:17:13 +01:00
Marshall Bowers
522176d414
Adjust Kubernetes manifests for deploying API service (#8281)
This PR adjusts our Kubernetes manifests for deploying the new API
service.

Release Notes:

- N/A

---------

Co-authored-by: Conrad <conrad@zed.dev>
2024-02-23 12:14:40 -05:00
Conrad Irwin
f19ab464c7
Add telemetry events backend for collab (#8220)
Send telemetry to collab not zed.dev

Release Notes:

- N/A

---------

Co-authored-by: Marshall <marshall@zed.dev>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-02-23 11:13:28 -05:00
Thorsten Ball
6d91224882
Debounce language server reinstall attempts (#8277)
I don't think there's value in retrying 4 times as fast as possible,
especially if we might hit the Github API every time to check for the
newest version.

That gets us in rate limit problems quickly.

Release Notes:

- N/A
2024-02-23 17:00:05 +01:00
Conrad Irwin
351c8c9a36
fix vim panics (#8245)
Release Notes:

- vim: Fixed a panic when using H/M/L when scrolled beyond the end of
the buffer
2024-02-23 08:31:41 -07:00
Bennet Bo Fenner
c90065e6ea
chat: add copy text entry to message menu (#8271)
As we don't have selection inside the chat right now (which might be
complicated to implement, e.g. cross element selection and markdown
blocks), I think its viable to support copying the whole text of a
message using the message menu:

![image](https://github.com/zed-industries/zed/assets/53836821/6092dfed-0297-457e-9455-ba1e6190e288)

Release Notes:

- Added option to copy the text of a message within the chat
2024-02-23 08:00:20 -07:00
Piotr Osiewicz
0f584cb353
chore: Extract languages from zed crate (#8270)
- Moves languages module from `zed` into a separate crate. That way we
have less of a long pole at the end of compilation.
- Removes moot dependencies on editor/picker. This is totally harmless
and might help in the future if we decide to decouple picker from
editor.

Before:
```
Number of crates that depend on 'picker' but not on 'editor': 1
Total number of crates that depend on 'picker': 13
Total number of crates that depend on 'editor': 30
```
After:
```
Number of crates that depend on 'picker' but not on 'editor': 5
Total number of crates that depend on 'picker': 12
Total number of crates that depend on 'editor': 26
```
The more crates depend on just picker but not editor, the better in that
case.

Release Notes:

- N/A
2024-02-23 15:56:08 +01:00
Thorsten Ball
7cf0696c89
Pick up more home dir shell env when spawning (#8273)
Release Notes:

- Improved how Zed picks up shell environment when spawned.
2024-02-23 15:20:31 +01:00
Robin Pfäffle
576f8d3ef3
Fix svelte injections / outline (#8194)
This PR fixes the buffer symbol search to show `js` and `ts` buffer
symbols when using svelte components with `ts`.

Does also seem to improve `ts` capabilities (probably because there has
been a conflict of `js` and `ts` before).

Unfortunately when changing the script tag from no lang attribute to
`ts` one needs to update the file (input anyting) to get correct buffer
symbol search.

Before:

![SCR-20240222-mthf-2](https://github.com/zed-industries/zed/assets/67913738/980cf4bf-15d5-478d-a217-ed8f2b1f197d)

After:

![SCR-20240222-mvjr](https://github.com/zed-industries/zed/assets/67913738/41069e75-77ef-40fe-92d1-c19912b34770)

Release Notes:

- Fixed svelte outlines for `TS`.
2024-02-23 15:12:28 +01:00
Thorsten Ball
42ac9880c6
Detect and possibly use user-installed gopls / zls language servers (#8188)
After a lot of back-and-forth, this is a small attempt to implement
solutions (1) and (3) in
https://github.com/zed-industries/zed/issues/7902. The goal is to have a
minimal change that helps users get started with Zed, until we have
extensions ready.

Release Notes:

- Added detection of user-installed `gopls` to Go language server
adapter. If a user has `gopls` in `$PATH` when opening a worktree, it
will be used.
- Added detection of user-installed `zls` to Zig language server
adapter. If a user has `zls` in `$PATH` when opening a worktree, it will
be used.

Example:

I don't have `go` installed globally, but I do have `gopls`:

```
~ $ which go
go not found
~ $ which gopls
/Users/thorstenball/code/go/bin/gopls
```

But I do have `go` in a project's directory:

```
~/tmp/go-testing φ which go
/Users/thorstenball/.local/share/mise/installs/go/1.21.5/go/bin/go
~/tmp/go-testing φ which gopls
/Users/thorstenball/code/go/bin/gopls
```

With current Zed when I run `zed ~/tmp/go-testing`, I'd get the dreaded
error:

![screenshot-2024-02-23-11 14
08@2x](https://github.com/zed-industries/zed/assets/1185253/822ea59b-c63e-4102-a50e-75501cc4e0e3)

But with the changes in this PR, it works:

```
[2024-02-23T11:14:42+01:00 INFO  language::language_registry] starting language server "gopls", path: "/Users/thorstenball/tmp/go-testing", id: 1
[2024-02-23T11:14:42+01:00 INFO  language::language_registry] found user-installed language server for Go. path: "/Users/thorstenball/code/go/bin/gopls", arguments: ["-mode=stdio"]
[2024-02-23T11:14:42+01:00 INFO  lsp] starting language server. binary path: "/Users/thorstenball/code/go/bin/gopls", working directory: "/Users/thorstenball/tmp/go-testing", args: ["-mode=stdio"]
```

---------

Co-authored-by: Antonio <antonio@zed.dev>
2024-02-23 13:39:14 +01:00
postsolar
65318cb6ac
Re-enable PureScript on Linux and Windows (#8252)
Relevant PRs:
- https://github.com/zed-industries/zed/pull/7543
- https://github.com/zed-industries/zed/pull/7827

Release Notes:

- Fixed build issues with PureScript on Windows and Linux
2024-02-23 13:19:36 +02:00
Kirill Bulatov
71557f3eb3
Adjust "recent projects" modal behavior to allow opening projects in both current and new window (#8267)
![image](https://github.com/zed-industries/zed/assets/2690773/7a0927e8-f32a-4502-8a8a-c7f8e5f325bb)

Fixes https://github.com/zed-industries/zed/issues/7419 by changing the
way "recent projects" modal confirm actions work:
* `menu::Confirm` now reuses the current window when opening a recent
project
* `menu::SecondaryConfirm` now opens a recent project in the new window 
* neither confirm tries to open the current project anymore
* modal's placeholder is adjusted to emphasize this behavior

Release Notes:

- Added a way to open recent projects in the new window
2024-02-23 13:17:31 +02:00
Kirill Bulatov
a588f674db
Ensure default prettier installs correctly when certain FS entries are missing (#8261)
Fixes https://github.com/zed-industries/zed/issues/7865

* bind default prettier (re)installation decision to
`prettier_server.js` existence
* ensure the `prettier_server.js` file is created last, after all
default prettier packages installed
* ensure that default prettier directory exists before installing the
packages
* reinstall default prettier if the `prettier_server.js` file is
different from what Zed expects

Release Notes:

- Fixed incorrect default prettier installation process
2024-02-23 12:25:56 +02:00
Conrad Irwin
caa156ab13
Fix a panic in the assistant panel (#8244)
Release Notes:

- Fixed a panic in the assistant panel when the app is shutting down.
2024-02-22 22:42:32 -07:00
Felipe
a82f4857f4
Add settings to control gutter elements (#7665)
The current gutter was a bit too big for my taste, so I added some
settings to change which visual elements are shown, including being able
to hide the gutter completely.

This should help with the following issues: #4963, #4382, #7422

New settings:
```json5
"gutter": {
    "line_numbers": true, // Whether line numbers are shown
    "buttons": true // Whether the code action/folding buttons are shown
}
```

The existing `git.git_gutter` setting is also taken into account when
calculating the width of the gutter.

We could also separate the display of the code action and folding
buttons into separate settings, let me know if that is desirable.

## Screenshots:

- Everything on (`gutter.line_numbers`, `gutter.buttons`,
`git.git_gutter`):
<img width="434" alt="SCR-20240210-trfb"
src="https://github.com/zed-industries/zed/assets/17355488/bcc55311-6e1d-4c22-8c43-4f364637959b">

- Only line numbers and git gutter (`gutter.line_numbers`,
`git.git_gutter`):
<img width="406" alt="SCR-20240210-trhm"
src="https://github.com/zed-industries/zed/assets/17355488/0a0e074d-64d0-437c-851b-55560d5a6c6b">

- Only git gutter (`git.git_gutter`):
<img width="356" alt="SCR-20240210-trkb"
src="https://github.com/zed-industries/zed/assets/17355488/7ebdb38d-93a5-4e38-b008-beabf355510d">

- Only git gutter and buttons (`git.git_gutter`, `gutter.buttons`):
<img width="356" alt="SCR-20240210-txyo"
src="https://github.com/zed-industries/zed/assets/17355488/e2c92c05-cc30-43bc-9399-09ea5e376e1b">


- Nothing:
<img width="350" alt="SCR-20240210-trne"
src="https://github.com/zed-industries/zed/assets/17355488/e0cd301d-c3e0-4b31-ac69-997515928b5a">



## Release Notes:
- Added settings to control the display of gutter visual elements. `"gutter": {"line_numbers": true,    "code_actions": true,    "folds": true}` ([#8041](https://github.com/zed-industries/zed/issues/8041))  ([#7422](https://github.com/zed-industries/zed/issues/7422))
```

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-02-22 20:37:13 -07:00
Marshall Bowers
0de8672044
Add SystemClock (#8239)
This PR adds a `SystemClock` trait for abstracting away the system
clock.

This allows us to swap out the real system clock with a
`FakeSystemClock` in the tests, thus allowing the fake passage of time.

We're using this in `Telemetry` to better mock the clock for testing
purposes.

Release Notes:

- N/A
2024-02-22 22:28:08 -05:00
Joseph T. Lyons
cc8e3c2286
Show more extensions (#8234)
This is a bandaid fix for:
https://github.com/zed-industries/zed/issues/8228.

Release Notes:

- N/A
2024-02-22 19:51:03 -05:00
Kristján Oddsson
347f68887f
Support ESLint flat configs (#8109)
Not available before the new eslint language server version is released, but prepares the ground for it.

## Further reading

- https://eslint.org/docs/latest/use/configure/configuration-files-new
- https://github.com/microsoft/vscode-eslint?tab=readme-ov-file#settings-options

Release Notes:

- Added ESLint flat config support
([#7271](https://github.com/zed-industries/zed/issues/7271))
2024-02-22 22:22:31 +02:00
Small White
a475d8640f
Introduce file_id on Windows (#8130)
Added a function `file_id` to get the file id on windows, which is
similar to inode on unix.

Release Notes:

- N/A
2024-02-22 11:22:12 -08:00
Dzmitry Malyshau
991c9ec441
Integrate profiling into gpui (#8176)
[Profiling](https://crates.io/crates/profiling) crate allows easy
integration with various profiler tools. The best thing is - annotations
compile to nothing unless you request a specific feature.

For example, I used this command to enable Tracy support:
```bash
cargo run --features profiling/profile-with-tracy
```
At the same time I had Tracy tool open and waiting for connection. It
gathered nice stats from the run:

![zed-profiler](https://github.com/zed-industries/zed/assets/107301/5233045d-078c-4ad8-8b00-7ae55cf94ebb)


Release Notes:
- N/A
2024-02-22 10:59:52 -08:00
Conrad Irwin
250df707bf
Tidy up indicators in collab panel (#8214)
Move away from columns of icons towards the "changed" info dot we used
for files.

Secondary actions for chat/notes still show up (if you're lucky) on
hover.

Co-Authored-By: Marshall <marshall@zed.dev>



Release Notes:

- Improved design of collab panel

---------

Co-authored-by: Marshall <marshall@zed.dev>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-02-22 13:30:43 -05:00
Michael Angerman
ba6b319046
Add an app_menu to Storybook which enables quitting with cmd-q (#8166)
I really think storybook is a cool standalone app but there are some
usability issues that are getting in the way of making this a fun tool
to use.

Currently it is not easy to gracefully exit out of storybook.

In fact even trying to Ctrl-c out of storybook seems currently broken to
me...

So the only real way to exit out of storybook is to kill the process
after a Ctrl-z.

This PR attempts to make this much easier by adding a simple app_menu
with a menu item called quit along with the ability to *Cmd-q* out of
storybook as well...

Both the menu item quit and *Cmd-q* gracefully exit storybook.

There are still a bunch of issues with storybook which I plan on
addressing in future PR's but this is a start and something that to me
is the highest priority to make storybook more functional and easy to
use moving forward.

One of my longer term goals of storybook is to have it be a nice stand
alone application similar to
[Loungy](https://github.com/MatthiasGrandl/Loungy) which can be used as
a nice tutorial application for how to develop a real world *gpui* app.

For that reason I added a *assets/keymaps/storybook.json* file as well.
2024-02-22 12:51:40 -05:00
Rom Grk
bd94a0e921
Wayland: implement focus events (#8170)
Implements keyboard focus in/out events.

This also enables vim mode to work on wayland, which is only activated
when an editor gains focus.
2024-02-22 09:51:09 -08:00
apricotbucket28
40bbd0031d
linux: fix reveal_path for files (#8162)
Fixes 'Reveal in Finder' opening files instead of showing them in the
file explorer.
Tested on Fedora KDE 39.

Release Notes:

- N/A
2024-02-22 09:49:36 -08:00
Rom Grk
946f4a312a
Wayland: avoid replacing text with empty string (#8103)
Fix an issue where the `ime_key` is sometimes an empty string, and
pressing a keystroke replaces the selected text.

E.g. select some text, press `Escape`: selected text is deleted.
2024-02-22 09:48:15 -08:00
Marshall Bowers
af06063d31
Add checkbox to only show installed extensions (#8208)
This PR adds a checkbox to the extensions view to allow filtering to
just extensions that are installed:

<img width="1408" alt="Screenshot 2024-02-22 at 12 05 40 PM"
src="https://github.com/zed-industries/zed/assets/1486634/b5e82941-53be-432e-bfe5-fec7fd0959c5">

Release Notes:

- Added a checkbox to the extensions view to only show installed
extensions.
2024-02-22 12:16:02 -05:00
Mahdy M. Karam
5c4f3c0cea
Add option to either use system clipboard or vim clipboard (#7936)
Release Notes:

- vim: Added a setting to control default clipboard behaviour. `{"vim":
{"use_system_clipboard": "never"}}` disables writing to the clipboard.
`"on_yank"` writes to the system clipboard only on yank, and `"always"`
preserves the current behavior. ([#4390
](https://github.com/zed-industries/zed/issues/4390))

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-02-22 10:12:29 -07:00
Conrad Irwin
c6826a61a0
talkers (#8158)
Release Notes:

- Added an "Unmute" action for guests in calls. This lets them use the
mic, but not edit projects.
2024-02-22 10:07:36 -07:00
Piotr Osiewicz
fa2c92d190
Editor: tweak label for "Go to implementation" tabs (#8201)
No release notes as this is a followup to #7890 
Release Notes:

- N/A
2024-02-22 17:06:25 +01:00
Conrad Irwin
20b10fdca9
Add ./script/symbolicate (#8165)
This lets you get a readable backtrace from an .ips file of a crash
report.

Release Notes:

- N/A
2024-02-22 08:50:39 -07:00
Kirill Bulatov
4f40d3c801
Require prerelease eslint version (#8197)
Fixes https://github.com/zed-industries/zed/issues/7650

Release Notes:

- Fixed eslint diagnostics not showing up due to old eslint version used
2024-02-22 16:33:08 +02:00
Leon Huston
b716035d02
Editor: support go to implementation (#7890)
Release Notes:

- Added "Go to implementation" support in editor.
2024-02-22 14:22:04 +01:00
Piotr Osiewicz
94bc216bbd
worktree: Do not scan for .gitignore files beyond project root. (#8189)
This has been fixed and reported before (and got lost in gpui1->gpui2
transition);
https://github.com/zed-industries/zed/issues/5749#issuecomment-1959217319

Release Notes:

- Fixed .gitignore files beyond the first .git directory being respected
by the worktree (zed-industries/zed#5749).
2024-02-22 13:16:19 +01:00
Ngô Quốc Đạt
95d5ea7edc
Add "Extensions" item to user menu (#8183)
<img width="274" alt="Screenshot 2024-02-22 at 18 12 52"
src="https://github.com/zed-industries/zed/assets/56961917/9057d1be-bedb-474a-a663-c53d62366f26">

Release Note:

- Add "Extensions" menu item to the UI
2024-02-22 14:01:20 +02:00
Thorsten Ball
583d85cf66
Do not add empty tasks to inventory (#8180)
I ran into this when trying out which keybindings work and accidentally
added empty tasks. They get then added to the task inventory and
displayed in the picker.

Release Notes:

- Fixed empty tasks being added to the list of tasks when using `task:
spawn`

---------

Co-authored-by: Kirill <kirill@zed.dev>
2024-02-22 12:21:19 +02:00
Xinzhao Xu
36586b77ec
gpui: use a separate image in the image example and remove unnecessary examples (#8181)
Follow-up of https://github.com/zed-industries/zed/pull/8174#issuecomment-1959031659,
Fixes image example and removes window-less "noop" example.

<img width="1975" alt="Screenshot 2024-02-22 at 17 34 15"
src="https://github.com/zed-industries/zed/assets/9134003/060d8484-63b6-415a-9f06-189542422457">

Release Notes:
- N/A
2024-02-22 11:47:24 +02:00
Xinzhao Xu
6f36527bc6
gpui: add example sections in Cargo.toml (#8174)
So that we can run the example simply by `cargo run --example hello_world`

Release Notes:
- N/A
2024-02-22 11:18:34 +02:00
Hans
aa34e306f7
Fix removal of brackets inserted by auto-close when using snippets (#7265)
Release Notes:

- Fixed auto-inserted brackets (or quotes) not being removed when they
were inserted as part of a snippet.
([#4605](https://github.com/zed-industries/issues/4605))

---------

Co-authored-by: Thorsten Ball <mrnugget@gmail.com>
2024-02-22 10:09:10 +01:00
Joseph T. Lyons
e5d971f4c7
Add url preview tooltip to repository link in extensions view (#8179)
Because the `repository` url field is defined via the user's
`extension.json` file, a user could insert a malicious link. I want to
be able to preview repository urls before clicking the button.

Release Notes:

- Add url preview tooltip to repository link in extensions view.
2024-02-22 03:46:01 -05:00
Joseph T. Lyons
38c3a93f0c
Add action to open release notes locally (#8173)
Fixes: https://github.com/zed-industries/zed/issues/5019

zed.dev PR: https://github.com/zed-industries/zed.dev/pull/562

I've been wanting to be able to open release notes in Zed for awhile,
but was blocked on having a rendered Markdown view. Now that that is
mostly there, I think we can add this. I have not removed the `auto
update: view release notes` action, since the Markdown render view
doesn't support displaying media yet. I've opted to just add a new
action: `auto update: view release notes locally`. I'd imagine that in
the future, once the rendered view supports media, we could remove `view
release notes` and `view release notes locally` could replace it.
Clicking the toast that normally is presented on update
(https://github.com/zed-industries/zed/issues/7597) would show the notes
locally.

The action works for stable and preview as expected; for dev and
nightly, it just pulls the latest stable, for testing purposes.

I changed the way the markdown rendered view works by allowing a tab
description to be passed in.

For files that have a name, it will use `Preview <name>`:

<img width="1496" alt="SCR-20240222-byyz"
src="https://github.com/zed-industries/zed/assets/19867440/a0ef34e5-bd6d-4b0c-a684-9b09d350aec4">

For untitled files, it defaults back to `Markdown preview`:

<img width="1496" alt="SCR-20240222-byip"
src="https://github.com/zed-industries/zed/assets/19867440/2ba3f336-6198-4dce-8867-cf0e45f2c646">

Release Notes:

- Added a `zed: view release notes locally` action
([#5019](https://github.com/zed-industries/zed/issues/5019)).


https://github.com/zed-industries/zed/assets/19867440/af324f9c-e7a4-4434-adff-7fe0f8ccc7ff
2024-02-22 02:20:06 -05:00
Tung Hoang
f930969411
Allow removing workspaces from the "recent projects" modal (#7885)
<img width="492" alt="Screenshot 2024-02-19 at 10 59 01 AM"
src="https://github.com/zed-industries/zed/assets/1823955/922117f6-81c1-409d-938a-131bcec0f24c">

<img width="675" alt="Screenshot 2024-02-19 at 10 59 27 AM"
src="https://github.com/zed-industries/zed/assets/1823955/fefac68b-9a99-43bb-ac0c-724e7c622455">

Release Notes:

- Added a way to remove entries from the recent projects modal
([7426](https://github.com/zed-industries/zed/issues/7426)).
2024-02-22 01:30:02 +02:00
Bennet Bo Fenner
49a53e7654
titlebar: show placeholder when no project is selected (#8021)
When no project is selected, the recent project dropdown is displaying
an empty string, making the button basically impossible to click. This
PR adds a placeholder value for that case.

Here is what it looks like now:

![image](https://github.com/zed-industries/zed/assets/53836821/c831a1eb-722e-4189-8f8b-8b3039daf8f8)



Release Notes:

- Added placeholder to titlebar when no project is selected
2024-02-21 14:08:20 -07:00
Dzmitry Malyshau
9fcda5a5ac
blade: quad render fast path (#8110)
Ported from #7231

Release Notes:
- N/A
2024-02-21 10:04:24 -08:00
Joseph T. Lyons
5e43290aa1 v0.125.x dev 2024-02-21 12:22:41 -05:00
Kirill Bulatov
f895d66d1c
Make language server id more explicit in unhandled message logs (#8131)
Before:
```
[2024-02-21T18:55:55+02:00 INFO  language::language_registry] starting language server "eslint", path: "/Users/someonetoignore/Downloads/eslint-configs-demo", id: 2
[2024-02-21T18:55:56+02:00 INFO  lsp] 2 unhandled notification window/logMessage:
{
  "type": 3,
  "message": "ESLint server running in node v18.15.0"
}
[2024-02-21T18:55:56+02:00 INFO  lsp] 2 unhandled notification eslint/confirmESLintExecution:
{
  "scope": "local",
  "uri": "file:///Users/someonetoignore/Downloads/eslint-configs-demo/index.js",
  "libraryPath": "/Users/someonetoignore/Downloads/eslint-configs-demo/node_modules/eslint/lib/api.js"
}
```

After:
```
[2024-02-21T18:57:31+02:00 INFO  language::language_registry] starting language server "eslint", path: "/Users/someonetoignore/Downloads/eslint-configs-demo", id: 2
[2024-02-21T18:57:32+02:00 INFO  lsp] Language server with id 2 sent unhandled notification window/logMessage:
{
  "type": 3,
  "message": "ESLint server running in node v18.15.0"
}
[2024-02-21T18:57:32+02:00 INFO  project::prettier_support] Fetching default prettier and plugins: [("prettier-plugin-tailwindcss", "0.5.11"), ("prettier", "3.2.5")]
[2024-02-21T18:57:32+02:00 INFO  lsp] Language server with id 2 sent unhandled notification eslint/confirmESLintExecution:
{
  "scope": "local",
  "uri": "file:///Users/someonetoignore/Downloads/eslint-configs-demo/index.js",
  "libraryPath": "/Users/someonetoignore/Downloads/eslint-configs-demo/node_modules/eslint/lib/api.js"
}
```

We have to pass a name there too, but the problem here is that the
unhandled message callback is created very early, along with the binary,
but the server name is received from the LSP initialize response, which
is a totally separate piece of code.
I plan to refactor that code next, but so far, improve the logs at least
slightly.

Release Notes:

- N/A
2024-02-21 19:11:23 +02:00
Ivan Buryak
7bf16f263e
Fix a bug when extension loading is failed after it's folder is viewed by MacOS finder (#8111)
Fixes #8096

# Bug description

I was experimenting with adding extensions and almost went crazy trying
to make my demo extension work. It appeared that I was copying files
with Finder that creates hidden `.DS_Store` files which interfered with
Zed's loading logic. It assumes that `languages/` directory contains
only directories and never files and so it crashes when meets
`.DS_Store`. This makes any extension stop working after it has been
viewed via Finder

# Change

Check if path is directory when loading extension languages (so it will
skip .DS_Store files)
2024-02-21 08:46:58 -08:00
Kirill Bulatov
0c939e5dfc
Add task docs and default keybindings (#8123)
Also group task source modules together

Release Notes:

- N/A

---------

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2024-02-21 16:43:56 +02:00
Piotr Osiewicz
b9151b9506
Runnables: remove version field from the format (#8118)
This changes the format of runnables slightly (the top-level object is
now a sequence, not a map).
The 2nd commit pulls in aliases from .zshrc and co.
Release Notes:

- N/A
2024-02-21 14:30:16 +01:00
Kirill Bulatov
2679457b02
Rename runnables into tasks (#8119)
Release Notes:

- N/A
2024-02-21 14:56:43 +02:00
Thorsten Ball
45e2c01773
Copilot: handle "ok" status message when no user is set (#8116)
In #6954 a user has trouble using copilot. We haven't gotten to the
bottom of the problem, but one problem is that apparently sometimes (I'm
going to find out when) copilot sends an `"OK"` status message without a
username. This is from the user's logs:

2024-02-20T15:28:41-03:00 [ERROR] failed to deserialize response from
language server: missing field `user`. Response from language server:
"{\"status\":\"OK\"}"

The official `copilot.vim` plugin handles this as if the user is not
authenticated (!= authorized):


1a284014d2/autoload/copilot.vim (L574-L579)

So that's what I'm doing here too.

Release Notes:

- Fixed wrong handling of Copilot sign-in status in rare cases.
2024-02-21 11:39:43 +01:00
Thorsten Ball
fd9823898f
Tiny change: use consistent casing in log message (#8115)
Release Notes:

- N/A
2024-02-21 10:23:05 +01:00
Thorsten Ball
d5aba2795b
Log when starting language servers (#8075)
This should help us debug more failures because we can now see what
exactly was started.

Release Notes:

- N/A

Co-authored-by: Nathan <nathan@zed.dev>
Co-authored-by: Max <max@zed.dev>
2024-02-21 10:11:41 +01:00
Joseph T. Lyons
92b2e5608b
Fix crash when closing last zed window (#8102)
Fixes: #8100

Release Notes:

- N/A
2024-02-21 00:48:42 -05:00
Joseph T. Lyons
c58d72ea2b
Improve automatic indentation in Gleam code files (#8098)
Release Notes:

- Improved automatic indentation in Gleam code files
([#7295](https://github.com/zed-industries/zed/issues/7295)).
2024-02-20 23:55:42 -05:00
Joseph T. Lyons
58a5a1eb8f
Automatically indent the cursor when adding a newline after a { in Gleam code files (#8097)
Fixes: https://github.com/zed-industries/zed/issues/7295

Release Notes:

- Fixed a bug where adding a newline after a `{` would not automatically
indent the cursor in Gleam code files
([#7295](https://github.com/zed-industries/zed/issues/7295)).
2024-02-20 23:37:15 -05:00
gmorenz
cd640a87a9
Improve key handling on x11, sharing wayland implementation (#8094)
Makes keyboard shortcuts work on x11.

Release Notes:

- N/A
2024-02-20 16:04:52 -08:00
Kirill Bulatov
c97ecc7326
Add initial CI job for Windows target (#8088)
Clippy is disabled for now, due to many warnings in both `gpui` and
other code, see
https://github.com/zed-industries/zed/actions/runs/7980269779/job/21789529800
for more details.

Also, due to `#!/usr/bin/env bash` shebang in the `script/clippy`, it
starts in Windows CI with `shell: C:\Program Files\Git\bin\bash.EXE
-euxo pipefail {0}`

https://github.com/zed-industries/zed/actions/runs/7980269779/job/21789529800#step:4:3
It seems more appropriate to use PowerShell instead.

See `todo!("windows")` for all stubbed places currently.

Release Notes:

- N/A
2024-02-21 00:35:29 +02:00
Piotr Osiewicz
2ec910f772
Runnables: Add oneshot runnables (#8061)
/cc @SomeoneToIgnore 
Fixes #7460 and partially addresses #7108 
Release Notes:

- N/A
2024-02-20 23:13:09 +01:00
N
8a73bc4c7d
Vim: enable sending multiple keystrokes from custom keybinding (#7965)
Release Notes:

- Added `workspace::SendKeystrokes` to enable mapping from one key to a
sequence of others
([#7033](https://github.com/zed-industries/zed/issues/7033)).

Improves #7033. Big thank you to @ConradIrwin who did most of the heavy
lifting on this one.

This PR allows the user to send multiple keystrokes via custom
keybinding. For example, the following keybinding would go down four
lines and then right four characters.

```json
[
  {
    "context": "Editor && VimControl && !VimWaiting && !menu",
    "bindings": {
      "g z": [
        "workspace::SendKeystrokes",
        "j j j j l l l l"
      ],
    }
  }
]
```

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2024-02-20 15:01:45 -07:00
gmorenz
8f5d7db875
First pass at making a linux keymap (#8082)
Undoubtedly not perfect, but this should be something we can work off
of.

Note that matching keybindings with ctrl in them is currently broken on
linux (or at least x11). This keymap might just manage to be less useful
than using the macos one on linux until that is fixed... the proximate
cause of this is that the `key` field of the `Keystroke` struct looks
like `"\u{e}"` instead of `"n"` when `ctrl-n` is pressed.

Release Notes:

- N/A
2024-02-20 13:51:54 -08:00
Gabriel Dinner-David
389d26d974
Linux(Wayland): translate enter and pageup/down from keysym (#8089)
enter and pagedown/pageup weren't working now they do
Release Notes:
- N/A
2024-02-20 13:48:14 -08:00
Conrad Irwin
3d9503a454
Fix cx.windows() to return borrowed windows (#8086)
Fixes #8068

Release Notes:

- Fixed an error message when joining a project twice
([#8068](https://github.com/zed-industries/zed/issues/8068)).
2024-02-20 13:42:11 -07:00
Dzmitry Malyshau
b028231aea
linux/x11: disable Vulkan validation in Debug (#8044)
Turns out this validation requirement is confusing new users.

Release Notes:
- N/A
2024-02-20 11:14:13 -08:00
Andrew Lygin
f7d2cb1818
Project search bar layout improvements (#7963)
The PR matches project search layout with the recent changes in the
buffer project layout.

https://github.com/zed-industries/zed/assets/2101250/91b905ea-aed8-4740-9e60-67f3052885e2


Release Notes:

- Improve project search bar layout, match it with the buffer search bar ([7722](https://github.com/zed-industries/zed/issues/7722))
2024-02-20 21:07:01 +02:00
Robin Pfäffle
78dcd72790
Fix display of links in lists (markdown_preview) (#8073)
![markdown_preview](https://github.com/zed-industries/zed/assets/67913738/d8e4800f-d549-42e7-90b4-001d98aa39d2)

Release Notes:

- Fixed display of long links in lists not fully visible in markdown
preview.
2024-02-20 11:30:40 -07:00
Dzmitry Malyshau
d51a0b60be
linux/x11: send XCB requests asynchronously (#8045)
With `send_and_check_request` we'd be blocking both the main loop and
the caller. `send_request` is only going to be blocking on the main loop
when processing the request.

Release Notes:
- N/A

Based on a flamegraph from `perf`/`hotspot`, we are spending 40% of time
redrawing, another 40% of time downloading stuff (i.e. rust toolchain),
and the rest on text rendering, layout and such. This is with Vulkan
Validation (see https://github.com/zed-industries/zed/pull/8044).

I'm also wondering if it would be better with #7758, but regardless we
should have no problem rendering at 60-120 fps and processing user
input. More follow-ups are expected here.
2024-02-20 10:20:49 -08:00
Darren Schroeder
91b97387b6
bump tree-sitter-nu to latest (#8059)
This PR bumps the tree-sitter-nu commit to the latest supported by the
nushell team. It also includes the latest highlights.scm

Release Notes:

Bumped `nu` tree sitter dependency and highlights.scm
2024-02-20 12:05:09 -05:00
Julia
0a40a21c74 Timeout while waiting for server to shutdown and kill it 2024-02-20 11:47:13 -05:00
Conrad Irwin
b14d576349
Follower simplification (#8026)
Release Notes:

- Improved reliability of following
2024-02-20 09:41:37 -07:00
Philipp Schaffrath
db0eaca2e5
Rename scrollbar_thumb to be consistent with other style properties (#8004)
This small inconsistency was mentioned on the discord. This fixes it.

Release Notes:

- Themes: Renamed `scrollbar_thumb.background` to
`scrollbar.thumb.background` to be consistent with other style
properties.

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-02-20 11:26:09 -05:00
Thorsten Ball
80db468720
go: better logging if go install gopls fails (#8060)
Release Notes:

- Improved logging if installing `gopls` fails
2024-02-20 15:56:52 +01:00
Kirill Bulatov
0d2ad67b27
Add settings to configure terminal scroll limit (#8063)
Fixes https://github.com/zed-industries/zed/issues/7550
Also set maximum allowed to runnables' terminals.


Release Notes:

- Added settings to configure terminal scroll limit
([7550](https://github.com/zed-industries/zed/issues/7550))
2024-02-20 16:14:59 +02:00
Hourann
6c714c13b3
Fix markdown preview heading overflows no wrap (#8052)
![Kapture 2024-02-20 at 18 27
15](https://github.com/zed-industries/zed/assets/8416130/87d4dcea-e2f0-44ba-88a4-06829dbb0e89)

Release Notes:

- Improved markdown preview wrapping ([#8047](https://github.com/zed-industries/zed/issues/8047)).
2024-02-20 15:18:42 +02:00
Kirill Bulatov
c54d6aff6c Properly ignore missing/empty runnables config 2024-02-20 15:02:35 +02:00
Kirill Bulatov
48a6fb9e84
Fix runnables-related hickups (#8058)
* never error on absent/empty runnables file
* always activate terminal tab on runnable (re)schedule

Release Notes:

- N/A
2024-02-20 14:54:19 +02:00
Thorsten Ball
fc101c1fb3
Log when failed to deserialize response from language server (#8046)
This should probably help us debug when language servers don't start up
properly.

Release Notes:

- N/A
2024-02-20 10:16:00 +01:00
bbb651
4616d66e1d
Download right language server binary for OS (#8040)
Release Notes:

- Download right language server binary for OS
2024-02-20 09:53:03 +02:00
Bennet Bo Fenner
3ef8a9910d
chat: auto detect links (#8028)
@ConradIrwin here's our current implementation for auto detecting links
in the chat.
We also fixed an edge case where the close reply to preview button was
cut off (rendered off screen).

Release Notes:

- Added auto detection for links in the chat panel.

---------

Co-authored-by: Remco Smits <62463826+RemcoSmitsDev@users.noreply.github.com>
2024-02-19 21:49:47 -07:00
Ben Hamment
1e44bac418
Add Ruby method visibility in outline view (#7954)
Release Notes:

- Improved ([#7849
](https://github.com/zed-industries/zed/issues/7849)).

<img width="897" alt="image"
src="https://github.com/zed-industries/zed/assets/7274458/a2b0db84-1971-45c0-a5a2-68de651e342b">
2024-02-19 19:26:04 -07:00
Remco Smits
aad7761038
Add an indicator to the channel chat to see all the messages that you missed (#7781)
This pull requests add the following features:
- Show indicator before first unseen message
- Scroll to last unseen message

<img width="241" alt="Screenshot 2024-02-14 at 18 10 35"
src="https://github.com/zed-industries/zed/assets/62463826/ca396daf-7102-4eac-ae50-7d0b5ba9b6d5">


https://github.com/zed-industries/zed/assets/62463826/3a5c4afb-aea7-4e7b-98f6-515c027ef83b

### Questions: 
1. Should we hide the indicator after a couple of seconds? Now the
indicator will hide when you close/reopen the channel chat, because when
the last unseen channel message ID is not smaller than the last message
we will not show it.

Release Notes:
- Added unseen messages indicator for the channel chat.
2024-02-19 19:20:02 -07:00
bbb651
0422d43798
Linux: Add support for MouseButton::Navigate in GPUI (wayland and x11) (#7996)
Release Notes:

- N/A

Based on wgpu implementation (which I wrote).

---------

Co-authored-by: Mikayla Maki <mikayla@zed.dev>
2024-02-19 18:09:53 -08:00
Dzmitry Malyshau
b00b65b330
linux/x11: implement window focus (#8002)
Release Notes:
- N/A
2024-02-19 17:54:54 -08:00
Janrupf
fddb778e5f
Enable server side decorations on wayland (#8037)
This PR enables server side decorations on Wayland if possible. This is
stopgap solution, so that the window can be moved, resized and dragged
on Wayland sessions at all.


![image](https://github.com/zed-industries/zed/assets/25827180/3dc9af53-76c0-4664-8746-ed6a6e5eafe7)

Since Wayland compositors can decide to force either mode (as in,
forcing server or client side decorations), this requires additional
handling in zed. Since zed doesn't provide any of that handling as of
now, as a temporary solution server side decorations are always
requested.
2024-02-19 17:53:31 -08:00
白山風露
77974a4367
Stubbing unix-dependent values on Windows (#8036)
Release Notes:

- N/A
2024-02-19 17:41:35 -08:00
白山風露
0037f0b2fd
Avoid dependencies build errors on Windows (#7827)
This is a compilation of fixes for errors that appeared in dependent
crates in Windows.

- wezterm (zed-industries/wezterm#1)
- tree-sitter-svelte (Himujjal/tree-sitter-svelte#54)
- tree-sitter-uiua (shnarazk/tree-sitter-uiua#25)
- tree-sitter-haskell (I sent a PR, but upstream source is regenerated
and no longer errors.)

Release Notes:

- N/A
2024-02-19 16:44:24 -08:00
Abdullah Alsigar
f4bafd5899
Dart support (#7220)
This is my first contribution, feedback is welcome.

Release Notes:

- Added Dart language support
([#5343](https://github.com/zed-industries/zed/issues/5343)).
2024-02-19 11:10:08 -08:00
Piotr Osiewicz
b3d3a00a14 chore: Add missing LICENSE-GPL files 2024-02-19 18:40:41 +01:00
Thorsten Ball
0a5df7d597
Fix jk not working in Vim bindings (#8023)
Fixes #8006.

Release Notes:

- Fixed two-character bindings in Vim insert mode (e.g. `j k` or `j j`)
not working.
([#8006](https://github.com/zed-industries/zed/issues/8006))

Co-authored-by: Conrad <conrad@zed.dev>
2024-02-19 10:21:07 -07:00
Conrad Irwin
4d1585b917
Don't drop key bindings (#8019)
Fixes: #7748



Release Notes:

- Fixed a bug where keystrokes could be lost after focus changes
([#7748](https://github.com/zed-industries/zed/issues/7748)).

Co-authored-by: Antonio <as-cii@zed.dev>
2024-02-19 10:20:51 -07:00
Kirill Bulatov
99559f3975 Add another runnables_ui/Cargo.toml field to satisfy license checks 2024-02-19 19:14:00 +02:00
Kirill Bulatov
5783497c21 Add missing license field to runnables_ui 2024-02-19 19:04:40 +02:00
Kirill Bulatov
e27c2fc946
Fix seed-db script by passing it the correct admin file path (#8022)
Release Notes:

- N/A
2024-02-19 18:53:17 +02:00
Piotr Osiewicz
f17d0b5729
Add static Runnables (#8009)
Part of #7108

This PR includes just the static runnables part. We went with **not**
having a dedicated panel for runnables.
This is just a 1st PR out of N, as we want to start exploring the
dynamic runnables front. Still, all that work is going to happen once
this gets merged.

Release Notes:

- Added initial, static Runnables support to Zed. Such runnables are defined in
`runnables.json` file (accessible via `zed: open runnables` action) and
they can be spawned with `runnables: spawn` action.

---------

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
Co-authored-by: Pitor <pitor@zed.dev>
Co-authored-by: Beniamin <beniamin@zagan.be>
2024-02-19 18:41:43 +02:00
Antonio Scandurra
ca251babcd
Drop Box<dyn PlatformWindow> when the OS closes the native window (#8016)
Closes #7973 

This fixes a leak in GPUI when the user didn't override
`on_should_close_window`.

Release Notes:

- N/A

---------

Co-authored-by: Thorsten <thorsten@zed.dev>
2024-02-19 15:38:50 +01:00
Bennet Bo Fenner
c33efe8cd0
recent projects: cleanup ui (#7528)
As the ui for the file finder was recently changed in #7364, I think it
makes sense to also update the ui of the recent projects overlay.

Before:

![image](https://github.com/zed-industries/zed/assets/53836821/8a0f5bef-9b37-40f3-a974-9dfd7833cc71)

After:

![image](https://github.com/zed-industries/zed/assets/53836821/7e9f934a-1ac3-4716-b7b6-67a7435f3bde)


Release Notes:

- Improved UI of recent project overlay
2024-02-19 14:37:52 +02:00
Tadeo Kondrak
2b56c43f2d
Wayland: Keyboard input improvements (#7989)
Release Notes:

- N/A

---

Right now the Wayland backend is using `xkb::State::key_get_utf8` as the
`key`, when it should be used as the `ime_key`. It also manages
pressing/releasing modifiers manually when this should be managed by the
display server.

This allows modifier combinations to work in more cases, making it an
alternative to https://github.com/zed-industries/zed/pull/7975, which
interprets what is now only used as the `ime_key` value as a `key`
value.
2024-02-18 21:25:42 -08:00
Roman
bd137b01ad
Wayland fractional scaling (#7961)
This PR adds support for fractional scaling on Wayland.

Release Notes:

- N/A
2024-02-18 21:22:03 -08:00
Dzmitry Malyshau
4e1e26b696
blade: Fix initialization of atlas textures used for path rasterization (#8000)
Generally the BladeAtlas logic has been deferring all the texture
initializations and updates till `begin_frame`. This doesn't work for
path rasterization, since a texture needs to be allocated after
`begin_frame` and used immediately.

Fixed validation error:
> UNASSIGNED-CoreValidation-DrawState-InvalidImageLayout(ERROR / SPEC):
msgNum: 1303270965 - Validation Error: [
UNASSIGNED-CoreValidation-DrawState-InvalidImageLayout ] Object 0:
handle = 0x60ce301b9010, name = main, type =
VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x51820000000007b,
name = atlas, type = VK_OBJECT_TYPE_IMAGE; | MessageID = 0x4dae5635 |
vkQueueSubmit(): pSubmits[0].pCommandBuffers[0] command buffer
VkCommandBuffer 0x60ce301b9010[main] expects VkImage
0x51820000000007b[atlas] (subresource: aspectMask 0x1 array layer 0, mip
level 0) to be in layout VK_IMAGE_LAYOUT_GENERAL--instead, current
layout is VK_IMAGE_LAYOUT_UNDEFINED.
    Objects: 2
        [0] 0x60ce301b9010, type: 6, name: main
        [1] 0x51820000000007b, type: 10, name: atlas

Release Notes:
- N/A
2024-02-18 21:18:59 -08:00
d1y
12b12ba17a
Add syntax highlighting and LSP for Dockerfiles(#6905) (#7977)
Release Notes:

- Added Dockerfile syntax highlighting and LSP support

---------

Co-authored-by: Bryce Palmer <bpalmer@redhat.com>
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2024-02-18 20:44:54 +02:00
d1y
8acd4d122e
Fix git_commit grammar name typo (#7982)
Release Notes:

- Fixed git_commit highlights not working
2024-02-18 20:40:56 +02:00
Thorsten Ball
251218954d
Add editor::OpenUrl action and bind to gx in Vim mode (#7972)
This adds one feature I've been missing a lot in Vim mode: `gx` to open
the URL under the cursor.

Technically, in Vim, `gx` opens more "paths", not just URLs, but I think
this is a good start.

Release Notes:

- Added `gx` to Vim mode to open the URL under the cursor.

Demo:


https://github.com/zed-industries/zed/assets/1185253/6a19490d-b61d-40b7-93e8-4819599f6977
2024-02-18 18:52:50 +01:00
Marshall Bowers
b91d6da6b6
Remove Beancount as a built-in language (#7934)
This PR removes Beancount as a built-in language, as it is now available
as an [extension](https://github.com/zed-extensions/beancount).

Release Notes:

- Removed built-in support for Beancount, as it is now provided by an
[extension](https://github.com/zed-extensions/beancount).
2024-02-18 09:58:12 -05:00
Aleksei Trifonov
a041e07c99
Hide Inline Assist button if assistant.button is disabled (#7932)
This PR adds check for `assistant.button` setting in quick bar, to hide
it when the setting is set to false. It seems that the setting can be a
separate one, I would be happy to add it if needed.

Release Notes:

- Improved `assistant.button` setting so that `Inline Assist` button in
editor quick bar is also hidden
([#4500](https://github.com/zed-industries/zed/issues/4500)).
2024-02-18 08:14:08 +02:00
Andrew Lygin
6d9b8cc595
Clear search results on invalid query input (#7958)
Fixes a bug in the buffer search bar: Clears results of a previous
successfull search when the user enters invalid search request.

Steps to reproduce the bug:
1. Switch to Regex search mode.
2. Enter a valid search query that produces several matches.
3. Add a symbol to the search query that makes it an invalid regexp.
4. Switch to the editor and walk through the code back and forth.

Expected result: All the match highlightings after step 2 are cleared,
search bar indicates absence of the last search matches.

Actual: The results from the last valid search are highlighted, search
bar indicates presence of matches.

Potentially, the same effect may occur when searching in the simple text
mode, or when clearing the search query in some circumstances, so I made
the fix for all those cases, though I wasn't able to reproduce them
manually.

The bug:


https://github.com/zed-industries/zed/assets/2101250/1c50b98c-ae8e-4a9c-8ff5-1e5c63027ec3

After the fix:


https://github.com/zed-industries/zed/assets/2101250/e3eedf8c-2e3e-41ee-81cc-c2c9d919fba3

Release Notes:
- Clear search results on invalid query input
2024-02-18 08:01:06 +02:00
Conrad Irwin
4c781b6455
vim netrw (#7962)
- Tidy up vim netrw bindings (c.f.
https://github.com/zed-industries/zed/issues/4270,
https://github.com/zed-industries/zed/pull/7757)
- Add vim commands for panels

Release Notes:

- vim: add commands to toggle panels `:E[xplore]`, `:C[ollab]`,
`:Ch[at]`, `:N[otification]`, `:A[I]`, `:te[rm]` (or `:T[erm]`).
2024-02-17 13:36:08 -07:00
vultix
8aa5319210
Add documentation to many core editor types (#7919)
Hopefully this makes it a bit easier for new contributors to dive into
the codebase :)

Release Notes:

- Improved documentation for many core editor types

---------

Co-authored-by: Nathan Sobo <nathan@zed.dev>
2024-02-17 09:03:05 -07:00
evrsen
98ffdca32e
Add locale-based time formatting in the chat panel (#7945)
This commit addresses the issue of time formats displayed in the chat
panel. Previously, the time was always displayed in a 12-hour format,
regardless of the user's locale. The `format_timestamp` function has
been updated to check the system locale and format the time accordingly.


Release Notes:
- Fixed time formatting in the chat panel to be locale based.
2024-02-17 08:44:28 -07:00
claytonrcarter
cd4d2f7900
Add Prettier support for Vue, Markdown and PHP (#7904)
Current prettier support w/i Zed leaves out a few languages that are
officially supported by prettier. In particular, Vue and Markdown are
supported by the core prettier project, and PHP is supported via an
official plugin. I didn't see any open issues for this, but I have been
wondering for months why `"formatter": "prettier"` wasn't working on my
PHP files. Now that Zed is open source, I was able to find out why, and
fix it. 😄

I have been using this with PHP files daily for a week+ now, and I have
also used it successfully with Vue and Markdown files, though not as
extensively. I looked around and did not see any tests for specific
prettier language integrations, but if I missed them please let me know
and I'll add some tests.

**Notes**
- I did not add support for Ruby (which has an official prettier plugin)
because it seems to require some external dependencies (notably, Rudy
and some Gems). When those are present on the system and `$PATH`,
prettier will will work just fine on Ruby files if the plugin is set up
similar to how the PHP plugin is set up (I tried it), and I can add that
in here, if desired. The PHP plugin is pure JS (as I recall) and doesn't
have this issue.
- I did *not* add support for languages that have "community" plugins,
though I do note that Zed already ships with prettier support for svelte
enabled, which – if I understand correctly – is powered by a community
plugin. If desired, I could look at adding support/configuration to
enable prettier support for things like elm, erb, glsl, bash, toml.
Bash, in particular, *I* would find useful. 😄

Release Notes:

- Added prettier support for Vue, Markdown and PHP
2024-02-17 11:35:31 +02:00
Robin Pfäffle
43a845cbbf
Add default settings to display Svelte inlay hints (#7943)
Fixes: #7913.

Release Notes:

- Added default settings for Svelte language server to display inlay
hints ([#7913](https://github.com/zed-industries/zed/issues/7913)).
2024-02-17 11:33:05 +02:00
Marshall Bowers
3cbc18895a
Upgrade toml to v0.8 (#7931)
This PR upgrades our `toml` dependency to v0.8.

I noticed that our current version of `toml` wasn't able to parse
certain kinds of documents involving enums, whereas the newer version
can.

Release Notes:

- N/A
2024-02-16 17:43:40 -05:00
Roman
f82b2741cd
Wayland input handling (#7857)
Adds initial keyboard and mouse input for Wayland (thanks to @gabydd and
@kvark for reference).


Release Notes:

- N/A

---------

Co-authored-by: Mikayla Maki <mikayla@zed.dev>
2024-02-16 13:49:34 -08:00
Dzmitry Malyshau
9ad1862f2f
Enable Blade on MacOS via "macos-blade" feature (#7669)
Depends on https://github.com/zed-industries/font-kit/pull/2 and
https://github.com/kvark/blade/pull/77

This change enables Blade to be also used on MacOS. It will also make it
easier to use it on Windows.

What works: most of the things. Zed loads as fast and appears equally
responsive to the current renderer.
<img width="306" alt="Screenshot 2024-02-11 at 12 09 15 AM"
src="https://github.com/zed-industries/zed/assets/107301/66d82f45-5ea2-4e2b-86c6-5b3ed333c827">

Things missing:
- [x] video streaming. ~~Requires a bit of plumbing on both Blade and
Zed sides, but all fairly straightforward.~~
  -  verified with a local setup
- [x] resize. ~~Not sure where exactly to hook up the reaction on the
window size change. Once we know where, the fix is one line.~~
- [ ] fine-tune CA Layer
- this isn't a blocker for merging the PR, but it would be a blocker if
we wanted to switch to the new path by default
- [ ] rebase on latest, get the dependency merged (need review/merge of
https://github.com/zed-industries/font-kit/pull/2!)

Update: I implemented resize support as well as "surface" rendering on
the Blade path (which will be useful on Linux/Windows later on). I
haven't tested the latter though - not sure how to get something
streaming. Would appreciate some help! I don't think this should be a
blocker to this PR, anyway.

The only little piece that's missing for the Blade on MacOS path to be
full-featured is fine-tuning the CALayer configuration. Zed does a lot
of careful logic in configuring the layer, such as switching the
"present with transaction" on/off intermittently, which Blade path
doesn't have yet.

Release Notes:
- N/A

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
2024-02-16 13:39:40 -08:00
Mikayla Maki
1c361ac579
Remove comment (#7922)
Per https://github.com/zed-industries/zed/pull/7814, this is more
trouble than it's worth. As these functions are never exposed to the
user of GPUI, we can just manually audit and enforce the relevant rules.

Release Notes:

- N/A
2024-02-16 10:39:50 -08:00
Rom Grk
bea36918f4
Linux: file dialogs (#7852)
This PR implements linux file dialogs and open/reveal actions.

| Open folder | Reveal path |
| --- | --- |
| ![Screenshot from 2024-02-15
16-50-49](https://github.com/zed-industries/zed/assets/1423607/b4260574-d841-4ded-821d-521f507916d1)
| ![Screenshot from 2024-02-15
16-51-36](https://github.com/zed-industries/zed/assets/1423607/1f32f451-7def-423a-9d69-de2876285b60)
|

---------

Co-authored-by: Mikayla Maki <mikayla@zed.dev>
2024-02-16 10:34:54 -08:00
Conrad Irwin
43e8fdbe82
Fix a missing follower update on re-activate (#7918)
This could cause following to get into a bad state temporarily

Release Notes:

- Fixed a bug around following if the follow started while the workspace
was inactive.
2024-02-16 11:33:49 -07:00