Commit Graph

13558 Commits

Author SHA1 Message Date
Marshall Bowers
3eb0a2c3c7
theme_importer: Map more colors (#6913)
This PR extends the `theme_importer` to map more colors from VS Code
themes.

Release Notes:

- N/A
2024-01-27 23:38:07 -05:00
Marshall Bowers
ff76b2ec4d
Replace IIFE with maybe! (#6909)
This PR replaces a usage of an IIFE with `maybe!`.

Release Notes:

- N/A
2024-01-27 22:34:37 -05:00
Marshall Bowers
bbdf401a78
Use async_maybe! instead of inline IIFEs (#6906)
This PR replaces instances where we were using an async IIFE with the
`async_maybe!` macro.

Release Notes:

- N/A
2024-01-27 20:49:56 -05:00
Marshall Bowers
5b9cc26194
Gracefully handle errors when loading themes (#6904)
This PR improves the theme loading to gracefully handle when a theme
couldn't be loaded.

Trying to debug a panic that happens on startup in Nightly.

Release Notes:

- N/A
2024-01-27 19:37:01 -05:00
Marshall Bowers
dfad36f668
Upgrade tree-sitter-php to v0.21.1 (#6902)
This PR upgrades `tree-sitter-php` to v0.21.1.

Here is the diff between our current version and this version:
d43130fd15...29a49d3a53

The primary impetus for this change is to get this change that adds the
`license` field to the `Cargo.toml`:
https://github.com/tree-sitter/tree-sitter-php/pull/193

This will silence the warning that is shown when running
`script/generate-licenses`.

Release Notes:

- Upgraded `tree-sitter-php` to v0.21.1.
2024-01-27 17:43:39 -05:00
Marshall Bowers
9b453d2cbc
Remove old themes using UserTheme constructs (#6897)
This PR removes the themes defined using the `UserTheme` types, as we're
now loading the themes via JSON.

The `theme_importer` has also been reworked to read in a VS Code theme
and output a new JSON theme.

Release Notes:

- N/A
2024-01-27 16:55:37 -05:00
Marshall Bowers
5f1dcb76fe
Load JSON themes (#6893)
This PR changes the theme loading to use the JSON themes bundled with
the binary rather then the Rust theme definitions.

### Performance

I profiled this using `cargo run --release` to see what the speed
differences would be now that we're deserializing JSON:

**Before:** `ThemeRegistry::load_user_themes` took 16.656666ms
**After:** `ThemeRegistry::load_user_themes` took 18.784875ms

It's slightly slower, but not by much. There is probably some work we
could do here to bring down the theme loading time in general.

Release Notes:

- N/A
2024-01-27 16:03:04 -05:00
Marshall Bowers
a2efc8da7a
Add player colors to serialized themes (#6887)
This PR adds player colors to serialized themes.

Release Notes:

- N/A
2024-01-27 13:50:33 -05:00
Marshall Bowers
0fe0683ef4
Add serialized versions of themes (#6885)
This PR adds serialized versions of each of the themes that currently
ship with Zed.

In a future PR we'll be looking to make these the canonical
representations of the built-in themes.

Note that we're intentionally repurposing the `theme_importer` to do
this, so that crate is a bit rough-and-ready at the moment.

Release Notes:

- N/A
2024-01-27 13:35:43 -05:00
Stuart Hinson
bd39258fc7
Address a couple comments re Ruby file associations (#6863)
Release Notes:

- Fixed: Address a [couple comments re Ruby file
associations](https://github.com/zed-industries/zed/pull/6812#discussion_r1468437144)
2024-01-27 16:09:15 +02:00
William Desportes
ac3e0afb3d
fix: move anyhow dependency to dependencies (#6866)
Was moved by mistake in: ebbe52e6b0

This was throwing errors everywhere on Linux because anyhow is needed by
the code and is not macOS dependent.


Release Notes:

- N/A
2024-01-27 16:08:06 +02:00
Piotr Osiewicz
0a0a866dd5
Licenses: change license fields in Cargo.toml to AGPL-3.0-or-later. (#5535)
Release Notes:
- N/A
2024-01-27 13:51:16 +01:00
Amin Yahyaabadi
0e4d9472a9
fix: isolate macos-specific dependencies (#6854)
Release Notes:
- N/A
2024-01-27 13:38:55 +01:00
Alex Kladov
1f83b5c508
FileFinder: use idiomatic definition for Ord/PartialOrd (#6851) 2024-01-27 13:07:24 +02:00
Marshall Bowers
536a4ab87a
Add font_style and font_weight to serialized theme representation (#6838)
This PR adds `font_style` and `font_weight` as fields on the
`HighlightStyleContent` used in the serialized theme representation.

Release Notes:

- N/A
2024-01-26 22:40:31 -05:00
Mikayla Maki
fd3c96dbed
Add Haskell support (#5281) (#6786)
This PR adds the Haskell tree-sitter grammar copied from
[`nvim-treesitter`](https://github.com/nvim-treesitter/nvim-treesitter/tree/master/queries/haskell).
It also adds the Haskell Language Server.

This is a joint effort by myself (adding the grammar) and @leifu1128
(who is adding the language server integration).

This PR resolves https://github.com/zed-industries/zed/issues/5281

Release Notes:

- Added Haskell support
([#5281](https://github.com/zed-industries/zed/issues/5281)).
2024-01-26 18:32:20 -08:00
Marshall Bowers
0e722f6288
Extend support for outlining in Gleam (#6834)
This PR extends support for outlines in the recently-added Gleam
support.

Note that I'm leaving the release notes section blank as we haven't yet
released Gleam support, so it can just roll up into that item.

Release Notes:

- N/A
2024-01-26 21:31:22 -05:00
Pseudomata
030ff0acf3
Simplify Haskell LSP integration
This change will work without any configuration and assume the user will install the Haskell Language Server using `ghcup`
2024-01-26 20:19:36 -05:00
Stuart Hinson
9833d4b0c3
Add a couple common Ruby file suffixes (#6812)
Release Notes:

- Added `Gemfile.lock` and `rake` as associated Ruby files.
2024-01-26 19:24:25 -05:00
Pseudomata
652ec6fb3e
Ability to manually configure LSP for Haskell
Allow users who have HLS installed using `ghcup` to manually provide the path for the Haskell language server
2024-01-26 19:02:31 -05:00
Marshall Bowers
c3110d3dce
Rename BellBadged to BellDot (#6820)
This PR renames the `BellBadged` icon to `BellDot` to be a bit clearer
as to what its contents are.

Release Notes:

- N/A
2024-01-26 18:48:16 -05:00
David Rachmaninoff
62365e6a29
Add a badge to the bell icon on new notifications (#6751)
It changes the icon if a new notification event is consumed and changes
it back to normal upon toggling NotificationPanel.

Added a new field to NotificationPanel:
	- have_unseen_notifications: bool

Added a new icon asset
	- IconName::BellBadged => "assets/icons/bell_badged.svg"

Release Notes:

- Added a badge to bell icon for new notifications
([#6721](https://github.com/zed-industries/zed/issues/6721)).
2024-01-26 18:31:17 -05:00
Conrad Irwin
895c8384bf
Collab UI improvements (#6805)
- Allow people to leave channels
- Make contacts use right click menu for call
- Add a hover menu to see who's in a channel

Release Notes:

- Fixed clicking on contacts to *not* call them immediately
- Added a hover menu on channels to see who is there
- Added a "Leave Channel" right click option
2024-01-26 14:41:28 -07:00
Conrad Irwin
7e7a9c2d96 lint 2024-01-26 14:04:21 -07:00
Pseudomata
faf7798577
Use same arguments for LSP binary in haskell.rs 2024-01-26 15:41:11 -05:00
Pseudomata
0576214be7
Remove Haskell injections.scm
Since tree-sitter-haskell does not support injections we don’t want to mix with nvim-treesitter
2024-01-26 15:35:08 -05:00
Pseudomata
6e25b0a718
Switch to tree-sitter-haskell grammar 2024-01-26 15:04:22 -05:00
Conrad Irwin
5db7e8f89e collab 0.42.0 2024-01-26 12:27:37 -07:00
Conrad Irwin
a0f8a2342f Add a hover menu to see who's in a channel
Co-Authored-By: Max <max@zed.dev>
Inspired-By: @RemcoSmitsDev
2024-01-26 12:25:00 -07:00
Conrad Irwin
95fab1037f Make contacts use right click menu for call
Fixes accidental anxiety.

Co-Authored-By: Max <max@zed.dev>
2024-01-26 11:59:57 -07:00
Piotr Osiewicz
1761e60362
Improve performance of JSON schema creation (#6770)
JSON LSP adapter now caches the schema. `workspace_configuration` is
back to being async, and we are also no longer asking for font names
twice while constructing the schema.
Release Notes:
- Improved performance when opening the .json files.

---------

Co-authored-by: Kirill <kirill@zed.dev>
2024-01-26 19:54:45 +01:00
Mikayla Maki
0a124a9908
Feature: PHP: Add readonly keyword to keyword list (#6798)
Release Notes:

- Added `readonly` to keyword list for PHP
([#6797](https://github.com/zed-industries/zed/issues/6797)).
2024-01-26 10:46:18 -08:00
Marshall Bowers
f5f7be1500
Add experimental.theme_overrides to settings file (#6791)
This PR adds **experimental** support for overriding theme values in the
current theme.

Be advised that both the existence of this setting and the structure of
the theme itself are subject to change.

But this is a first step towards allowing Zed users to customize or
bring their own themes.

### How it works

There is a new `experimental.theme_overrides` setting in
`settings.json`.

This accepts an object containing overrides for values in the theme. All
values are optional, and will be overlaid on top of whatever theme you
currently have set by the `theme` field.

There is JSON schema support to show which values are supported.

### Example

Here's an example of it in action:


https://github.com/zed-industries/zed/assets/1486634/173b94b1-4d88-4333-b980-8fed937e6f6d

Release Notes:

- Added `experimental.theme_overrides` to `settings.json` to allow for
customizing the current theme.
  - This setting is experimental and subject to change.
2024-01-26 13:42:58 -05:00
Mikayla Maki
c9c9a6b11b
Activate the nushell virtualenv overlay correctly (#6766)
The activate.nu file works a little differently than its counterparts in
other shells, and it needs to be invoked as an overlay, rather than
sourced directly into the shell.

This fixes an outstanding issue left over from #6323.


Release Notes:

- (Improved) ...
([#6323](https://github.com/zed-industries/zed/issues/6323)).
2024-01-26 10:38:21 -08:00
Conrad Irwin
fd5994bc0a Allow people to leave channels
Co-Authored-By: Max <max@zed.dev>
2024-01-26 11:38:13 -07:00
Conrad Irwin
8bc105ca1d
Simplify Membership Management (#6747)
Simplify Zed's collaboration system by:
- Only allowing member management on root channels.
- Disallowing moving sub-channels between different roots.
- Disallowing public channels nested under private channels.

This should make the mental model easier to understand, and makes it
clearer
who has what access. It is also significantly simpler to implement, and
so
hopefully more performant and less buggy.

Still TODO:
- [x] Update collab_ui to match.
- [x] Fix channel buffer tests.

Release Notes:

- Simplified channel membership management.
2024-01-26 11:17:16 -07:00
Remco Smits
ac05853f2c Add readonly keyword to keyword list 2024-01-26 19:16:56 +01:00
Remco Smits
b5c64a128e
Feature: PHP allow single quote autocompletion (#6796)
Release Notes:

- Added support for single quote autocompletion in PHP
([#6794](https://github.com/zed-industries/zed/issues/6794)).
- Added `#` to supported line comments for PHP
([#6794](https://github.com/zed-industries/zed/issues/6794)).
2024-01-26 19:16:35 +01:00
Pseudomata
58a9f51361
Comment out haskell_persistent and sql injections
- the haskell_persistent grammar has not been added, see https://github.com/nvim-treesitter/nvim-treesitter/tree/master/queries/haskell_persistent and https://github.com/MercuryTechnologies/tree-sitter-haskell-persistent
- the sql grammar has not been added either
2024-01-26 12:28:52 -05:00
Conrad Irwin
22034d2083 Superstitiously wait some more for flakey test 2024-01-26 10:22:51 -07:00
Conrad Irwin
08de0d88b1 Update channel moving to match 2024-01-26 10:07:51 -07:00
Lei
ee750e102d implement hls adapter 2024-01-27 00:55:13 +08:00
Conrad Irwin
c6d33d4bb9 Only allow Manage Members on root channels 2024-01-26 09:40:41 -07:00
Pseudomata
2b9ba46cb6
Merge branch 'haskell-support' into add-haskell-grammar 2024-01-26 10:55:43 -05:00
Pseudomata
f9a08287c7
Update Haskell grammar
Copied queries from nvim-tree-sitter, see https://github.com/nvim-treesitter/nvim-treesitter/tree/master/queries/haskell
2024-01-26 10:51:39 -05:00
Thorsten Ball
f537be4704 Fix bracket captures for Go, C, C++, and Zig
This fixes #6702 by adding the captures for Go, C, C++, and Zig.

Witness-by: David <dammerung2718@icloud.com>
2024-01-26 16:45:45 +01:00
Marshall Bowers
8da5e57d6d
Factor out URLs in feedback crate (#6776)
This PR factors out the inlined URLs in the `feedback` crate so that
they don't mess with `rustfmt`.

Release Notes:

- N/A
2024-01-26 09:15:13 -05:00
Thomas Coratger
47860a5dc8
Combine observe_new_views into one in feedback crate (#6755)
Combine two `observe_new_views` calls into a single one in `init`
function of feedback crate.

Release Notes:

- N/A
2024-01-26 09:06:44 -05:00
Tristam MacDonald
3847762d8c Activate the nushell virtualenv overlay correctly
The activate.nu file works a little differently than it's counterparts in other shells, and it needs to be invoked as an overlay, rather than sourced directly into the shell.

This fixes an outstanding issues left over from #6323.
2024-01-26 12:52:28 +01:00
Thorsten Ball
802405f6bc
Fix panic when typing umlauts in command palette using Vim mode (#6761)
Release Notes:

- This fixes a panic that occurs when someone was using Vim mode and
typing umlauts into the command palette. E.g: `:%s/impërt`
2024-01-26 11:58:10 +01:00