Commit Graph

18000 Commits

Author SHA1 Message Date
Kirill Bulatov
7c6b34cb73
Close modals and menus before dispathing actions (#7830)
Fixes https://github.com/zed-industries/zed/issues/7799 by forcing the
modal to close before dispatching the action.
While not needed specifically for this case, changed the context menus
to do the same, to be uniform — context menu actions seem to work
properly after this change too.

Release Notes:

- Fixed markdown preview action not working
([7799](https://github.com/zed-industries/zed/issues/7799))
2024-02-15 15:57:32 +02:00
Thorsten Ball
3921259b6c
Extend Ruby word characters to include valid identifier chars (#7824)
In Ruby `_$=@!:?` can all be part of an identifier. If we don't have
them in this list, autocomplete doesn't work as expected.

See: https://gist.github.com/misfo/1072693

This fixes one part of #7819 but not the whole ticket.

Release Notes:

- Fixed completions in Ruby not working for identifiers that start or
end with special characters (e.g.: `@`)
2024-02-15 14:25:18 +01:00
Manohar_nalluri
e93dca5ec3
Incorrect file icons for .mjs, .mts, .cjs, .cts #7804 (#7815)
Release Notes:

- Added file extensions ([7804](https://github.com/zed-industries/zed/issues/7804))
2024-02-15 15:13:46 +02:00
Antonio Scandurra
c6626627c2
Remove existing gzip files before compressing dSYMs (#7818)
This should fix the build.

Release Notes:

- N/A
2024-02-15 11:32:08 +01:00
Antonio Scandurra
db86f4006e
Staple notarization ticket to .dmg and .app bundle (#7775)
This should eliminate a pretty significant (multiple seconds) slowdown
that new users (or users after restarting their OS) have been
experiencing.

Previously, we would just notarize the application, which meant that
every user of the application had to perform an integrity check against
Apple's servers to ensure the app wasn't malicious.

With this commit, we are now using `xcrun stapler staple`, which
attaches the notarization ticket to both the app bundle as well as the
DMG. This should prevent users from needing to reach out to Apple's
notarization service in order to verify the app's integrity.

You can confirm the quarantine status of the application by running `ls
-l@` in `Terminal.app`:

    ls -l@ /Applications/Zed.app/Contents/MacOS/zed

Release Notes:

- Improved startup time when opening Zed for the first time or after
restarting the operating system.

Co-authored-by: Thorsten <thorsten@zed.dev>
Co-authored-by: bennetbo <bennetbo@gmx.de>
Co-authored-by: Martin Palma <m@palma.bz>
Co-authored-by: evrsen <146845123+evrsen@users.noreply.github.com>
2024-02-15 06:47:12 +01:00
Roman
41372a96ed
Linux: Fix x11 crash (#7805)
Release Notes:

- N/A
2024-02-14 16:03:03 -08:00
Roman
f62baeda64
gpui: Add Wayland support (#7664)
This PR adds Wayland support to gpui using
[wayland-rs](https://github.com/Smithay/wayland-rs). It is based on
[#7598](https://github.com/zed-industries/zed/pull/7598).

It detects Wayland support at runtime by checking the existence of the
`WAYLAND_DISPLAY` environment variable. If it does not exist or is
empty, the X11 backend will be used. To use the X11 backend in a Wayland
session (for development purposes), you just need to unset
WAYLAND_DISPLAY (`WAYLAND_DISPLAY= cargo run ...`).

At the moment it only creates the window and renders the initial content
provided by `BladeRenderer`, so it can run "Hello world" example.


![image](https://github.com/zed-industries/zed/assets/40907255/1655bc64-4d36-4178-9851-bfe42f03f716)

Todo:
- [x] Add basic Wayland support.
- [x] Add window resizing.
- [x] Add window closing.
- [x] Add window updating.
- [ ] Implement input handling, fractional scaling, and support other
Wayland protocols.
- [ ] Implement all unimplemented todo!(linux).
- [ ] Add window decorations or use custom decorations (like on MacOS).
- [ ] Address other missing functionality.

Release Notes:
- N/A

---------

Co-authored-by: gabydd <gabydinnerdavid@gmail.com>
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
2024-02-14 14:50:11 -08:00
gmorenz
6e6ae0ef21
Ignore 'DROP COLUMN enviroment' in typo checker (#7803)
In dropping a misspelled "enviroment" column in #7742, a new "typo" was
introduced breaking CI. This fixes that.

Release Notes:

- N/A
2024-02-14 15:34:58 -07:00
gmorenz
a3300aed31
Don't reinstall dependencies on arch linux (#7801)
Very minor quality of life update, passing the --needed flag to pacman
to skip reinstalling up to date dependencies.

Release Notes:

- N/A
2024-02-14 14:28:29 -08:00
Conrad Irwin
cbbc8cad84
Try and make collab deploys faster (#7746)
Use github machines and build on host instead of in container

Release Notes:

- N/A
2024-02-14 15:11:57 -07:00
Conrad Irwin
8e52cf1495
Add netrw bindings for vim (#7757)
This is now possible after #7647

Release Notes:

- Added vim bindings for project panel
([#4270](https://github.com/zed-industries/zed/issues/4270)).
2024-02-14 14:38:07 -07:00
Conrad Irwin
65a1938e52
panics (#7793)
Release Notes:

- Fix a panic in rename
([#7509](https://github.com/zed-industries/zed/issues/7509)).

---------

Co-authored-by: Max <max@zed.dev>
2024-02-14 14:36:40 -07:00
Conrad Irwin
855acb948c
drop columns (#7742)
Blocked on: #7741

Release Notes:

- N/A
2024-02-14 14:30:48 -07:00
Leon
54f82eb166
Add double quote wrap in activate_python_virtual_environment (#7787)
Added double quote wrap in activate_python_virtual_environment to handle
spaces in path.
Would fail to find venv activate script when spaces exist.


Release Notes:

- Fixed venv_detection activation not finding directory if space is in
the path

![image](https://github.com/zed-industries/zed/assets/52263845/9bf95b92-c6d4-4e2c-9158-d91a41c10216)


- With changes

![image](https://github.com/zed-industries/zed/assets/52263845/93602ae7-d991-494b-89c3-5afcce556888)
2024-02-14 12:42:06 -08:00
Joseph T. Lyons
ac59b9b02f
Add a line instructing users to include media screenshots (#7790)
Making media up for release notes / tweets is becoming very time
consuming. I spoke to Max and suggested we ask users to submit media for
their features, to reduce what we need to produce for tweets and such. I
dont know if this is the best way to signal it; I don't like adding more
to the PR template, but I'm not sure of a better way at the moment.


Release Notes:

- N/a
2024-02-14 15:36:56 -05:00
Dzmitry Malyshau
8f7a26f397
X11: Continuous Presentation (#7762)
Alternative to #7758, which doesn't involve adding a new trait method
`request_draw`.
Somehow, my whole screen goes blinking black with this when moving the
window, so not ready for landing.

Release Notes:
- N/A

---------

Co-authored-by: Mikayla Maki <mikayla@zed.dev>
2024-02-14 12:24:12 -08:00
Conrad Irwin
181f556269
Fewer nightlys (#7784)
Remove an extraneous /nightly/ from our dSYM paths

Release Notes:

- N/A
2024-02-14 11:40:02 -07:00
Adrian Garcia Badaracco
a02bdd0a9f
Fix link in python.md (#7735) 2024-02-14 10:30:30 -08:00
Joseph T. Lyons
6876ea44ac Remove 0-patch requirement on main in bump-zed-minor-versions 2024-02-14 13:13:44 -05:00
Joseph T. Lyons
16849f48e6 v0.124.x dev 2024-02-14 13:10:07 -05:00
Conrad Irwin
7a6d01e113
debug symbol upload (#7783)
This will let it become slowly eaasier to debug crashes

Release Notes:

- N/A
2024-02-14 10:55:37 -07:00
Marshall Bowers
b14fbd4ddc
Fix extension list scrolling and add loading and empty states (#7782)
This PR fixes the scrolling of the extension list, as well as adds
various empty and loading states.

Release Notes:

- N/A
2024-02-14 12:47:58 -05:00
Thorsten Ball
b47aff4c14
go: enable completions with placeholders by default (#7780)
This fixes #7523 by enabling completions with placeholders by default.

This setting controls whether gopls sends back snippets with
placeholders. According to the documentation
(https://github.com/golang/tools/blob/master/gopls/doc/settings.md#useplaceholders-bool)
this only controls whether "placeholders for function parameters or
struct fields" are sent in completion responses.

In practice, though, this seems to also control whether any snippets
with *any* placeholders are being sent back.

Example: for the given Go code

    err := myFunction()
    i^

With the cursor being at `^`, this setting controls whether `gopls`
sends back statement snippets such as `if err != nil { return ... }`
with the `...` being dynamically matched to the return value of the
function.

So I think this setting controls far more than just function params and
struct fields. And since we *do* support placeholders in snippets, I
think this provides a better default experience.

Release Notes:

- Improved default Go experience by enabling snippets-with-placeholders
when initializing `gopls`.
([#7523](https://github.com/zed-industries/zed/issues/7523)).
2024-02-14 18:29:42 +01:00
Marshall Bowers
7ac055627e
Reorganize extensions_ui.rs (#7779)
This PR reorganizes `extensions_ui.rs` by moving the `Render` impl down
below the primary `ExtensionsPage` impl.

Release Notes:

- N/A
2024-02-14 11:44:51 -05:00
Marshall Bowers
db0455beb0
Give explicit heights to items in the extension list (#7777)
This PR gives the items in the extension list an explicit height so that
they work properly within the uniform list when descriptions are
missing.

<img width="1235" alt="Screenshot 2024-02-14 at 10 19 14 AM"
src="https://github.com/zed-industries/zed/assets/1486634/01222902-6b05-4e9a-bb5a-bada14b1fd45">

I think we may want to consider using a `list` here instead of a
`uniform_list` to allow them to have variable heights.

Fixes #7756.

Release Notes:

- N/A
2024-02-14 10:43:11 -05:00
Thorsten Ball
017b2db630
Fix case-only renaming of files (#7768)
This fixes #5211 and #7732 by fixing the case-only file renaming.

The fix here works by checking hooking into function that produces the
data to populate the project panel.

It checks whether we're on a case-insensitive file system (default on
macOS, but you can have case-sensitive FS on macOS too) and if so, it
ignores the metadata for files for which the absolute path (returned by
the FS scanner) and canonicalized path do NOT match.

That's the case for (a) symlinks and (b) case-only renames of files.

It only does this check for case-only renames.

Release Notes:

- Fixed case-only renaming of files producing duplicate entries in
project panel.
([#5211](https://github.com/zed-industries/zed/issues/5211)).

Co-authored-by: Antonio <antonio@zed.dev>
2024-02-14 16:00:31 +01:00
Piotr Osiewicz
75eac4783b
gpui: patch pathfinder_simd to fix nightly build, bump ahash for the … (#7770)
…same reason

Fixes #7644 

Release Notes:

- N/A
2024-02-14 12:55:31 +01:00
Conrad Irwin
7956a9a547
Don't wait to dispatch commands (#7755)
I added this when porting vim mode to gpui2 to work around life-cycle
problems.
Since #7647, this is no longer needed for vim mode, and causes other
problems (c.f. #7748)

Release Notes:

- Improved command to drop fewer keystrokes
2024-02-13 21:45:46 -07:00
Max Brunsfeld
c357e37dde
Reload extensions more robustly when manually modifying installed extensions directory (#7749)
Release Notes:

- N/A

---------

Co-authored-by: Marshall <marshall@zed.dev>
2024-02-13 16:15:19 -08:00
Marshall Bowers
c3176392c6
Remove themes from the registry when the extension is uninstalled (#7745)
This PR makes it so uninstalling an extension will remove any themes
provided by that extension from the theme registry.

Release Notes:

- N/A
2024-02-13 16:41:34 -05:00
Conrad Irwin
e9b95fde68
Force upgrade people on nightly (#7744)
Release Notes:

- N/A
2024-02-13 13:34:49 -07:00
Max Brunsfeld
e73e93f333
Unload languages when uninstalling their extension (#7743)
Release Notes:

- N/A

Co-authored-by: Marshall <marshall@zed.dev>
2024-02-13 15:25:54 -05:00
Conrad Irwin
a2144faf9c
Remove environment guards (#7741)
Release Notes:

- N/A
2024-02-13 13:20:14 -07:00
Conrad Irwin
d744aa896f v0.123.1 2024-02-13 13:13:07 -07:00
Conrad Irwin
2294d99046
revert single channel click (#7738)
- Revert "collab tweaks (#7706)"
- Revert "2112 (#7640)"
- Revert "single click channel (#7596)"
- Reserve protobufs
- Don't revert migrations

Release Notes:

- N/A

**or**

- N/A
2024-02-13 12:53:49 -07:00
Yohann
ecd9b93cb1
Add C-w and C-u keymaps in vim mode (Fix #7691) (#7736)
Release Notes:
- Added C-w and C-u keymaps in vim mode
([#7691](https://github.com/zed-industries/zed/issues/7691))
2024-02-13 12:35:01 -07:00
Carlos Lopez
fecb5a82f1
Add an extensions installation view (#7689)
This PR adds a view for installing extensions within Zed.

My subtasks:

- [X] Page Extensions and assign in App Menu
- [X] List extensions 
- [X] Button to Install/Uninstall
- [x] Search Input to search in extensions registry API
- [x] Get Extensions from API
- [x] Action install to download extension and copy in /extensions
folder
- [x] Action uninstall to remove from /extensions folder
- [x] Filtering
- [x] Better UI Design

Open to collab!

Release Notes:

- Added an extension installation view. Open it using the `zed:
extensions` action in the command palette
([#7096](https://github.com/zed-industries/zed/issues/7096)).

---------

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Marshall <marshall@zed.dev>
Co-authored-by: Carlos <foxkdev@gmail.com>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Co-authored-by: Max <max@zed.dev>
2024-02-13 14:09:02 -05:00
Thorsten Ball
33f713a8ab
Optimize construction and insertion of large SumTrees (#7731)
This does two things:

1. It optimizes the constructions of `SumTree`s to not insert nodes
one-by-one, but instead inserts them level-by-level. That makes it more
efficient to construct large `SumTree`s.
2. It adds a `from_par_iter` constructor that parallelizes the
construction of `SumTree`s.

In combination, **loading a 500MB plain text file went from from
~18seconds down to ~2seconds**.

Disclaimer: I didn't write any of this code, lol! It's all @as-cii and
@nathansobo.

Release Notes:

- Improved performance when opening very large files.

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Julia <julia@zed.dev>
2024-02-13 16:24:40 +01:00
Thorsten Ball
798c9a7d8b
Improve sorting of completion results (#7727)
This is an attempt to fix #5013 by doing two things:

1. Rank "obvious" matches in completions higher (see the code comment)
2. When tied: rank keywords higher than variables

Release Notes:

- Improved sorting of completion results to prefer literal matches.
([#5013](https://github.com/zed-industries/zed/issues/5013)).

### Before

![screenshot-2024-02-13-13 08
13@2x](https://github.com/zed-industries/zed/assets/1185253/77decb0b-5b47-45de-ab69-f7b333072b45)
![screenshot-2024-02-13-13 10
42@2x](https://github.com/zed-industries/zed/assets/1185253/ae33d0fe-06f5-4fc1-84f8-ddf6dbe80ba5)


### After

![screenshot-2024-02-13-13 06
22@2x](https://github.com/zed-industries/zed/assets/1185253/3c526bab-6392-4eeb-a2f2-dd73ccf228e8)
![screenshot-2024-02-13-13 06
50@2x](https://github.com/zed-industries/zed/assets/1185253/b5b9d513-766d-4a53-94de-b46271f5978c)

Co-authored-by: Antonio <antonio@zed.dev>
Co-authored-by: bennetbo <bennetbo@gmx.de>
2024-02-13 14:08:03 +01:00
Andrew Lygin
98fff014da
Fix minor buffer search bar design issues (#7715)
This PR fixes the buffer search bar design issues mentioned in #7703.

It doesn't affect the project search bar.

Changes:

<img width="943" alt="zed-search-bar-design-issues"
src="https://github.com/zed-industries/zed/assets/2101250/af3bd0da-36cb-46ee-9af6-6b69911863d0">

Release Notes:

- N/A
2024-02-13 09:45:24 +01:00
Conrad Irwin
ea51536e0f
Disable vim in the feedback modal (#7716)
Fixes #7000 by disabling vim in this context

Release Notes:

- Fixed feedback modal in vim mode
([#7000](https://github.com/zed-industries/zed/issues/7000)).

**or**

- N/A
2024-02-12 22:28:36 -07:00
Conrad Irwin
a1899bac4e
vim: Fix renaming (#7714)
This was broken by #7647

Release Notes:

- N/A
2024-02-12 22:28:26 -07:00
Derrick Laird
04fc0dde1a
languages: go.mod/go.work fix highlighting no longer working (#7705)
At some point go.mod and go.work syntax highlighting quit working. Looks
like the grammars weren't matching for some reason and I'm not sure how
they were working originally.

Not sure if we could write a test to make sure the tree-sitter queries
are being loaded for the grammars or not but seems like something that
could be useful to avoid something like this in the future.
2024-02-12 21:01:08 -07:00
Conrad Irwin
b800fe96d2
Fix dealloc of MacWindow (#7708)
We see some panics in the Drop handler for MacWindow

Looking into this, I noticed that our drop implementation was not
correctly
cleaning up the window state.

Release Notes:

- N/A
2024-02-12 20:01:09 -07:00
Conrad Irwin
21d2b5fe50
collab tweaks (#7706)
- Don't leave call when clicking on channel
- Don't prompt to leave a call you're not in

Release Notes:

- N/A
2024-02-12 16:08:35 -07:00
Conrad Irwin
d13a731cd6
Crash sooner on invalid background highlights (#7702)
Release Notes:

- N/A
2024-02-12 14:44:10 -07:00
Max Brunsfeld
ede9600ab4
Improve panic message for invalid anchors (#7700)
Release Notes:

- N/A

Co-authored-by: Marshall <marshall@zed.dev>
2024-02-12 12:58:30 -08:00
Greg Morenz
48a4cbad37 Don't move traffic lights while fullscreen
Fixes #4712, or at least works around it. As discussed in the issue,
setting the buttons frames while fullscreen can cause them to render
in the wrong location. This fixes that by simply not moving them when
fullscreen.
2024-02-12 14:17:10 -05:00
Roman
266988adea
gpui: Decouple X11 logic from LinuxPlatform (#7598)
Release Notes:

- Separated Linux platform and X11-specific code, so that we can add
Wayland support now.

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
2024-02-12 10:44:34 -08:00
Alvaro Gaona
2e7db57e16
Add Astro Support (#6896)
Attempt to add `@astrojs/language-server` and
[virchau13/tree-sitter-astro](https://github.com/virchau13/tree-sitter-astro).

---------

Co-authored-by: Nate Butler <iamnbutler@gmail.com>
2024-02-12 10:10:40 -08:00