Commit Graph

13858 Commits

Author SHA1 Message Date
Antonio Scandurra
659423a4a1
Use Mutex instead of a RefCell to acquire/release instance buffers (#7291)
This fixes a panic happening when releasing an instance buffer.
Releasing the buffer happens on a different thread but the borrow
checker was not catching it because the metal buffer completion handler
API doesn't have a `Send` marker on it.

Release Notes:

- N/A
2024-02-02 09:53:07 -07:00
Conrad Irwin
074acacdf7
Do more on channel join (#7268)
This change makes it so that if you are the first to join a channel,
your project is automatically shared.

It also makes it so that if you join a channel via a link and there are
no shared projects, you open the notes instead of an empty workspace
with nothing.

This is to try and address the discoverability of project sharing: we've
had
two reviews that have talked about channels, but not talked about
sharing
projects into them, which makes me suspect they didn't know about the
feature.

Release Notes:

- Added a setting `share_on_join` (defaulting to true). When set, and
you join an empty channel, your project is automatically shared.
2024-02-02 09:52:30 -07:00
Thorsten Ball
3d76ed96f5
Use command_buffer.wait_until_scheduled in metal renderer (#7283)
This commit goes back to using `wait_until_scheduled` as opposed to
`wait_until_completed`. What this means, however, is that another draw
could take place before the previous one finished. When that happens we
don't want to reuse the same instance buffer because the GPU is actively
reading from it, so we use a pool instead.

Release Notes:

- Fixed a bug that caused inconsistent frame rate when scrolling on
certain hardware.

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Antonio <antonio@zed.dev>
2024-02-02 09:09:58 -07:00
Bennet Bo Fenner
cf4f3ed79a
Fix padding for notes label (#7280)
Fixes the padding of the "notes" button in collab-ui. I'm not sure why
the previous code used `div().h_7().w_full()`. Am I missing something
here?

### Before
![Screenshot 2024-02-02 at 15 26
44](https://github.com/zed-industries/zed/assets/53836821/0577b706-b433-4e02-802b-b6eccefb3acd)

### After
![Screenshot 2024-02-02 at 15 27
26](https://github.com/zed-industries/zed/assets/53836821/00fd81d8-82a1-4936-829c-022554259fd5)



Release Notes:
- Fixed padding of the "notes" button in the collaboration panel.

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-02-02 11:04:43 -05:00
Kirill Bulatov
bacb2a266a
Add more data into LSP header parsing error contexts (#7282)
Follow-up of https://github.com/zed-industries/zed/pull/6929 

Release Notes:

- N/A
2024-02-02 18:04:23 +02:00
Thorsten Ball
11bd28870a
editor: Add MoveUpByLines and MoveDownByLines actions (#7208)
This adds four new actions:

- `editor::MoveUpByLines`
- `editor::MoveDownByLines`
- `editor::SelectUpByLines`
- `editor::SelectDownByLines`

They all take a count by which to move the cursor up and down.
(Requested by Adam here:
https://twitter.com/adamwathan/status/1753017094248018302)


Example `keymap.json` entries:

```json
{
  "context": "Editor",
  "bindings": [
    "alt-up":         [ "editor::MoveUpByLines",     { "lines": 3 } ],
    "alt-down":       [ "editor::MoveDownByLines",   { "lines": 3 } ],
    "alt-shift-up":   [ "editor::SelectUpByLines",   { "lines": 3 } ],
    "alt-shift-down": [ "editor::SelectDownByLines", { "lines": 3 } ]
  ]
}
```

They are *not* bound by default, so as to not conflict with the
`alt-up/down` bindings that already exist.

Release Notes:

- Added four new actions: `editor::MoveUpByLines`,
`editor::MoveDownByLines`, `editor::SelectUpByLines`,
`editor::SelectDownByLines` that can take a line count configuration and
move the cursor up by the count.

### Demo



https://github.com/zed-industries/zed/assets/1185253/e78d4077-5bd5-4d72-a806-67695698af5d




https://github.com/zed-industries/zed/assets/1185253/0b086ec9-eb90-40a2-9009-844a215e6378
2024-02-02 08:48:04 -07:00
Thorsten Ball
01ddf840f5
completions: do not render empty multi-line documentation (#7279)
I ran into this a lot with Go code: the documentation would be empty so
we'd display a big box with nothing in it.

I think it's better if we only display the box if we have documentation.

Release Notes:

- Fixed documentation box in showing up when using auto-complete even if
documentation was empty.

## Before

![screenshot-2024-02-02-14 00
18@2x](https://github.com/zed-industries/zed/assets/1185253/e4915d51-a573-41f4-aa5d-21de6d1b0ff1)

## After

![screenshot-2024-02-02-14 01
58@2x](https://github.com/zed-industries/zed/assets/1185253/74b244af-3fc7-45e9-8cb3-7264e34b7ab7)
2024-02-02 16:42:43 +01:00
Thorsten Ball
ec9f44727e
Fix Go tests failing on main (#7285)
Follow-up to #7276 in which I broke tests.

Release Notes:

- N/A
2024-02-02 16:35:58 +01:00
Rashid Almheiri
998f6cf80d
Add OCaml support (#6929)
This pull request implements support for the [OCaml
Language](https://ocaml.org/).

### Additions
- [x]
[tree-sitter-ocaml](https://github.com/tree-sitter/tree-sitter-ocaml)
grammar
- [x] Highlight, Indents, Outline queries
- [x] A new file icon for .ml(i) files. Based on
[ocaml/ocaml-logo](https://github.com/ocaml/ocaml-logo/blob/master/Colour/SVG/colour-transparent-icon.svg)
- [x] LSP Integration with
[ocaml-language-server](https://github.com/ocaml/ocaml-lsp)
- [x] Completion Labels
- [x] Symbol Labels

### Bug Fixes
- [x] Improper parsing of LSP headers. 

### Missing [will file a separate issue]
- Documentation on completionItem, requires: `completionItem/resolve`
with support for `documentation` as a provider.

### Screenshots

<details><summary>Zed</summary>
<img width="1800" alt="Screenshot 2024-02-01 at 03 33 20"
src="https://github.com/zed-industries/zed/assets/69181766/e17c184e-203e-40c3-a08f-4de46226b79c">
</details>

Release Notes:
- Added OCaml Support
([#5316](https://github.com/zed-industries/zed/issues/5316)).

> [!NOTE]
> Partially completes #5316 
> To complete #5316:
> 1. addition of a reason tree-sitter grammar.
> 2. opam/esy integration, however it may be better as it's own plugin.
2024-02-02 16:58:07 +02:00
Robin Pfäffle
980d4f1003
Add inline code blocks in markdown preview (#7277)
Fixes #7236.

The reason why the code was not displayed correctly is due to missing
background color for the inline code block.

Previously to this PR:

<img width="1840" alt="SCR-20240202-mclv"
src="https://github.com/zed-industries/zed/assets/67913738/92f63e72-db86-4de9-bb42-40549679e159"
alt="Screenshot showing that inline code blocks are not highlighted in
Markdown preview">

After this PR:

<img width="1796" alt="SCR-20240202-mccs"
src="https://github.com/zed-industries/zed/assets/67913738/5cf039af-82d7-41b8-b461-f79dec5ddf6a"
alt="Screenshot showing that inline code blocks are now highlighted in
Markdown preview">



Release Notes:

- Fixed inline code block not shown in markdown preview
([#7236](https://github.com/zed-industries/zed/issues/7236)).
2024-02-02 16:51:05 +02:00
Thorsten Ball
79c1003b34
go: fix highlighting of brackets, variables, fields (#7276)
This changes the highlighting of Go code to make it more similar to how
we highlight Rust

* normal variables have the normal color, vs. being highlighted. This
really stuck out.
* brackets are properly highlighted

It also brings it closer to Neovim's tree-sitter highlighting by
changing how struct fields are highlighted.



Release Notes:

- Improved highlighting of Go code by tuning highlighting of variables,
brackets, and struct fields.

## Before & After

![screenshot-2024-02-02-11 38
08@2x](https://github.com/zed-industries/zed/assets/1185253/a754f166-89c1-40e8-a8da-b63155180896)
2024-02-02 11:44:28 +01:00
Piotr Osiewicz
d576cda789 project: Do not inline LSP related methods
The way Rust generics works, having a generic argument puts the burden of codegen on the crate that instantiates a generic function, which in our case is an editor.
2024-02-02 11:38:09 +01:00
Thorsten Ball
10cd978e93
go: improve outline queries to get rid of whitespace (#7273)
This changes the Go `outline.scm` queries a bit so that we don't have
these stray whitespaces floating around. I'm sure there's more
improvements possible, but for now I think this makes it look less
wrong.

Release Notes:

- Improved outline and breadcrumbs for Go code.

## Before

![before](https://github.com/zed-industries/zed/assets/1185253/d2b93c41-639b-4819-b87e-d8456960c5a7)

## After

![after](https://github.com/zed-industries/zed/assets/1185253/1ff6efb1-75a4-487b-8947-f070073887d4)
2024-02-02 11:24:04 +01:00
Bennet Bo Fenner
ce4c15dca6
Show diagnostics in scrollbar (#7175)
This PR implements support for displaying diagnostics in the scrollbar,
similar to what is already done for search results, symbols, git diff,
...

For example, changing a field name (`text`) without changing the
references looks like this in `buffer.rs` (note the red lines in the
scrollbar):

![image](https://github.com/zed-industries/zed/assets/53836821/c46f0d55-32e3-4334-8ad7-66d1578d5725)

As you can see, the errors, warnings, ... are displayed in the scroll
bar, which helps to identify possible problems with the current file.

Relevant issues: #4866, #6819

Release Notes:

- Added diagnostic indicators to the scrollbar
2024-02-02 12:10:42 +02:00
Thorsten Ball
2940a0ebd8
Revert "Avoid excessive blocking of main thread when rendering in direct mode (#7253)" (#7272)
This reverts commit 020c38a891 because it
leads to glitches when selecting text.



https://github.com/zed-industries/zed/assets/1185253/78c2c184-bc15-4b04-8c80-a23ca5c96afa



Release Notes:

- N/A
2024-02-02 10:33:08 +01:00
Alfred Kristal Ern
8fed9aaec2
Fix project panel selection related issues (#7245)
Fixes #7003 and #7005.

Selecting as a reaction to actually opening a new item doesn’t seem
robust in all cases, the PR improves that.

Release Notes:

- Fixed missing project panel file selection in certain cases
2024-02-02 11:17:46 +02:00
Dzmitry Malyshau
c000d2e16b blade: path sprite rendering 2024-02-02 00:34:08 -08:00
Dzmitry Malyshau
fdaffdbfff linux: path rasterization shader 2024-02-01 22:56:50 -08:00
Dzmitry Malyshau
05c42211fe linux: implement RWH for LinuxWindow 2024-02-01 22:05:59 -08:00
Dzmitry Malyshau
ed679c9347 WIP path rasterization 2024-02-01 21:43:28 -08:00
Dzmitry Malyshau
ce84a2a671 linux: refactor window structure, support move callback 2024-02-01 21:43:28 -08:00
Dzmitry Malyshau
c9ec337034 linux: share corner picking code between shaders 2024-02-01 21:43:28 -08:00
Dzmitry Malyshau
666b134d20 linux: shadow rendering 2024-02-01 21:43:28 -08:00
Dzmitry Malyshau
ecf4955899 hide MacOS dependencie of live_kit_client and media 2024-02-01 21:42:57 -08:00
Dzmitry Malyshau
8aa768765f linux: basic quad renderer logic 2024-02-01 21:41:15 -08:00
Dzmitry Malyshau
503ac7a251 linux: work around the mutex locks for request_frame and resize 2024-02-01 21:40:54 -08:00
Dzmitry Malyshau
74fde5967b linux: hook up render event, basic renderer command buffer 2024-02-01 21:40:54 -08:00
Dzmitry Malyshau
7f8c64aa6c linux: port from x11rb to xcb and hook up RawWindowHandle 2024-02-01 21:40:54 -08:00
Dzmitry Malyshau
aed363d3c7 x11: create window and route events 2024-02-01 21:29:07 -08:00
Dzmitry Malyshau
cefc98258f linux: hook up X11rb for Window creation 2024-02-01 21:29:07 -08:00
Dzmitry Malyshau
e95bf24a1f linux: basic window, display, and atlas 2024-02-01 21:29:07 -08:00
Dzmitry Malyshau
b0376aaf8f linux: start the text system 2024-02-01 21:28:37 -08:00
Dzmitry Malyshau
ca62d22147 linux: implement dispatcher, add dummy textsystem 2024-02-01 21:28:16 -08:00
Dzmitry Malyshau
d675abf70c Add Linux platform, gate usage of CVImageBuffer by macOS 2024-02-01 21:28:16 -08:00
Dzmitry Malyshau
ef4ef5f0e8 Add blade dependency 2024-02-01 21:27:43 -08:00
Conrad Irwin
69e0ea92e4
Links to channel notes (#7262)
Release Notes:

- Added outline support for Markdown files
- Added the ability to link to channel notes:
https://zed.dev/channel/zed-283/notes#Roadmap
2024-02-01 22:22:02 -07:00
Max Brunsfeld
020c38a891
Avoid excessive blocking of main thread when rendering in direct mode (#7253)
Release Notes:

- Fixed a bug that caused inconsistent frame rate when scrolling on
certain hardware.

Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2024-02-01 15:39:41 -08:00
Max Brunsfeld
21f4da6bf2
Correctly log LSP adapter name on LSP request error (#7232)
Previously, we were logging the language server's binary filename
instead.

Release Notes:

- N/A

Co-authored-by: Nathan <nathan@zed.dev>
Co-authored-by: Antonio <antonio@zed.dev>
2024-02-01 14:17:09 -08:00
Kirill Bulatov
da44f637ed
Order history items by open recency (#7248)
Closes https://github.com/zed-industries/zed/issues/7244

Follow-up of https://github.com/zed-industries/zed/pull/7210 that
returns back ordering of history items by open recency (last opened
history item should be on top)

Release Notes:

- N/A

---------

Co-authored-by: Andrew Lygin <alygin@gmail.com>
2024-02-01 23:45:03 +02:00
Conrad Irwin
7b9d51929d
Deploy collab like nightly (#7174)
After this change we'll be able to push a tag to github to deploy to
collab.

The advantages of this are that there's no longer a separate step to
first
build the image, and then deploy it.

In the future I'd like to make this happen more automatically (maybe as
part of
bump nightly).

Release Notes:

- N/A
2024-02-01 11:54:49 -07:00
Antonio Scandurra
5424c8bfd5
Introduce a fast path for drawing quads with no borders / corner radii (#7231)
This will introduce an extra conditional but saves us from doing a bunch
of math in the simple case of drawing simple rectangles that aren't
rounded or don't have borders.


![Figure_1](https://github.com/zed-industries/zed/assets/482957/cba95ce2-2d9a-46ab-a142-35368334eb75)

Release Notes:

- Improved rendering performance.
2024-02-01 09:49:27 -08:00
Mikayla Maki
d4264cbe4e
Fix scrolling and wrapping in the markdown preview renderer (#7234)
Release Notes:

- N/A
2024-02-01 09:07:01 -08:00
Dairon M
97be0a930c
Add syntax highlighting and LSP (erlang_lsp) for Erlang (#7093)
This pull request implements support for the [Erlang
Language](https://erlang.org/).

**It adds:**

* [tree-sitter-erlang](https://github.com/WhatsApp/tree-sitter-erlang)
grammar
highlights (Licensed under Apache-2 from WhatsApp which is compatible
with Zed licensing model), folds and indents
* Erlang file icon based on the [official
one](https://www.erlang.org/doc/erlang-logo.png)
* [erlang_ls](https://github.com/erlang-ls/erlang_ls) support

Fixes https://github.com/zed-industries/zed/issues/4939, possibly a
duplicate of https://github.com/zed-industries/zed/pull/7085 with more
features. Suppose @wingyplus wants to join efforts here.

**To complete (out of scope for this PR):**

* Support for the ELP language server from WhatsApp. CC @robertoaloi
* Better indentation handling, need something like
`indentNextLinePattern` in VS Code

**Screenshots:**

![Screenshot 2024-01-30 at 11 03 51
AM](https://github.com/zed-industries/zed/assets/168440/5289c245-9edd-46b8-b443-d7b3210f6510)
![Screenshot 2024-01-30 at 11 01 19
AM](https://github.com/zed-industries/zed/assets/168440/bd22b322-5344-44e6-b5f7-6e352fb3deef)
![Screenshot 2024-01-30 at 11 01 37
AM](https://github.com/zed-industries/zed/assets/168440/f28f6a15-383e-4719-8a87-fceae5062436)
![Screenshot 2024-01-30 at 11 02 03
AM](https://github.com/zed-industries/zed/assets/168440/980d5213-0367-4a08-86eb-5743dfa628eb)
![Screenshot 2024-01-30 at 11 02 19
AM](https://github.com/zed-industries/zed/assets/168440/ea998891-604d-48d6-929f-ae4c1bb3fae1)

Outline: 
![Screenshot 2024-01-31 at 9 09 36
AM](https://github.com/zed-industries/zed/assets/168440/46d56d94-21c3-414d-84fb-9251fa2506ab)



**Release Notes:**

* Added Erlang Support
([7093](https://github.com/zed-industries/zed/pull/7093)).

---------

Signed-off-by: Thanabodee Charoenpiriyakij <wingyminus@gmail.com>
Co-authored-by: Thanabodee Charoenpiriyakij <wingyminus@gmail.com>
2024-02-01 18:54:26 +02:00
Thorsten Ball
3107ed847a
lsp: if language server closes stdout/stderr, break loop (#7229)
Previously we would run these loops indefinitely when a language server
closed its stdout/stderr and the `read_until` returned `0` bytes read.

Easy to reproduce: start Zed with LSP attached, `kill -9` the LSP, see
logs accumulate.

Release Notes:

- Fix high CPU usage when a language server crashes (or closes its
stdout/stderr on purpose).

Co-authored-by: Julia <julia@zed.dev>
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-02-01 17:49:53 +01:00
Kirill Bulatov
944a1f8fb0
Send lsp_types::InitializeParams with Zed version (#7216)
Based on the great work in
https://github.com/zed-industries/zed/pull/7130 , now sends this data

```
[crates/lsp/src/lsp.rs:588] ClientInfo { name: name.to_string(), version: Some(version.to_string()) } = ClientInfo {
    name: "Zed Dev",
    version: Some(
        "0.122.0",
    ),
}
```

with every LSP server initialization.

Release Notes:

- Added Zed name and version to LSP InitializeParams requests
2024-02-01 18:39:28 +02:00
Marshall Bowers
47a1ff7df9
markdown_preview: Sort dependencies in Cargo.toml (#7226)
This PR sorts the dependencies for the `markdown_preview` crate in
alphabetical order.

Release Notes:

- N/A
2024-02-01 11:26:50 -05:00
d1y
b9d5eb17a3
Fix typo (#7223)
Release Notes:

- N/A
2024-02-01 11:05:51 -05:00
Thorsten Ball
adc7cfb0d3
Fix moving focus to docks when navigating via keybinds (#7221)
This is a follow-up to #7141 and fixes the focus-switching to docks in
case they haven't been focused before.

We ran into issues when trying to focus a dock, that hasn't been focused
in the app's lifecycle: focus would only flip after the next re-render
(which could be triggered by moving the mouse, for example)

This changes the approach and uses the one we have for `toggle focus`
actions.

Release Notes:

- N/A

Co-authored-by: Piotr <piotr@zed.dev>
Co-authored-by: bennetbo <bennetbo@gmx.de>
2024-02-01 16:28:51 +01:00
Bennet Bo Fenner
2d41a119b3
markdown: Support alignment for table cells (#7201)
Just a small improvement as a follow up to @kierangilliam great work on
#6958

Rendering a table specified like this:
```markdown
| Left columns  | Center columns | Right columns |
| ------------- |:--------------:| -------------:|
| left foo      | center foo     | right foo     |
| left bar      | center bar     | right bar     |
| left baz      | center baz     | right baz     |
```
Does now look like this (notice the cell alignments):

![image](https://github.com/zed-industries/zed/assets/53836821/0f5b6a1e-a3c2-4fe9-bdcb-8654dbae7980)

Release Notes:
- N/A
2024-02-01 15:43:04 +02:00
Kirill Bulatov
0102ffbfca
Refactor file_finder send element open code (#7210)
Follow-up of https://github.com/zed-industries/zed/pull/6947 (cc
@alygin) that fixes a few style nits and refactors the code around:
* use already stored `currently_opened_path` to decide what to do with
the history item sorting
* use the same method to set history items, encapsulate the bubbling up
logic there
* ensure history elements are properly sorted before populating

The main reason to change all that is the new comparator in the previous
version:
https://github.com/zed-industries/zed/pull/6947/files#diff-eac7c8c99856f77cee39117708cd1467fd5bbc8805da2564f851951638020842R234
that almost violated `util::extend_sorted` contract, requiring both
collections to be sorted the same way as the comparator would be: it did
work, because we bubbled currently open item up in the history items
list manually, and that we have only one such item.

Release Notes:
- N/A
2024-02-01 14:35:42 +02:00
Andrew Lygin
0edffd9248
Select the second item in the file finder by default (#6947)
This PR completes the first task of the Tabless editing feature (#6424).
It makes file finder select the previously opened file by default which
allows the user to quickly switch between two last opened files by
clicking `Cmd-P + Enter`.

This feature was also requested in #4663 comments.

Release Notes:
* Improved file finder selection: currently opened item is not selected now
2024-02-01 14:21:59 +02:00
Thorsten Ball
e65a76f0ec
Add ability to navigate to/from docks via keybindings (#7141)
This adds the ability to navigate to/from docks (Terminal, Project,
Collaboration, Assistant) via keybindings.

When using the `ActivatePaneInDirection` keybinding from the
left/bottom/right dock, we check whether the movement is towards the
center panel. If it is, we focus the last active pane.

Fixes https://github.com/zed-industries/zed/issues/6833 and it came up
in a few other tickes/discussions.

Release Notes:

- Added ability to navigate to docks and back to the editor using the
`workspace::ActivatePaneInDirection` action (by default bound to `Ctrl-w
[hjkl]` in Vim mode).
([#6833](https://github.com/zed-industries/zed/issues/6833)).

## Drawback

There's this weird behavior: if you start Zed and no files are opened,
you focus terminal, go left (project panel), then back to right to
terminal, the terminal isn't focused. Even though we focus it in the
code.

Maybe this is a bug in the current focus handling code?

## Demo


https://github.com/zed-industries/zed/assets/1185253/5d56db40-36aa-4758-a3bc-7a0de20ce5d7

---------

Co-authored-by: Piotr <piotr@zed.dev>
2024-02-01 12:18:12 +01:00
Thorsten Ball
6c93c4bd35
assistant: render api key editor if no credentials are set (#7197)
This hopefully reduces confusion for new users. I updated the docs just
this morning, but I figured it's probably better to fix the issue
itself.

So what this does is to render the API key editor whenever the assistant
panel is opened/focused and no credentials can be found.

See: https://github.com/zed-industries/zed/discussions/6943

Release Notes:

- Fixed assistant panel not showing dialog to enter API key when opened
without saved credentials.

---------

Co-authored-by: Piotr <piotr@zed.dev>
2024-02-01 11:16:03 +01:00
Kieran Gill
8bafc61ef5
Add initial markdown preview to Zed (#6958)
Adds a "markdown: open preview" action to open a markdown preview.

https://github.com/zed-industries/zed/assets/18583882/6fd7f009-53f7-4f98-84ea-7dd3f0dd11bf


This PR extends the work done in `crates/rich_text` to render markdown
to also support:

- Variable heading sizes
- Markdown tables
- Code blocks
- Block quotes

## Release Notes

- Added `Markdown: Open preview` action to partially close
([#6789](https://github.com/zed-industries/zed/issues/6789)).

## Known issues that will not be included in this PR

- Images.
- Nested block quotes.
- Footnote Reference.
- Headers highlighting.
- Inline code highlighting (this will need to be implemented in
`rich_text`)
- Checkboxes (`- [ ]` and `- [x]`)
- Syntax highlighting in code blocks.
- Markdown table text alignment.
- Inner markdown URL clicks
2024-02-01 11:03:09 +02:00
Ares Andrew
3b882918f7
Filter LSP github releases that have no assets to properly download LSP servers (#7189)
Fixes https://github.com/zed-industries/zed/issues/7183

Release Notes:

- Filter lsp github releases that have no assets ([7189](https://github.com/zed-industries/zed/issues/7183))
2024-02-01 10:59:35 +02:00
Conrad Irwin
3df7da236d
Also add proxy to zed http client (#7184)
Follow up to #6765 because I couldn't figure out how to add to that PR.

Release Notes:

- N/A
2024-01-31 21:40:12 -07:00
lichuan6
5e81d780bd
Read HTTP proxy from env (#6765)
This PR will use http proxy from env for downloading files.
2024-01-31 20:57:09 -07:00
Conrad Irwin
2cc2a61c77 collab 0.44.0 2024-01-31 19:10:19 -07:00
Conrad Irwin
3025e5620d
Tell the user when screen-sharing fails (#7171)
Release Notes:

- Added an alert when screen-sharing fails
2024-01-31 16:28:32 -07:00
Marshall Bowers
c4083c3cf6
Watch the themes directory for changes (#7173)
This PR makes Zed watch the themes directory for changes.

When theme files are added or modified, we reload the theme and apply
any changes to Zed.

Release Notes:

- Added live reloading for the themes directory.
2024-01-31 18:17:31 -05:00
Conrad Irwin
2187513026
app version to server (#7130)
- Send app version and release stage to collab on connect
- Read the new header on the server

Release Notes:

- Added the ability to collaborate with users on different releases of
Zed.
2024-01-31 15:46:24 -07:00
Conrad Irwin
5b7b5bfea5
Add a checksum telemetry request (#7168)
We're seeing a bit of nonsense on telemetry. Although the checksum seed
isn't secret per-se, it does make sending nonsense a little more effort.

Release Notes:

- N/A
2024-01-31 15:44:38 -07:00
Marshall Bowers
a588a7dd4d
Fix some typos in comments (#7169)
This PR fixes a couple typos I found in some comments/doc comments.

Release Notes:

- N/A
2024-01-31 16:21:33 -05:00
Conrad Irwin
dcca48482b
disallow opening private files (#7165)
- Disallow sharing gitignored files through collab
- Show errors when failing to open files
- Show a warning to followers when view is unshared

/cc @mikaylamaki, let's update this to use your `private_files` config
before merge.


Release Notes:

- Added the ability to prevent sharing private files over collab.

---------

Co-authored-by: Piotr <piotr@zed.dev>
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-31 12:05:51 -08:00
Joseph T. Lyons
c983c9b6df v0.122.x dev 2024-01-31 14:44:24 -05:00
Mikayla Maki
f98d636203
WIP: Add a setting to visually redact enviroment variables (#7124)
Release Notes:

- Added bash syntax highlighting to `.env` files. 
- Added a `private_files` setting for configuring which files should be
considered to contain environment variables or other sensitive
information.
- Added a `redact_private_values` setting to add or remove censor bars
over variable values in files matching the `private_files` patterns.
-(internal) added a new `redactions.scm` query to our language support,
allowing different config file formats to indicate where environment
variable values can be identified in the syntax tree, added this query
to `bash`, `json`, `toml`, and `yaml` files.

---------

Co-authored-by: Nathan <nathan@zed.dev>
2024-01-31 11:42:09 -08:00
Ben Hamment
5333eff0e4
Improve file finder by ignoring spaces in query (#7068)
Release Notes:

- Changed file finder to ignore spaces in queries ([#5324
](https://github.com/zed-industries/zed/issues/5324)).


![image](https://github.com/zed-industries/zed/assets/7274458/14f3d511-129d-4e73-b9d3-12ce1aaa892f)

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-01-31 14:18:21 -05:00
d1y
5d85801d1f
Add highlighting for go.work (#7142)
<img width="617" alt="image"
src="https://github.com/zed-industries/zed/assets/45585937/ecb28152-db02-450e-bc81-395abd1c1eef">

Release Notes:

- Added  highlighting for go.work
2024-01-31 12:11:03 -07:00
Vishal Bhavsar
ebdabb907a
vim: Support counts for H and L motions (#7149)
Release Notes:

- Added support for counts to `H` and `L` motions
([#4941](https://github.com/zed-industries/zed/issues/4941)).
2024-01-31 11:50:08 -07:00
Conrad Irwin
689d43047d
Don't panic when collaborating with older Zed versions (#7162)
Older Zed versions may send a buffer id of 0, which is no-longer
supported. (as of #6993)

This doesn't fix that, but it does ensure that we don't panic in the
workspace by maintaining the invariant that from_proto_state returns
Some(Task) if the variant matches.

It also converts the panic to an error should something similar happen
again in the future.


Release Notes:

- N/A
2024-01-31 11:46:03 -07:00
Ares Andrew
59f77d316f
Use mimalloc as default allocator (#7140)
From https://github.com/microsoft/mimalloc:
> In our benchmarks (see
[below](https://github.com/microsoft/mimalloc#performance)), mimalloc
outperforms other leading allocators (jemalloc, tcmalloc, Hoard, etc),
and often uses less memory. A nice property is that it does consistently
well over a wide range of benchmarks. There is also good huge OS page
support for larger server programs.


Release Notes:

- Changed default allocator to mimalloc.
2024-01-31 09:50:37 -08:00
d1y
b7ced3943e
Add highlighting for git_commit (#7147)
https://github.com/zed-industries/zed/assets/45585937/32cf5622-e960-4775-986d-bcfd30c81098

Release Notes:

- Added highlighting for git_commit
2024-01-31 09:41:19 -08:00
Piotr Osiewicz
5941102aac
gpui: Add runtime-shaders feature so that Xcode.app is no longer necessary for Nix-based workflows (#7148)
Release Notes:

- N/A

Co-authored-by: Niklas <niklas@niklaskorz.de>
2024-01-31 17:37:16 +01:00
Marshall Bowers
8c8a5ad275
Make theme parsing more lenient (#7154)
This PR improves the theme parsing to be a bit more lenient, allowing
things like comments and trailing commas in theme files.

Release Notes:

- N/A
2024-01-31 11:05:22 -05:00
Julia
7cb97e57f9 Add debounce for re-querying completion documentation 2024-01-31 09:50:26 -05:00
Andrey Kuzmin
634fe99fa5
Add LSP support for Elm (#7116)
Closes #4595

Release Notes:

- Added LSP support for Elm
([#4595](https://github.com/zed-industries/zed/issues/4595)).

---------

Co-authored-by: Jared M. Smith <absynce@gmail.com>
2024-01-31 11:05:38 +02:00
d1y
c3d4fa4336
Permalink add Gitee host support (#7134)
China's largest git code hosting platform
About Gitee: https://gitee.com/about_us

Release Notes:

- Added Gitee host support   with Git-Permalink
2024-01-31 08:54:03 +01:00
Derrick Laird
ba91adf48a
languages: add highlighting for go.mod (#7137)
Release Notes:

- Added syntax highlighting for go.mod files. Fixes #7133 

<img width="863" alt="image"
src="https://github.com/zed-industries/zed/assets/8725798/dc521a02-c53a-44aa-b0c1-eebf31835679">
2024-01-31 08:46:13 +01:00
Marshall Bowers
e5fe811d7a
theme_importer: Add ability to print theme JSON schema (#7129)
This PR adds a quick subcommand to the `theme_importer` to facilitate
printing out the JSON schema for a theme.

Note that you do need to pass a `<PATH>` to the subcommand still, even
though it will be ignored. I'll rework the CLI to this at some point.

The JSON schema for the current version of the theme can also be found
at
[`https://zed.dev/schema/themes/v0.1.0.json`](https://zed.dev/schema/themes/v0.1.0.json).

Release Notes:

- N/A
2024-01-30 23:33:54 -05:00
Max Brunsfeld
9459394ea0
Re-enable language plugin functionality with some fixes (#7105)
Part of https://github.com/zed-industries/zed/issues/7096

* [x] Load all queries for language plugins, not just highlight query
* [x] Auto-reload languages when changing the `plugins` directory
* [x] Bump Tree-sitter for language loading and unloading fixes
* [x] Figure out code signing

Release Notes:

- N/A

---------

Co-authored-by: Antonio <antonio@zed.dev>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-01-30 19:59:13 -08:00
Conrad Irwin
db99d4fef1
No more nightly/preview collab anymore (#7112)
Release Notes:

- N/A
2024-01-30 20:11:06 -07:00
Conrad Irwin
aee0f65b26
Attempt to fix a panic in worktree scanning (#7128)
Somehow (and this should be investigated separately) we're ending up
with paths that look like: /path/to/project/../../path/to/dependency,
these pass the Ok(repo_path) = path.strip_prefix(), but then fail.

Release Notes:

- Fixed (hopefully) a panic that could occur due to path confusing in
git status
2024-01-30 20:10:52 -07:00
Marshall Bowers
dbb5fad147
Fix some formatting issues in Cargo.toml files (#7127)
This PR fixes some formatting issues in some of the `Cargo.toml` files.

I tried to fix most of these in #7126, but there were a few that I
missed.

Release Notes:

- N/A
2024-01-30 22:01:35 -05:00
Marshall Bowers
e338f34097
Sort dependencies in Cargo.toml files (#7126)
This PR sorts the dependency lists in our `Cargo.toml` files so that
they are in alphabetical order.

This should make them easier to visually scan when looking for a
dependency.

Apologies in advance for any merge conflicts 🙈 

Release Notes:

- N/A
2024-01-30 21:41:29 -05:00
Marshall Bowers
d97e780135
Restrict access to global Audio (#7122)
This PR restricts access to the `Audio` global to force consumers to go
through the `Audio` public interface to interact with it.

Release Notes:

- N/A
2024-01-30 20:49:58 -05:00
Marshall Bowers
176f63e86e
Add ability to copy a permalink to a line (#7119)
This PR adds the ability to copy the permalink to a line from within
Zed.

This functionality is available through the `editor: copy permalink to
line` action in the command palette:

<img width="589" alt="Screenshot 2024-01-30 at 7 07 46 PM"
src="https://github.com/zed-industries/zed/assets/1486634/332282cb-211f-4f16-9eb1-415bcfee9b7b">

Executing this action will create a permalink to the currently selected
line(s) and copy it to the clipboard.

Here is an example line:

```
56c80e8011/src/lib.rs (L25)
```

Currently, both GitHub and GitLab are supported.

### Notes and known limitations

- In order to determine where to permalink to, we read the URL of the
`origin` remote in Git. This feature will not work if the `origin`
remote is not present.
- Attempting to permalink to a ref that is not pushed to the origin will
result in the link 404ing.
- Attempting to permalink when Git is in a dirty state may not generate
the right link.
- For instance, modifying a file (e.g., adding new lines) and grabbing a
permalink to it will result in incorrect line numbers.

Release Notes:

- Added the ability to copy a permalink to a line
([#6777](https://github.com/zed-industries/zed/issues/6777)).
- Available via the `editor: copy permalink to line` action in the
command palette.
2024-01-30 19:20:15 -05:00
Felix Salazar
cbcaca4153
Show highlighted symbol in the scrollbar (#7029)
Release Notes:

- Added highlighted symbols to the scrollbar; partially mentioned in:
  - https://github.com/zed-industries/zed/issues/5308
  - https://github.com/zed-industries/zed/issues/4866
2024-01-30 13:57:42 -08:00
Conrad Irwin
871b8525b4
Fix per-env settings override (#7114)
Due to a misplaced .trim(), the RELEASE_CHANNEL_NAME included the
trailing newline.

Release Notes:

- N/A
2024-01-30 14:38:51 -07:00
Conrad Irwin
3075e58729 collab 0.43.0 2024-01-30 13:22:54 -07:00
Conrad Irwin
911b4b5ae8
Migrate automatically on service start (#7103)
This avoids a forgettable manual step in deploying collab

Release Notes:

- N/A
2024-01-30 13:19:35 -07:00
Marshall Bowers
2e7f9c48bb
Use fully-qualified name to avoid an unused import (#7104)
This PR adjusts how we implement `Global` conditionally to avoid an
unused import when compiling in release mode.

Release Notes:

- N/A
2024-01-30 14:57:54 -05:00
Mikayla Maki
a54eaaecee
Add raw window handle implementations to GPUI (#7101)
This is in preparation for experiments with wgpu. This should have no
external effect.

Release Notes:

- N/A
2024-01-30 11:42:28 -08:00
Marshall Bowers
1d794dbb37
Only impl Global for DebugBelow when compiling with debug_assertions (#7102)
This PR fixes this error when compiling a release build:

<img width="504" alt="Screenshot 2024-01-30 at 2 30 38 PM"
src="https://github.com/zed-industries/zed/assets/1486634/96470735-2b9e-4945-b4c3-c86ef0168b8c">

`DebugBelow` only exists when compiling with `debug_assertions`, so we
only want to implement it using that same criterion.

Release Notes:

- N/A
2024-01-30 14:37:29 -05:00
Piotr Osiewicz
e756602610
log: Use local timezone in log timestamps (#7079)
I'm gonna let it sit for a day in case anybody has any objections to
that change.

Release Notes:

- Logs now use local timestamps instead of UTC-based timestamps

---------

Co-authored-by: Beniamin <beniamin@zagan.be>
2024-01-30 20:18:39 +01:00
Piotr Osiewicz
e6ebe7974d
gpui: Add Global marker trait (#7095)
This should prevent a class of bugs where one queries the wrong type of
global, which results in oddities at runtime.

Release Notes:

- N/A

---------

Co-authored-by: Marshall <marshall@zed.dev>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-01-30 14:08:20 -05:00
Derrick Laird
7bfa584eb6
Add protobuf support (#6748)
Release Notes:

- Added protobuf syntax highlighting
([#5160](https://github.com/zed-industries/zed/issues/5160)).
2024-01-30 21:08:10 +02:00
Conrad Irwin
dfbcaf36fc
nightly url setting (#7037)
Release Notes:

- Added the ability to set settings per-release stage
- Added a `"server_url"` setting
2024-01-30 11:35:07 -07:00
Conrad Irwin
c07355265f
Add logging for the font_descriptor panic (#7097)
Release Notes:

- Fixed a panic caused by an inconsistency in font metrics.
2024-01-30 11:16:43 -07:00
白山風露
631f885900
Ensure sqlez build succeeds on Windows (#7072)
On Windows, `OsStr` must be a valid
[WTF-8](https://simonsapin.github.io/wtf-8/) sequence, and there are no
safety ways converting from bytes to OsStr in std. So I added
`PathExt::try_from_bytes` and use it in `sqlez`.
2024-01-30 10:07:46 -08:00
Remco Smits
30b9cef5ba
Improve mention visibility by adding a background color (#7014)
When the chat if going fast, It's hard to see who is mentioning you, so
this feature will make it more clear by the UI instead of needing to
read all the messages.

<img width="242" alt="Screenshot 2024-01-29 at 21 19 07"
src="https://github.com/zed-industries/zed/assets/62463826/65ec307d-5027-4ead-9568-854fc746c822">

Release Notes:

- Added background to messages that mention you.
2024-01-30 09:58:36 -08:00
fminkowski
e5c4c8522b
C# Support: Add treesitter and OmniSharp LSP support (#6908)
This PR adds the C# tree-sitter grammar. It also adds OmniSharp-Roslyn
for LSP support.

Resolves issue
[#5299](https://github.com/zed-industries/zed/issues/5299)

Release Notes:

- Added C# support

## VSCode
<img width="984" alt="vscode"
src="https://github.com/zed-industries/zed/assets/6967829/1f6b4cb7-4e00-4d61-8e58-2867dc5c8ecf">

## Zed
<img width="1722" alt="zed"
src="https://github.com/zed-industries/zed/assets/6967829/88436c78-93de-4e26-be15-b0dea6590c55">
2024-01-30 09:54:39 -08:00
Marshall Bowers
2980f0508c
Rework loading images from files (#7088)
This PR is a follow-up to #7084, where I noted that I wasn't satisfied
with using `SharedUri` to represent both URIs and paths on the local
filesystem:

> I'm still not entirely happy with this naming, as the file paths that
we can store in here are not _really_ URIs, as they are lacking a
protocol.
>
> I want to explore changing `SharedUri` / `SharedUrl` back to alway
storing a URL and treat local filepaths differently, as it seems we're
conflating two different concerns under the same umbrella, at the
moment.

`SharedUri` has now been reverted to just containing a `SharedString`
with a URI.

`ImageSource` now has a new `File` variant that is used to load an image
from a `PathBuf`.

Release Notes:

- N/A
2024-01-30 11:26:02 -05:00
Thorsten Ball
6d4fe8098b
Fix panic in fuzzy-finder for unicode characters (#7080)
This fixes a panic in the fuzzy finder which someone ran into when
typing in a query that contained the lower-case version of a unicode
character that has more chars than its upper-case version.

It also fixes another problem which was that we didn't find a match if
both candidates and query contained upper-case characters whose
lower-case version had more chars.


Release Notes:

- Fixed a panic in fuzzy-finder that could occur when matching with
queries containing upper-case unicode characters whose lower-case
version has more chars.

Co-authored-by: bennetbo <bennetbo@gmx.de>
2024-01-30 16:10:35 +01:00
Marshall Bowers
6c7893db35
Rename SharedUrl to SharedUri (#7084)
This PR renames `SharedUrl` to `SharedUri` to better reflect its intent.

I'm still not entirely happy with this naming, as the file paths that we
can store in here are not _really_ URIs, as they are lacking a protocol.

I want to explore changing `SharedUri` / `SharedUrl` back to alway
storing a URL and treat local filepaths differently, as it seems we're
conflating two different concerns under the same umbrella, at the
moment.

Release Notes:

- N/A
2024-01-30 09:54:23 -05:00
Ammar Arif
fb9eb6a0fc
Add taplo toml LSP (#7034)
Release Notes:

- Added `toml` LSP using [taplo](https://taplo.tamasfe.dev/)
2024-01-30 11:50:15 +02:00
Thorsten Ball
7b8bd97652
vim: implement <space> in normal mode (#7011)
This fixes #6815 by implementing `<space>` in normal mode in Vim. Turns
out that `<space>` behaves like a reverse `<backspace>` (which we
already had): it goes to the right and, if at end of line, to the next
line.

That means I had to touch `movement::right`, which is used in a few
places, but it's documentation said that it would go to the next line,
which it did *not*. So I changed the behaviour.

But I would love another pair of eyes on this, because I don't want to
break non-Vim behaviour.

Release Notes:

- Added support for `<space>` in Vim normal mode: `<space>` goes to the
right and to next line if at end of line.
([#6815](https://github.com/zed-industries/zed/issues/6815)).
2024-01-30 10:47:39 +01:00
Hans
4af542567c
Fix a spelling typo (#7059)
Release notes: N/A
2024-01-30 11:40:33 +02:00
Thorsten Ball
cddc0fbf92
vim: fix t not being repeatable with , (#7007)
This fixes `t` not being repeatable with `,` and `;` in normal mode.

Release Notes:

- Fixed `t` in Vim mode not being repeatable with `,` or `;`.

---------

Co-authored-by: Conrad <conrad@zed.dev>
2024-01-30 09:17:19 +01:00
Hans
843916d585
Fix two typos (#7056) 2024-01-30 10:17:06 +02:00
Hans
561cd37c85
Spell adjust (#7050) 2024-01-30 02:23:10 -05:00
Bennet Bo Fenner
dd74643993
gpui: Support loading image from filesystem (#6978)
This PR implements support for loading and displaying images from a
local file using gpui's `img` element.

API Changes:
- Changed `SharedUrl` to `SharedUrl::File`, `SharedUrl::Network`

Usage:
```rust
// load from network
img(SharedUrl::network(...)) // previously img(SharedUrl(...)

// load from filesystem
img(SharedUrl::file(...))
```

This will be useful when implementing markdown image support, because we
need to be able to render images from the filesystem (relative/absolute
path), e.g. when implementing markdown preview #5064.

I also added an example `image` to the gpui crate, let me know if this
is useful. Showcase:
<img width="872" alt="image"
src="https://github.com/zed-industries/zed/assets/53836821/b4310a26-db81-44fa-9a7b-61e7d0ad4349">

**Note**: The example is fetching images from [Lorem
Picsum](https://picsum.photos) ([Github
Repo](https://github.com/DMarby/picsum-photos)), which is a free
resource for fetching images in a specific size. Please let me know if
you're okay with using this in the example.
2024-01-29 21:56:51 -08:00
Robert Clover
b865db455d
Fix terminal line background being reset on each line (#7040)
Release Notes:

- Fixed #5027
- Fixed #5079

Info:

The terminal draws a rectangle for the background color of cells, but
this was being reset on every line. The effect of this was that tools
like Vim, Helix, and git-delta would only have one line with a
background color:

<img width="979" alt="Screenshot 2024-01-30 at 2 48 13 pm"
src="https://github.com/zed-industries/zed/assets/52195359/ab1873d2-0653-44c6-9406-bc2a277d9a2f">

After this change:

<img width="1011" alt="Screenshot 2024-01-30 at 2 49 45 pm"
src="https://github.com/zed-industries/zed/assets/52195359/6e4d2a70-590b-48b0-a464-4c827f55622e">
2024-01-29 21:01:02 -08:00
Marshall Bowers
372bc427bd
Fix casing of OpenZedUrl action (#7045)
This PR updates the casing of the `OpenZedUrl` action to match the [Rust
naming
guidelines](https://rust-lang.github.io/api-guidelines/naming.html).

Release Notes:

- N/A
2024-01-29 23:50:31 -05:00
Marshall Bowers
0cb8b0e451
Clean up Cargo.toml files (#7044)
This PR cleans up some inconsistencies in the `Cargo.toml` files that
were driving me crazy.

Release Notes:

- N/A
2024-01-29 23:47:20 -05:00
Vishal Bhavsar
31e9526544
vim: Add support for moving to first, middle and last visible lines (H, L, M) (#6919)
This change implements the vim
[motion](https://github.com/vim/vim/blob/master/runtime/doc/motion.txt)
commands to move the cursor to the top, middle and bottom of the visible
view. This feature is requested in
https://github.com/zed-industries/zed/issues/4941.

This change takes inspiration from
[crates/vim/src/normal/scroll.rs](https://github.com/zed-industries/zed/blob/main/crates/vim/src/normal/scroll.rs).

A note on the behavior of these commands: Because
`NeovimBackedTestContext` requires compatibility with nvim, the current
implementation causes slightly non-standard behavior: it causes the
editor to scroll a few lines. The standard behavior causes no scrolling.
It is easy enough to account for the margin by adding
`VERTICAL_SCROLL_MARGIN`. However, doing so will cause test failures due
to the disparity between nvim and zed states. Perhaps
`NeovimBackedTestContext` should have a switch to be more tolerant for
such cases.

Release Notes:

- Added support for moving to top, middle and bottom of the screen in
vim mode (`H`, `M`, and `L`)
([#4941](https://github.com/zed-industries/zed/issues/4941)).
2024-01-29 20:58:24 -07:00
Todsaporn Banjerdkit
1ab49fdbe6
Use fallback BPE if the language model doesn't have one (#6848)
Release Notes:

- Added a fallback BPE if the language model doesn't have one.

---------

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-01-29 22:42:03 -05:00
Marshall Bowers
9cb5a84b8d
Add support for loading user themes (#7027)
This PR adds support for loading user themes in Zed.

Themes are loaded from the `themes` directory under the Zed config:
`~/.config/zed/themes`. This directory should contain JSON files
containing a `ThemeFamilyContent`.

Here's an example of the general structure of a theme family file:

```jsonc
{
  "name": "Vitesse",
  "author": "Anthony Fu",
  "themes": [
    {
      "name": "Vitesse Dark Soft",
      "appearance": "dark",
      "style": {
        "border": "#252525",
        // ...
      }
    }
  ]
}
```

Themes placed in this directory will be loaded and available in the
theme selector.

Release Notes:

- Added support for loading user themes from `~/.config/zed/themes`.
2024-01-29 21:32:45 -05:00
d1y
5f4dd36a1a
Add ability to expand/collapse directories using the project_panel::Open action (#6914)
#6910

I changed the `open_file` symbol to `open`, because this is more
consistent with the original intention

Release Notes:

- Added the ability to expand/collapse directories using the
`project_panel::Open` action.
2024-01-29 18:21:23 -08:00
Amin Yahyaabadi
2c834c24a3
Build media and live-kit in test-mode on non-MacOS (#6859)
Build media and live-kit in test-mode on non-MacOS (Related to
https://github.com/zed-industries/zed/issues/5391
https://github.com/zed-industries/zed/issues/5395
https://github.com/zed-industries/zed/issues/5394)

This makes it possible to build the media and live-kit crates on
non-MacOS

Release Notes:

- N/A
2024-01-29 18:04:15 -08:00
Marshall Bowers
e69e6f5586
Add a newtype wrapper around the global ThemeRegistry (#7025)
This PR adds a newtype wrapper around the global `ThemeRegistry`.

This allows us to limit where the `ThemeRegistry` can be accessed
directly via `cx.global` et al., without going through the dedicated
methods on the `ThemeRegistry`.

Release Notes:

- N/A
2024-01-29 18:09:37 -05:00
Marshall Bowers
7656096814
Rework access to ThemeRegistry global (#7023)
This PR reworks how we access the `ThemeRegistry` global.

Previously we were making calls directly on the context, like
`cx.global::<ThemeRegistry>`. However, one problem with this is that it
spreads out the knowledge of exactly what type is stored in the global.

In order to make it easier to adjust the type we store in the context
(e.g., wrapping the `ThemeRegistry` in an `Arc`), we now call methods on
the `ThemeRegistry` itself for accessing the global.

It would also be interesting to see how we could prevent access to the
`ThemeRegistry` without going through one of these dedicated methods 🤔

Release Notes:

- N/A
2024-01-29 17:51:34 -05:00
Ben Hamment
2a2cf45e90
Improve file types list for Ruby syntax (#7022)
### Improved list of file types that require Ruby syntax highlighting

- `.ru` files: These are Rackup files and are used for configuring Rack
applications.
- `.thor` files: Used for defining Thor tasks. Thor is a toolkit for
building powerful command-line interfaces in Ruby.
- `.cap, .capfile, and Capfile`: These files are used for Capistrano
deployment configuration.
- `.jbuilder` files: Used for creating JSON responses in a Rails
application.
- `.rabl files`: RABL (Ruby API Builder Language) files are used for
defining JSON templates.
- `.rxml` files: RXML files are used for creating XML responses.
- `.builder` files: Builder templates, which are used for generating XML
and other formats.
- `.gemspec` files: These files define metadata for a RubyGem.
- `.rdoc` files: RDoc documentation files.
- `.thor` files: These files are used for defining Thor tasks.
- `.pryrc` files: Configuration files for the Pry REPL (Read-Eval-Print
Loop).
- `.simplecov`: Configuration file for SimpleCov, a code coverage
analysis tool.

#### Some examples
- <img width="393" alt="image"
src="https://github.com/zed-industries/zed/assets/7274458/4e30b03a-ae21-4bae-ab11-48aa46b4bd0b">
- <img width="501" alt="image"
src="https://github.com/zed-industries/zed/assets/7274458/07251529-bcde-42d2-8973-341679e5cbc4">
- <img width="365" alt="image"
src="https://github.com/zed-industries/zed/assets/7274458/8c9c116c-2b51-4062-b83b-83f60838d28a">
- <img width="396" alt="image"
src="https://github.com/zed-industries/zed/assets/7274458/02d591af-88df-41f0-ba52-b11fa370ba07">
- <img width="432" alt="image"
src="https://github.com/zed-industries/zed/assets/7274458/91cd760f-f56a-488a-9736-bc03a44b27cf">
- <img width="296" alt="image"
src="https://github.com/zed-industries/zed/assets/7274458/282c331e-8896-49d4-b3b6-b3edbf0c1cc5">
- <img width="316" alt="image"
src="https://github.com/zed-industries/zed/assets/7274458/a2ddfccf-43d4-4657-a764-9e8d62aa4467">
- <img width="536" alt="image"
src="https://github.com/zed-industries/zed/assets/7274458/b0fce8db-4a9e-4615-bf5d-0b6c523bcbc8">

- `path_suffixes` Also new lines the array for readability especially
for diffs.

Release Notes:

- Associated `.ru`, `.thor`, `.cap`, `.capfile`, `Capfile`, `.jbuilder`,
`.rabl`, `.rxml`, `.builder`, `.gemspec`, `.rdoc`, `.thor`, `.pryrc`,
and `.simplecov` files with Ruby.
2024-01-29 17:41:57 -05:00
Max Brunsfeld
3728da1165 collab 0.42.1 2024-01-29 13:46:45 -08:00
Conrad Irwin
c008c78e87
Fix slow query for fetching descendants of channels (#7008)
Release Notes:

- N/A

---------

Co-authored-by: Max <max@zed.dev>
2024-01-29 13:24:59 -08:00
Amin Yahyaabadi
1313402a6b
Introduce cross-platform file-watching (#6855)
This adds cross-platform file-watching via the
[Notify](https://github.com/notify-rs/notify) crate. The previous
fs-events implementation is now only used on MacOS, and on other
platforms Notify is used. The watching function interface is the same.

Related to #5391 #5395 #5394.

Release Notes:

- N/A
2024-01-29 22:18:10 +02:00
Piotr Osiewicz
b29f45ea68 Change underlying type of BufferId to NonZeroU64. 2024-01-29 20:00:47 +01:00
Piotr Osiewicz
5ab715aac9 text: Wrap BufferId into a newtype 2024-01-29 20:00:47 +01:00
Julia
941e838be9 Prevent z-index id shuffle when number of z-indicies in the scene change 2024-01-29 13:08:40 -05:00
Julia
849a1324f7 Fix hovering over elements nested inside their parents
Co-Authored-By: Conrad Irwin <conrad@zed.dev>
2024-01-29 13:08:40 -05:00
Marshall Bowers
d1a6003033
Use Git status color for icons in project panel (#6992)
This PR updates the icons in the file tree in the project panel to also
use the Git status color:

<img width="267" alt="Screenshot 2024-01-29 at 10 21 41 AM"
src="https://github.com/zed-industries/zed/assets/1486634/2f4f6e9e-8050-4f5b-851a-e407aec823a0">

Release Notes:

- Updated icons in project panel to reflect Git status
([#6991](https://github.com/zed-industries/zed/issues/6991)).
2024-01-29 10:26:30 -05:00
bestgopher
d2968866b2
rust: Update rust-analyzer repo address (#6986)
I am so sorry that I closed the
https://github.com/zed-industries/zed/pull/6980 misoperationally. Here
is a new pr.
2024-01-29 09:55:31 -05:00
Abel Chalier
a827d0dac6
fixed zig config on line_comments (#6979)
On a .zig files , the `CMD-/` keybinding don't work,
In the language config its the only language with '//' type comment that
is written in singular without array.
This fixed the problem, so i assume it was just a typo

![image](https://github.com/zed-industries/zed/assets/6186996/d7f2381a-8b21-4f50-8910-6685b81a5aec)

Release notes:
- Fixed line comment continuations and Editor::ToggleComments for Zig, Haskell and PureScript.
2024-01-29 13:34:26 +01:00
George Munyoro
49542757fd
Correctly check existence of target directory in copy_recursive function (#6875)
Fixes https://github.com/zed-industries/zed/issues/6778

Release Notes:

- Fixed issue where copy-paste for folders was not working in the
project panel
([#6778](https://github.com/zed-industries/zed/issues/6778)).
2024-01-29 12:06:02 +02:00
Piotr Osiewicz
9ef830e9bb
update: Add arch and os to release query parameters. (#6976)
This is no-op right now, but we need it for multi-platform support and
(potentially) to split the Universal Binary on mac into two
non-universal targets.
Related to: #6837 
Release Notes:
- N/A
2024-01-29 10:48:54 +01:00
Piotr Osiewicz
8fbc88b708
Load embedded fonts directly from .rdata instead of cloning (#6932)
The fonts we embed in Zed binary (Zed Sans & Zed Mono) weigh about 30Mb in total and we are cloning them several times during startup and loading of embedded assets (once explicitly in Zed and then under the hood in font-kit). Moreover, after loading we have at least 2 copies of each font in our program; one in .rdata and the other on the heap for use by font-kit.
This commit does away with that distinction (we're no longer allocating the font data) and slightly relaxes the interface of `TextSystem::add_fonts` by expecting one to pass `Cow<[u8]>` instead of `Arc<Vec<u8>>`. Additionally, `AssetSource::get` now returns `Cow<'static, [u8]>` instead of `Cow<'self, [u8]>`; all existing implementations conform with that change.

Note that this optimization takes effect only in Release builds, as the library we use for asset embedding - rust-embed - embeds the assets only in Release mode and in Dev builds it simply loads data from disk. Thus it returns `Cow<[u8]>` in it's interface. Therefore, we still copy that memory around in Dev builds, but that's not really an issue. 
This patch makes no assumptions about the build profile we're running under, that's just an intrinsic property of rust-embed.

Tl;dr: this should shave off about 30Mb of memory usage and a fair chunk (~30ms) of startup time.

Release Notes:
- Improved startup time and memory usage.
2024-01-29 10:06:57 +01:00
Marshall Bowers
5d0c144ce7
theme_importer: Define more colors in VsCodeTheme (#6960)
This PR extends the `VsCodeTheme` struct with more of the colors
available on a VS Code theme.

Release Notes:

- N/A
2024-01-28 21:55:40 -05:00
Conrad Irwin
331b6e7e6e
Support "dtx" vim key combination when "x" is immediately to the right of the cursor (#6830)
Closes #4358

The bug originates on this line:
5db7e8f89e/crates/vim/src/motion.rs (L451)

- When running "dtx" on "ˇabcx", the range to delete is 0 -> 2 ("abc")
- When running "dtx" on "abˇcx", the range to delete is 2 -> 2 ("c"), so
`new_point == point` and the function incorrectly returns `None` and "c"
is not deleted
- We need to disambiguate between the "not found" case and the "found
immediately to the right" case
- This bug does not apply to the backwards case ("dTx")

Release Notes:
- Fixed "dtx" vim key combination when "x" is immediately to the right
of the cursor (#4358)
2024-01-28 19:46:14 -07:00
Conrad Irwin
4ab1d8af62
Add support for u and U in vim visual mode (#6948)
This pull request adds support for upper / lower casing a visual
selection with `u` or `U` respectively, and resolves #6901.

I took an approach to split out the logic of the existing `ChangeCase`
action into something that could be reused for the two new actions. One
area that I could use feedback on is whether or not vim binding updates
make sense. Judging purely from the way things work from a clean install
of Vim / Neovim, I'm pretty sure that it's a bug that `u` applies an
undo in visual mode, so I think it's safe to make this change, but it
changes a behavior that some users may be used to by now in Zed.

Release Notes:

- Added support for `u` and `U` in Vim visual mode
([#6901](https://github.com/zed-industries/zed/issues/6901)).
2024-01-28 19:37:46 -07:00
Iván Molina Rebolledo
db68fc5130
Add PureScript LSP/Highlighting support (#6911)
This PR adds basic support for the language using the
`purescript-language-server`.

Release Notes:

- Added support for PureScript.
2024-01-28 17:44:50 -05:00
Kirill Bulatov
7767062c09
Add missing workspace edit capabilities (#6950)
Closes https://github.com/zed-industries/zed/issues/6916

Specification:
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#workspaceEdit
Adds a safe minimum of the capabilities that Zed supports already,
allowing rust-analyzer to send file edits on rename.

Release Notes:

- Fixed rust module rename from editor not renaming the FS entries
([6916](https://github.com/zed-industries/zed/issues/6916))
2024-01-28 23:46:10 +02:00
Marshall Bowers
444f918e51
Retrieve credentials for saved conversations (#6949)
This PR fixes an issue where credentials for saved conversations weren't
being fully retrieved, which was preventing continuing a conversation
with the assistant in a saved conversation.

Release Notes:

- Fixed continuing a saved conversation with the Zed assistant.
2024-01-28 15:25:57 -05:00
Brooks Swinnerton
52f7f2d770
Update name of function to match other implementation 2024-01-28 15:20:50 -05:00
Brooks Swinnerton
c0c0abae56
Add support for u and U in vim visual mode 2024-01-28 15:13:09 -05:00
Julia
8e523d812f
Fix #4628: npm install to a wrong location (#6742)
By default `npm install` will walk up the folder tree checking for a
folder that contains either a package.json file, or a node_modules
folder. If such a thing is found, then that is treated as the effective
"current directory" for the purpose of running npm commands.
This caused npm dependencies for language servers sometimes to be
installed in the wrong folder, described in #4628.
Adding `--prefix ./` to `npm install` forces
node_runtime.npm_install_packages to install packages in provided path
even if node_modules dir exists somewhere up the filesystem tree from
installation path.
2024-01-28 14:10:10 -05:00
Ikko Eltociear Ashimine
b213458803
Fix typo in copilot.rs (#6933)
specifcially -> specifically

Release Notes:

- N/A
2024-01-28 19:56:50 +02:00
ge
42e605a766 fix: adding prefix arg to npm subcommands 2024-01-28 19:09:50 +02:00
Marshall Bowers
027f055841
Update casing of "OpenAI" in identifiers to match Rust conventions (#6940)
This PR updates the casing of "OpenAI" when used in Rust identifiers to
match the [Rust naming
guidelines](https://rust-lang.github.io/api-guidelines/naming.html):

> In `UpperCamelCase`, acronyms and contractions of compound words count
as one word: use `Uuid` rather than `UUID`, `Usize` rather than `USize`
or `Stdin` rather than `StdIn`.

Release Notes:

- N/A
2024-01-28 12:01:10 -05:00
Piotr Osiewicz
f7b6bfefe6
chore: Remove rerun-if-changed clause that might cause spurious rebuilds (#4193)
Something is stomping over the timestamp of generated scene.h right
after the build script finishes:
`Dirty gpui v0.1.0 (/Users/someonetoignore/work/zed/zed/crates/gpui):
the file target/debug/build/gpui-ca04eedfe8d0e13c/out/scene.h has
changed (1705922004.637000680s, 1s after last build at
1705922003.507431315s)`
^ That's an output of `-v` flag added to either `cargo run` or `cargo
build`.
This comes up when you do `cargo build` followed by `cargo run` or
another `cargo build`; the artifact is not getting reused, even though
it should be possible?
Release Notes:
- N/A
2024-01-28 15:35:53 +01:00
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
Brian Strauch
5b9f15e075 add test_data 2024-01-26 20:02:59 -08: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
Brian Strauch
f369e9a48b vim: fix dtx when x is immediately to the right 2024-01-26 16:58:48 -08: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