Commit Graph

157 Commits

Author SHA1 Message Date
Vitaly Slobodin
43be375c76
ruby: Fix solargraph completion highlighting (#11825)
Hi. This pull request fixes a small error with `solargraph` completions
to make them more detailed. It removes the nested match expression to
resolve the problem with highlighting the completion items and their
signatures with the return type as well. Thanks.

See screenshots below.

Release Notes:

- N/A

| Before  | After |
| ------------- | ------------- |
| ![CleanShot 2024-05-14 at 23 23
00@2x](https://github.com/zed-industries/zed/assets/1894248/4ea1fa41-1189-4607-8aea-547c27229a18)
| ![CleanShot 2024-05-14 at 23 29
30@2x](https://github.com/zed-industries/zed/assets/1894248/3c7be39a-2c7b-4662-8519-8c258c049cfa)
|
2024-05-14 18:54:19 -04:00
claytonrcarter
748cd38d77
php: Highlight PHPDoc comments (#11695)
This adds highlighting of phpdoc tags and PHP types to phpdoc comments,
using
[tree-sitter-phpdoc](https://github.com/claytonrcarter/tree-sitter-phpdoc)
(maintained by yours me, and also in use by neovim).

<table>
<tr>
<td>
<strong>Before</strong>
<img
src="https://github.com/zed-industries/zed/assets/1420419/bae4c502-8a2c-4399-893f-fcff4e5797b6">
</td>
<td>
<strong>After</strong>
<img
src="https://github.com/zed-industries/zed/assets/1420419/8848e9fb-61a0-4938-a118-7041da9589c0">
</td>
</tr>
</table>


Release Notes:

- N/A
2024-05-14 15:48:14 -04:00
Marshall Bowers
652748b0c9
gleam: Bump to v0.1.2 (#11803)
This PR bumps the Gleam extension to v0.1.2.

Changes:

- #11476
- #11801

Release Notes:

- N/A
2024-05-14 10:53:43 -04:00
Marshall Bowers
77f0d35684
gleam: Add gleam test task (#11801)
This PR adds a task for running `gleam test`.

Release Notes:

- N/A
2024-05-14 10:45:14 -04:00
Marshall Bowers
b01878aadf
Add xtask for finding crates with missing licenses (#11776)
This PR adds a new `cargo xtask licenses` command for finding crates
with missing license files.

A number of crates were uncovered that were missing a license file, and
have had the appropriate license file added.

Release Notes:

- N/A
2024-05-13 18:52:12 -04:00
Marshall Bowers
335636c42e
ruby: Bump to v0.0.2 (#11769)
This PR bumps the Ruby extension to v0.0.2.

Changes:

- #11768

Release Notes:

- N/A
2024-05-13 17:32:43 -04:00
Vitaly Slobodin
24cc4c69f8
ruby: Add ruby-lsp as an experimental language server (#11768)
Adds [ruby-lsp](https://shopify.github.io/ruby-lsp/) as an alternative
LS for Ruby language.
While support for fully functional `ruby-lsp` is limited due to some
limitations (see https://github.com/zed-industries/zed/pull/8613) I
think it's OK to add it but disable by default. Thanks!

Resolves #4834.

Release Notes:

- N/A

### Some screenshots

Completion support
![CleanShot 2024-05-13 at 22 58
23@2x](https://github.com/zed-industries/zed/assets/1894248/d5047baa-c58f-465d-ae31-a7045aa56adf)

Symbol search
![CleanShot 2024-05-13 at 23 03
59@2x](https://github.com/zed-industries/zed/assets/1894248/0cb6320a-b000-4a0c-85eb-f8d1a8f6936e)

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-05-13 17:22:01 -04:00
Marshall Bowers
76139330e3
vue: Bump to v0.0.2 (#11747)
This PR bumps the Vue extension to v0.0.2.

Changes:

- #11743

Release Notes:

- N/A
2024-05-13 08:49:40 -04:00
Thorsten Ball
c769d58b4c
vue: Fix Vue.js language server not starting (#11743)
This fixes #10871.

The introduction of #11412 broke Vue.js language support, since it made
Zed rely more heavily on correct language name -> language ID mappings,
which the Vue.js extension didn't have.

Release Notes:

- N/A
2024-05-13 14:38:14 +02:00
Marshall Bowers
fc584017d1
ruby: Add embedded_template grammar (#11677)
This PR adds the `embedded_template` grammar to the Ruby extension, as
we need it present for ERB.

Release Notes:

- N/A
2024-05-10 16:08:46 -04:00
Marshall Bowers
19994fc190
ruby: Move injections to extension (#11664)
This PR moves the Ruby injections added in #8796 to the right location,
since Ruby support was extracted into an extension in #11360.

Release Notes:

- N/A
2024-05-10 12:06:15 -04:00
Vitaly Slobodin
400e938997
Extract Ruby extension (#11360)
This PR extracts Ruby and ERB support into an extension and removes the
built-in Ruby and Ruby support from Zed.

As part of this, the new extension is prepared for adding support for
the `Ruby LSP` which has some blockers. See
https://github.com/zed-industries/zed/pull/8613 I was thinking of adding
an initial support for Ruby LSP but I think it would be better to start
with extracting the Ruby extension for now.

The implementation, as the 1st step, matches the bundled version but
with 3 differences:

1. Added signature output to the completion popup. See my comment below.
![CleanShot 2024-05-04 at 09 17
37@2x](https://github.com/zed-industries/zed/assets/1894248/486b7a48-ea0c-44ce-b0c9-9f8f5d3ad42d)

3. Use the shell environment for starting the `solargraph` executable.
See my comment below.
4. Bumped the tree sitter version for Ruby to the latest available
version.

Additionally, I plan to tweak this extension a bit in the future but I
think we should do this bit by bit. Thanks!

Release Notes:

- Removed built-in support for Ruby, in favor of making it available as
an extension.

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-05-10 11:53:11 -04:00
Marshall Bowers
4eca7875ae
gleam: Add runnable tests (#11476)
This PR adds basic runnable tests for Gleam.

Functions with names ending in `_test` will be available for running:


https://github.com/zed-industries/zed/assets/1486634/9f3f81e5-a7fa-425c-a5a2-d615062486bb

Release Notes:

- N/A
2024-05-06 22:26:36 -04:00
Marshall Bowers
056c785f4e
zig: Bump to v0.1.2 (#11447)
This PR bumps the Zig extension to v0.1.2.

Changes:

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

Release Notes:

- N/A
2024-05-06 12:47:16 -04:00
Marshall Bowers
970a5957cc
elixir: Bump to v0.0.4 (#11446)
This PR bumps the Elixir extension to v0.0.4.

Changes:

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

Release Notes:

- N/A
2024-05-06 12:41:50 -04:00
vali-pnt
b25eb9afe2
zig: Fix syntax and file types (#11409)
Fixed autoclosing and made it recognize all ZON (Zig Object Notation)
files.

- Fixed single and double quotes not autoclosing for zig
- Fixed ZON file recognition
- Removed angle brackets autoclosing in zig as they are not used

Release Notes:

- N/A
2024-05-06 12:33:44 -04:00
Andrei Zvonimir Crnković
bc5f82d40c
elixir: Fix next-ls binary name (#11363)
This is to followup #11318, and the comment from @mhanberg.

Release Notes:

- N/A
2024-05-06 10:41:23 -04:00
José Olórtegui
6e2be283dd
emmet: Support more languages (#10779)
Hey guys! `emmet-language-server` author here. Thank you so much for the
amazing editor!

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

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

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

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

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

Fixes #10654.

Release Notes:

- N/A
2024-05-06 12:09:19 +02:00
Marshall Bowers
ff56ca7280
toml: Bump to v0.1.1 (#11359)
This PR bumps the TOML extension to v0.1.1.

Changes:

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

Release Notes:

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

Changes:

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

Release Notes:

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

- N/A


---

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

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

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

---------

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

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

Release Notes:

- N/A
2024-05-03 11:03:25 -04:00
Marshall Bowers
d61c47d2a9
elixir: Bump to v0.0.2 (#11303)
This PR bumps the Elixir extension to v0.0.2.

Changes:

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

Release Notes:

- N/A
2024-05-02 11:26:04 -04:00
Marshall Bowers
8b284331a3
elixir: Respect LSP settings for elixir-ls (#11302)
This PR updates the Elixir extension to respect the LSP settings for
`elixir-ls`:

```json
"lsp": {
  "elixir-ls": {
    "settings": {
      "dialyzerEnabled": false
    }
  }
}
```

```
Received workspace/didChangeConfiguration
Received client configuration via workspace/didChangeConfiguration
%{"dialyzerEnabled" => false}
Loaded DETS databases in 33ms
Loaded DETS databases in 10ms
Compiling 65 files (.ex)
```

Release Notes:

- N/A
2024-05-02 11:16:09 -04:00
Marshall Bowers
544bd490ac
Extract Elixir extension (#10948)
This PR extracts Elixir support into an extension and removes the
built-in Elixir support from Zed.

As part of this, [Lexical](https://github.com/lexical-lsp/lexical) has
been added as an available language server for Elixir.

Since the Elixir extension provides three different language servers,
you'll need to use the `language_servers` setting to select the one you
want to use:

#### Elixir LS

```json
{
  "languages": {
    "Elixir": {
      "language_servers": [ "elixir-ls", "!next-ls", "!lexical", "..."]
    }
  }
}
```

#### Next LS

```json
{
  "languages": {
    "Elixir": {
      "language_servers": [ "next-ls", "!elixir-ls", "!lexical", "..."]
    }
  }
}
```

#### Lexical

```json
{
  "languages": {
    "Elixir": {
      "language_servers": [ "lexical", "!elixir-ls", "!next-ls", "..."]
    }
  }
}
```

These can either go in your user settings or your project settings.

Release Notes:

- Removed built-in support for Elixir, in favor of making it available
as an extension.
2024-04-25 13:59:14 -04:00
Marshall Bowers
bd77232f65
dart: Bump to v0.0.2 (#10940)
This PR bumps the Dart extension to v0.0.2.

Changes:

- https://github.com/zed-industries/zed/pull/8347
- https://github.com/zed-industries/zed/pull/10552

Release Notes:

- N/A
2024-04-24 13:03:56 -04:00
Marshall Bowers
d0a5dbd8cb
terraform: Sync Cargo.toml version with extension.toml version (#10937)
This PR syncs the `Cargo.toml` version with the `extension.toml`
version.

We should try to keep these in sync.

Release Notes:

- N/A
2024-04-24 11:42:18 -04:00
Marshall Bowers
25981550d5
Extract Deno extension (#10912)
This PR extracts Deno support into an extension and removes the built-in
Deno support from Zed.

When using the Deno extension, you'll want to add the following to your
settings to disable the built-in TypeScript and ESLint language servers
so that they don't conflict with Deno's functionality:

```json
{
  "languages": {
    "TypeScript": {
      "language_servers": ["deno", "!typescript-language-server", "!eslint", "..."]
    },
    "TSX": {
      "language_servers": ["deno", "!typescript-language-server", "!eslint", "..."]
    }
  }
}

```

Release Notes:

- Removed built-in support for Deno, in favor of making it available as
an extension.
2024-04-23 20:44:11 -04:00
Joseph T. Lyons
f6eaa8b00f
Clean up whitespace (#10755)
I saved the `file_types.json` file and got a diff because it had some
trailing whitespace. I ran
[`lineman`](https://github.com/JosephTLyons/lineman) on the codebase.
I've done this before, but this time, I've added in the following
settings to our `.zed` local settings, to make sure every future save
respects our desire to have consistent whitespace formatting.

```json
"remove_trailing_whitespace_on_save": true,
"ensure_final_newline_on_save": true
```

Release Notes:

- N/A
2024-04-23 13:31:21 -04:00
Max Brunsfeld
247b0317b9
Add bracket queries for HCL, Terraform (#10785)
Release Notes:

- N/A
2024-04-19 10:59:14 -07:00
Marshall Bowers
1127b1a0de
glsl: Bump to v0.1.0 (#10734)
This PR bumps the GLSL extension to v0.1.0.

Changes:

- #10694

Release Notes:

- N/A
2024-04-18 11:57:21 -04:00
jansol
c55055599a
glsl: Add glsl_analyzer (LSP) (#10694)
<img width="691" alt="image"
src="https://github.com/zed-industries/zed/assets/2588851/c5e02d12-d1e4-4407-971c-72de7e6599f0">

@mikayla-maki the extension lists you as the original author.

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-04-18 11:23:11 -04:00
Marshall Bowers
3c805d4c6b
prisma: Bump to v0.0.2 (#10689)
This PR bumps the Prisma extension to v0.02.

Changes:

- The Prisma extension now provides its own `tab_size` setting
([#10296](https://github.com/zed-industries/zed/pull/10296))

Release Notes:

- N/A
2024-04-17 12:40:01 -04:00
Marshall Bowers
545319bced
terraform: Bump to v0.0.2 (#10653)
This PR bumps the Terraform extension to v0.0.2.

Changes:

- #10641

Release Notes:

- N/A
2024-04-16 16:08:58 -04:00
Marshall Bowers
0b2de51c37
csharp: Bump to v0.0.2 (#10651)
This PR bumps the C# extension to v0.0.2.

Changes:

- #10638

Release Notes:

- N/A
2024-04-16 15:49:16 -04:00
Marshall Bowers
9a680dafc3
clojure: Bump to v0.0.2 (#10650)
This PR bumps the Clojure extension to v0.0.2.

Changes:

- #10636

Release Notes:

- N/A
2024-04-16 15:37:54 -04:00
Marshall Bowers
4c35cfaa69
gleam: Bump to v0.1.1 (#10648)
This PR bumps the Gleam extension to v0.1.1.

Changes:

- #10635

Release Notes:

- N/A
2024-04-16 15:21:14 -04:00
Marshall Bowers
52591905fb lua: Bump to v0.0.2
The previous v0.0.3 bump was in error, as we hadn't published a v0.0.2 yet.
2024-04-16 14:27:05 -04:00
Marshall Bowers
d2e83cc148
lua: Bump to v0.0.3 (#10646)
This PR bumps the Lua extension to v0.0.3.

Changes:

- #10639
- #10642

Release Notes:

- N/A
2024-04-16 14:12:41 -04:00
Marshall Bowers
f633460a8d
zig: Bump to v0.1.1 (#10645)
This PR bumps the Zig extension to v0.1.1.

Changes:

- #10559
- #10634

Release Notes:

- N/A
2024-04-16 14:05:12 -04:00
Peter Tripp
9470a52b5d
lua: Fix broken LuaLS download on x64 (#10642)
The changes in #10437 accidentally switched 'x64' to 'x86_64' which
breaks installs on linux x64, macos x64 and windows x64. This yields the
following error:

```
[2024-04-16T12:58:01-04:00 ERROR project] failed to start language server "lua-language-server": no asset found matching "lua-language-server-3.7.4-darwin-x86_64.tar.gz"
[2024-04-16T12:58:01-04:00 ERROR project] server stderr: Some("")
```

It's trying to download: 
`lua-language-server-3.7.4-darwin-x86_64.tar.gz`
which should be
`lua-language-server-3.7.4-darwin-x64.tar.gz`

See [LuaLS release
page](https://github.com/LuaLS/lua-language-server/releases/tag/3.6.25).

CC: @maxbrunsfeld

lua.rs before ef4c70c:

c6028f6651/crates/languages/src/lua.rs (L35)

lua.rs after:

5d7148bde1/extensions/lua/src/lua.rs (L49)

Release Notes:

- N/A
2024-04-16 13:48:45 -04:00
Marshall Bowers
fa0302f156
terraform: Don't cache user-installed terraform-ls (#10641)
This PR updates the Terraform extension to not cache the binary when it
is using the one on the $PATH.

Release Notes:

- N/A
2024-04-16 13:40:13 -04:00
Marshall Bowers
5d7148bde1
lua: Don't cache user-installed lua-language-server (#10639)
This PR updates the Lua extension to not cache the binary when it is
using the one on the $PATH.

Release Notes:

- N/A
2024-04-16 13:22:42 -04:00
Marshall Bowers
58991f332b
csharp: Don't cache user-installed OmniSharp (#10638)
This PR updates the C# extension to not cache the binary when it is
using the one on the $PATH.

Release Notes:

- N/A
2024-04-16 13:22:36 -04:00
Marshall Bowers
9c569c8d95
zig: Rename cached_binary to cached_binary_path (#10637)
This PR renames the `cached_binary` field on the `ZigExtension` back to
`cached_binary_path` to make it match the other extensions.

Release Notes:

- N/A
2024-04-16 13:18:21 -04:00
Marshall Bowers
1ba0bf925b
clojure: Don't cache user-installed clojure-lsp (#10636)
This PR updates the Clojure extension to not cache the binary when it is
using the one on the $PATH.

Release Notes:

- N/A
2024-04-16 13:12:08 -04:00
Marshall Bowers
53105ddd16
gleam: Don't cache user-installed gleam (#10635)
This PR updates the Gleam extension to not cache the binary when it is
using the one on the $PATH.

Release Notes:

- N/A
2024-04-16 13:11:58 -04:00
Thorsten Ball
210f8ebfed
zig: Do not cache user-installed zls (#10634)
This was a bug introduced when moving to extensions: when we find a
binary in the user's project environment, we shouldn't cache that
globally since it might not work for other projects.

See also: https://github.com/zed-industries/zed/pull/10559

Release Notes:


- N/A
2024-04-16 19:05:11 +02:00
Abdullah Alsigar
7a112b22ac
dart: Use upstream tree-sitter-dart (#10552)
Update `tree-sitter-dart` to the upstream package, there was an issue
building Rust package which is resolved now.


Release Notes:


- N/A
2024-04-15 17:32:35 -04:00
Thorsten Ball
da0d968a2c
zig: Use env if using zls from shell env (#10559)
This fixes the problem of the Zig extension picking up `zls` from the
shell env but `zls` then failing to launch because it cannot find `zig`.

Scenario in which this happens:
- `.envrc` in a project that sets `$PATH` up
- in that `$PATH` there's `zls` and `zig`
- Zed is started from Dock
- Project is opened
- Shell env from project directory is loaded and used to get to `zls`
- `zls` is then started, without that environment set on the process
- `zls` cannot find `zig`

Release Notes:

- N/A

Co-authored-by: Marshall <marshall@zed.dev>
2024-04-15 17:39:07 +02:00
Max Brunsfeld
5e4f707951 Change authors of lua extension 2024-04-12 15:15:40 -07:00
Marshall Bowers
ad8dd1771a
lua: Fix extension version (#10490)
This PR fixes the Lua extension version to be v0.0.1 instead of v0.1.0
for the initial release.

Release Notes:

- N/A
2024-04-12 15:38:26 -04:00
Marshall Bowers
f3a78f613a
Extract Vue extension (#10486)
This PR extracts Vue support into an extension and removes the built-in
C# support from Zed.

Release Notes:

- Removed built-in support for Vue, in favor of making it available as
an extension. The Vue extension will be suggested for download when you
open a `.vue` file.

---------

Co-authored-by: Max <max@zed.dev>
2024-04-12 14:39:27 -04:00
Marshall Bowers
a4d6c5da7c
toml: Bump to v0.1.0 (#10482)
This PR bumps the TOML extension to v0.1.0.

This version of the extension has been updated to use v0.0.6 of the
`zed_extension_api`.

Release Notes:

- N/A
2024-04-12 12:39:43 -04:00
Marshall Bowers
e0e1103228
zig: Bump to v0.1.0 (#10481)
This PR bumps the Zig extension to v0.1.0.

This version of the extension has been updated to use v0.0.6 of the
`zed_extension_api`.

It also adds support for treating `.zig.zon` files as Zig files
(#10012).

Release Notes:

- N/A
2024-04-12 12:30:29 -04:00
Marshall Bowers
65c9e7d3d1
php: Bump to v0.0.2 (#10480)
This PR bumps the PHP extension to v0.0.2.

This version of the PHP extension adds the `language_ids` mappings from
#10053.

Release Notes:

- N/A
2024-04-12 12:19:01 -04:00
Marshall Bowers
b5b872656b
Extract Terraform extension (#10479)
This PR extracts Terraform support into an extension and removes the
built-in Terraform support from Zed.

Release Notes:

- Removed built-in support for Terraform, in favor of making it
available as
an extension. The Terraform extension will be suggested for download
when you
open a `.tf`, `.tfvars`, or `.hcl` file.
2024-04-12 11:49:49 -04:00
Max Brunsfeld
8d7f5eab79
Extract Ocaml language support into an extension (#10450)
Release Notes:

- Extracted Ocaml language support into an extension

---------

Co-authored-by: Marshall <marshall@zed.dev>
2024-04-11 15:20:19 -07:00
Max Brunsfeld
253aa28375
Extract Scheme and Racket language support into extensions (#10442)
Release Notes:

- Extracted Scheme and Racket language support into extensions.

---------

Co-authored-by: Marshall <marshall@zed.dev>
2024-04-11 12:45:46 -07:00
Max Brunsfeld
176f440158
Extract lua language support into an extension (#10437)
Release Notes:

- Extracted lua language support into an extension, and improved Lua
highlighting and completion label styling.

---------

Co-authored-by: Marshall <marshall@zed.dev>
2024-04-11 11:32:10 -07:00
Sai Gokula Krishnan
c6028f6651
Fix Dart syntax highlighting issue (#8347)
Release Notes:
* Improved Dart syntax highlighting
([#8151](https://github.com/zed-industries/zed/pull/8347#8151))

Before:
<img width="1246" alt="Before"
src="https://github.com/zed-industries/zed/assets/25414681/d9143fe8-c474-40bb-afbd-56fef16edab3">

After:
<img width="1249" alt="After"
src="https://github.com/zed-industries/zed/assets/25414681/4b103c35-fb24-4693-8b9e-3dd494036c9f">


(Shameless plug, since I build the theme)
Theme: The Dark Side
2024-04-11 11:30:36 -07:00
Max Brunsfeld
c38f72d194
Extract GLSL language support into an extension (#10433)
Release Notes:

- Extracted GLSL language support into an extension.

---------

Co-authored-by: Marshall <marshall@zed.dev>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-04-11 13:52:10 -04:00
Max Brunsfeld
bcd2ca6196
Extract Elm language into an extension (#10432)
Release Notes:

- Extracted Elm language support into an extension

Co-authored-by: Marshall <marshall@zed.dev>
2024-04-11 10:23:49 -07:00
Marshall Bowers
2d21f6debf
emmet: Bump to v0.0.2 (#10426)
This PR bumps the Emmet extension to v0.0.2.

This version of the Emmet extension adds Emmet support for PHP and ERB
files.

Release Notes:

- N/A
2024-04-11 11:56:25 -04:00
Marshall Bowers
195f9d9b24
haskell: Bump to v0.1.0 (#10378)
This PR bumps the Haskell extension to v0.1.0.

This version of the Haskell extension brings improved labels for
symbols:

<img width="569" alt="Screenshot 2024-04-10 at 3 38 01 PM"
src="https://github.com/zed-industries/zed/assets/1486634/759fa52f-7b85-4395-abfd-070138201162">

Release Notes:

- N/A
2024-04-10 15:42:46 -04:00
Marshall Bowers
3a6e0bb9b6
gleam: Bump to v0.1.0 (#10376)
This PR bumps the Gleam extension to v0.1.0.

This version of the Gleam extension brings improved completion labels:

<img width="572" alt="Screenshot 2024-04-10 at 3 30 25 PM"
src="https://github.com/zed-industries/zed/assets/1486634/afca4563-c520-4f01-949f-2c8095769751">

Release Notes:

- N/A
2024-04-10 15:33:22 -04:00
Marshall Bowers
b6857ca469
Use v0.0.6 of the zed_extension_api for extensions that need it (#10324)
This PR updates the extensions dependent on v0.0.6 of the
`zed_extension_api` crate to use the now-published version on crates.io
instead of a path dependency.

The impacted extensions are:

- `dart`
- `gleam`
- `haskell`
- `svelte`


Release Notes:

- N/A
2024-04-09 10:57:26 -04:00
Marshall Bowers
a4566c36a3
gleam: Strip newlines in completion details returned from language server (#10304)
This PR updates the Gleam extension to strip out newlines in the
completion details returned from the language server.

These newlines were causing the completion menu to compute a large
height for each item, resulting in lots of empty space in the completion
menu:

<img width="878" alt="Screenshot 2024-04-08 at 8 53 29 PM"
src="https://github.com/zed-industries/zed/assets/1486634/383c52ec-e5cb-4496-ae4c-28744b4ecaf5">

The approach to stripping newlines allocates a bit more than I would
like.

It would be good to see if it is possible for the Gleam language server
to not send us these newlines in the first place.

Release Notes:

- N/A
2024-04-08 21:43:18 -04:00
Marshall Bowers
7c5bc3c26f
Add the ability for extensions to provide language settings (#10296)
This PR adds the ability for extensions to provide certain language
settings via the language `config.toml`.

These settings are then merged in with the rest of the settings when the
language is loaded from the extension.

The language settings that are available are:

- `tab_size`
- `hard_tabs`
- `soft_wrap`

Additionally, for bundled languages we moved these settings out of the
`settings/default.json` and into their respective `config.toml`s .

For languages currently provided by extensions, we are leaving the
values in the `settings/default.json` temporarily until all released
versions of Zed are able to load these settings from the extension.

---

Along the way we ended up refactoring the `Settings::load` method
slightly, introducing a new `SettingsSources` struct to better convey
where the settings are being loaded from.

This makes it easier to load settings from specific locations/sets of
locations in an explicit way.

Release Notes:

- N/A

---------

Co-authored-by: Max <max@zed.dev>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2024-04-08 19:17:12 -04:00
Marshall Bowers
d009d84ead
Add support for using a language server with multiple languages (#10293)
This PR updates the `extension.toml` to allow specifying multiple
languages for a language server to work with.

The `languages` field takes precedence over `language`. In the future
the `language` field will be removed.

As part of this, the Emmet extension has been extended with support for
PHP and ERB.

Release Notes:

- N/A

---------

Co-authored-by: Max <max@zed.dev>
2024-04-08 14:24:56 -04:00
Marshall Bowers
c851e6edba
Add language_server_workspace_configuration to extension API (#10212)
This PR adds the ability for extensions to implement
`language_server_workspace_configuration` to provide workspace
configuration to the language server.

We've used the Dart extension as a motivating example for this, pulling
it out into an extension in the process.

Release Notes:

- Removed built-in support for Dart, in favor of making it available as
an extension. The Dart extension will be suggested for download when you
open a `.dart` file.

---------

Co-authored-by: Max <max@zed.dev>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2024-04-05 17:04:07 -04:00
Marshall Bowers
4a325614f0
Add label_for_symbol to extension API (#10179)
This PR adds `label_for_symbol` to the extension API.

As a motivating example, we implemented `label_for_symbol` for the
Haskell extension.

Release Notes:

- N/A

Co-authored-by: Max <max@zed.dev>
2024-04-04 15:38:38 -04:00
Marshall Bowers
d306b531c7
Add label_for_completion to extension API (#10175)
This PR adds the ability for extensions to implement
`label_for_completion` to customize completions coming back from the
language server.

We've used the Gleam extension as a motivating example, adding
`label_for_completion` support to it.

Release Notes:

- N/A

---------

Co-authored-by: Max <max@zed.dev>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2024-04-04 13:56:04 -04:00
Piotr Osiewicz
79272b75e3
extensions: Add author to the manifest (#10134)
Related to #9910 
Also, this PR will add a release note, since I've missed that in the
original PR.
Release Notes:

- Added Emmet language extension to the extension store.
2024-04-03 20:18:31 +02:00
Piotr Osiewicz
0ddec2753a
Add emmet-language-server support (#9910)
Note that I want to move this into an extension before merging.

Fixes: #4992 

Release Notes:

- Added Emmet snippets support
2024-04-03 19:54:53 +02:00
Marshall Bowers
49c53bc0ec
Extract HTML support into an extension (#10130)
This PR extracts HTML support into an extension and removes the built-in
HTML support from Zed.

Release Notes:

- Removed built-in support for HTML, in favor of making it available as
an extension. The HTML extension will be suggested for download when you
open a `.html`, `.htm`, or `.shtml` file.
2024-04-03 12:42:36 -04:00
Marshall Bowers
db5d53d1d1
clojure: Add license file (#10127)
This PR adds a symlink to the `LICENSE-APACHE` file for the Clojure
extension.

I knew I was forgetting something 😓

Release Notes:

- N/A
2024-04-03 12:04:14 -04:00
Marshall Bowers
6121bfc5a4
Extract Clojure support into an extension (#10088)
This PR extracts Clojure support into an extension and removes the
built-in Clojure support from Zed.

Release Notes:

- Removed built-in support for Clojure, in favor of making it available
as an extension. The Clojure extension will be suggested for download
when you open a `.clj` or other Clojure-related files.

---------

Co-authored-by: Max <max@zed.dev>
2024-04-02 13:47:03 -04:00
Marshall Bowers
39cc3c0778
Allow extensions to provide data for language_ids (#10053)
This PR makes it so extensions can provide values for the `language_ids`
method on the `LspAdapter` trait.

These are provided as data in the `language_servers` section of the
`extension.toml`, like so:

```toml
[language_servers.intelephense]
name = "Intelephense"
language = "PHP"
language_ids = { PHP = "php"}
```

Release Notes:

- N/A

Co-authored-by: Max <max@zed.dev>
2024-04-01 17:01:11 -04:00
Marshall Bowers
8b586ef8e7
Add new make-file-executable API for extensions (#10047)
This PR adds a new function, `make-file-executable`, to the Zed
extension API that can be used to mark a given file as executable
(typically the language server binary).

This is available in v0.0.5 of the `zed_extension_api` crate.

We also reworked how we represent the various WIT versions on disk to
make it a bit clearer what the version number entails.

Release Notes:

- N/A

---------

Co-authored-by: Max <max@zed.dev>
2024-04-01 15:28:24 -04:00
Morgan Gallant
351693ccdf
zig: Add support for .zig.zon files (#10012)
Release Notes:

- N/A

Signed-off-by: Morgan Gallant <morgan@morgangallant.com>
2024-04-01 10:02:09 -04:00
Marshall Bowers
79b3b0c8ff
zig: Remove folds.scm (#9975)
This PR removes the `folds.scm` file from the `zig` extension, as Zed
doesn't make use of it.

Release Notes:

- N/A
2024-03-29 18:07:44 -04:00
Marshall Bowers
b0fb02e4be
Extract Erlang support into an extension (#9974)
This PR extracts Erlang support into an extension and removes the
built-in Erlang support from Zed.

Tested using a Nix shell:

```
nix-shell -p erlang-ls
```

Release Notes:

- Removed built-in support for Erlang, in favor of making it available
as an extension. The Erlang extension will be suggested for download
when you open a `.erl` or `.hrl` file.
2024-03-29 18:03:38 -04:00
Marshall Bowers
35e1229fbb
toml: Sync Cargo.toml version with extension.toml (#9973)
This PR syncs the version number in the `Cargo.toml` with the one in
`extension.toml` for the `toml` extension, since they had gotten
out-of-sync.

Release Notes:

- N/A
2024-03-29 16:59:46 -04:00
Kyle Kelley
d77e553466
File context for assistant panel (#9712)
Introducing the Active File Context portion of #9705. When someone is in
the assistant panel it now includes the active file as a system message
on send while showing them a nice little display in the lower right:


![image](https://github.com/zed-industries/zed/assets/836375/9abc56e0-e8f2-45ee-9e7e-b83b28b483ea)

For this iteration, I'd love to see the following before we land this:

* [x] Toggle-able context - user should be able to disable sending this
context
* [x] Show nothing if there is no context coming in
* [x] Update token count as we change items
* [x] Listen for a more finely scoped event for when the active item
changes
* [x] Create a global for pulling a file icon based on a path. Zed's
main way to do this is nested within project panel's `FileAssociation`s.
* [x] Get the code fence name for a Language for the system prompt
* [x] Update the token count when the buffer content changes

I'm seeing this PR as the foundation for providing other kinds of
context -- diagnostic summaries, failing tests, additional files, etc.

Release Notes:

- Added file context to assistant chat panel
([#9705](https://github.com/zed-industries/zed/issues/9705)).

<img width="1558" alt="image"
src="https://github.com/zed-industries/zed/assets/836375/86eb7e50-3e28-4754-9c3f-895be588616d">

---------

Co-authored-by: Conrad Irwin <conrad@zed.dev>
Co-authored-by: Nathan <nathan@zed.dev>
Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
2024-03-29 13:55:01 -07:00
Marshall Bowers
df3050dac1
Extract C# support into an extension (#9971)
This PR extracts C# support into an extension and removes the built-in
C# support from Zed.

Tested using a Nix shell:

```
nix-shell -p dotnet-sdk omnisharp-roslyn
```

Release Notes:

- Removed built-in support for C#, in favor of making it available as an
extension. The C# extension will be suggested for download when you open
a `.cs` file.
2024-03-29 16:38:27 -04:00
Marshall Bowers
e252f90e30
Extract PHP support into an extension (#9966)
This PR extracts PHP support into an extension and removes the built-in
PHP support from Zed.

There's a small workaround necessary in order for us to provide the
`language_ids` on the `LspAdapter` that are needed for the language
server to run properly. Eventually we'll want to build this into the
extension API, but for now we're just hard-coding it on the host side.

Release Notes:

- Removed built-in support for PHP, in favor of making it available as
an extension. The PHP extension will be suggested for download when you
open a `.php` file.
2024-03-29 14:51:54 -04:00
Marshall Bowers
d074586fbf
Extract TOML support into an extension (#9940)
This PR extracts TOML support into an extension and removes the built-in
TOML support from Zed.

There's a small workaround necessary in order for us to set the file
permissions on the `taplo` binary so that it can be run. Eventually
we'll want to build this into the extension API, but for now we're just
hard-coding it on the host side.

Release Notes:

- Removed built-in support for TOML, in favor of making it available as
an extension. The TOML extension will be suggested for download when you
open a `.toml` or `Cargo.lock` file.
2024-03-28 18:40:12 -04:00
Marshall Bowers
90cf73b746
Update extension descriptions (#9939)
This PR updates the descriptions of some of the extensions to match the
others.

Release Notes:

- N/A
2024-03-28 17:14:55 -04:00
Marshall Bowers
ff685b299d
Extract Zig support into an extension (#9893)
This PR extracts Zig support into an extension and removes the built-in
Zig support from Zed.

There's a small workaround necessary in order for us to set the file
permissions on the `zls` binary so that it can be run. Eventually we'll
want to build this into the extension API, but for now we're just
hard-coding it on the host side.

Release Notes:

- Removed built-in support for Zig, in favor of making it available as
an extension. The Zig extension will be suggested for download when you
open a `.zig` file.
2024-03-27 20:56:30 -04:00
Marshall Bowers
687d2a41d6
gleam: Bump to v0.0.2 (#9883)
This PR bumps the Gleam extension to v0.0.2.

Release Notes:

- N/A
2024-03-27 14:47:37 -04:00
Marshall Bowers
95699a07f4
gleam: Check for gleam on the PATH before installing the latest version (#9882)
This PR updates the Gleam extension to give priority to the `gleam`
binary that is already on the PATH before downloading/installing a
separate Gleam version.

Release Notes:

- N/A
2024-03-27 14:25:18 -04:00
Marshall Bowers
3676ca879b
Extract Astro support into an extension (#9835)
This PR extracts Astro support into an extension and removes the
built-in Astro support from Zed.

Release Notes:

- Removed built-in support for Astro, in favor of making it available as
an extension. The Astro extension will be suggested for download when
you open a `.astro` file.
2024-03-26 18:50:08 -04:00
Marshall Bowers
181dc86b48
Fix typo in PureScript extension's struct name (#9831)
This PR fixes a copy/paste typo in the name of the PureScript
extension's struct name.

Release Notes:

- N/A
2024-03-26 16:29:55 -04:00
Marshall Bowers
b8ef97015c
Extract PureScript support into an extension (#9824)
This PR extracts PureScript support into an extension and removes the
built-in PureScript support from Zed.

Release Notes:

- Removed built-in support for PureScript, in favor of making it
available as an extension. The PureScript extension will be suggested
for download when you open a `.purs` file.
2024-03-26 13:55:46 -04:00
Marshall Bowers
dbcff2a420
Extract Prisma support into an extension (#9820)
This PR extracts Prisma support into an extension and removes the
built-in Prisma support from Zed.

Release Notes:

- Removed built-in support for Prisma, in favor of making it available
as an extension. The Prisma extension will be suggested for download
when you open a `.prisma` file.
2024-03-26 12:50:44 -04:00
Marshall Bowers
1d6792b17d
Extract Haskell support into an extension (#9814)
This PR extracts Haskell support into an extension and removes the
built-in Haskell support from Zed.

I tested out the extension locally in a Nix shell using `nix-shell -p
ghc haskell-language-server` to confirm the language server still
operated as expected:

<img width="341" alt="Screenshot 2024-03-26 at 11 26 26 AM"
src="https://github.com/zed-industries/zed/assets/1486634/df16fd38-4046-4a45-ac9f-c2b85bffe5c0">

Release Notes:

- Removed built-in support for Haskell, in favor of making it available
as an extension. The Haskell extension will be suggested for download
when you open a `.hs` file.
2024-03-26 11:41:41 -04:00
Max Brunsfeld
478e2a29a5 Add license symlinks for svelta and uiua extensions 2024-03-22 21:56:47 -07:00
Max Brunsfeld
6ebe599c98
Fix issues with extension API that come up when moving Svelte into an extension (#9611)
We're doing it. Svelte support is moving into an extension. This PR
fixes some issues that came up along the way.

Notes

* extensions need to be able to retrieve the path the `node` binary
installed by Zed
* previously we were silently swallowing any errors that occurred while
loading a grammar
* npm commands ran by extensions weren't run in the right directory
* Tree-sitter's WASM stdlib didn't support a C function (`strncmp`)
needed by the Svelte parser's external scanner
* the way that LSP installation status was reported was unnecessarily
complex

Release Notes:

- Removed built-in support for the Svelte and Gleam languages, because
full support for those languages is now available via extensions. These
extensions will be suggested for download when you open a `.svelte` or
`.gleam` file.

---------

Co-authored-by: Marshall <marshall@zed.dev>
2024-03-22 17:29:06 -07:00
Max Brunsfeld
585e8671e3
Add a schema to extensions, to prevent installing extensions on too old of a Zed version (#9599)
Release Notes:

- N/A

---------

Co-authored-by: Marshall <marshall@zed.dev>
2024-03-20 17:33:26 -04:00