Commit Graph

274 Commits

Author SHA1 Message Date
Marshall Bowers
4b094798e0
terraform: Bump to v0.1.0 (#17365)
This PR bumps the Terraform extension to v0.1.0.

Changes:

- https://github.com/zed-industries/zed/pull/16955
- https://github.com/zed-industries/zed/pull/16945

Release Notes:

- N/A
2024-09-04 13:44:43 -04:00
Marshall Bowers
6b23213d5f
svelte: Bump to v0.1.0 (#17364)
This PR bumps the Svelte extension to v0.1.0.

Changes:

- https://github.com/zed-industries/zed/pull/16955
- https://github.com/zed-industries/zed/pull/17323

Release Notes:

- N/A
2024-09-04 13:38:51 -04:00
Mathias
bde1c95158
svelte: Update Tree-sitter grammar (#17323)
Before:
![Screenshot from 2024-09-03
20-36-48](https://github.com/user-attachments/assets/c4eca8c9-977b-461c-bb0a-77c0d94554b8)

After:
![Screenshot from 2024-09-03
20-43-44](https://github.com/user-attachments/assets/d9b9653c-29c0-4273-85ee-040fb51af07c)

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-09-04 10:00:19 -04:00
Patka
7844b9f38e
php: Add more keywords (#17243)
This list should now be complete according to the official list at
https://www.php.net/manual/en/reserved.keywords.php
2024-09-02 18:30:02 +00:00
Peter Tripp
16942610cb
examples: Update slash-commands-example readme (#17204)
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-09-01 14:02:14 -04:00
Vitaly Slobodin
7cc24eaf4b
ruby: Bump version to v0.2.0 (#17128)
**Changelog:**
- Replace default tasks with a stub message (#16752)
- Update tree-sitter grammar for the Ruby language (#16892)
- Rename `rbs` to `RBS` (#16893)
- Upgrade `zed_extension_api` to v0.1.0 (#16907)

Release Notes:

- N/A
2024-08-30 09:02:22 -04:00
Vitaly Slobodin
5af116d676
ruby: Replace default tasks with a stub message (#16752)
The Ruby world has many testing frameworks:

- Minitest
- RSpec
- quickdraw
- tldr
- and many others.

Attempting to support all of them through a single `tasks.json` file is
a challenging task and nearly impossible. All testing frameworks have
different running options and commands. It's still possible to use
tree-sitter queries to detect runnables in Ruby code but Zed lacks the
ability to detect the testing framework in a project that can be used to
detect the correct commands to run tests or runnables. The end user
knows the correct command and it's wise to delegate creating the command
to them. It would be a bit strange to leave the user without any
guidance, so this commit adds example tasks for various Ruby testing
frameworks.

Closes #12579

Here is the screenshot how it looks:

![CleanShot 2024-07-01 at 19 37
08@2x](https://github.com/zed-industries/zed/assets/1894248/e9659822-6c02-4afb-a0e4-e9966b9fb2f5)


Release Notes:

- N/A
2024-08-29 10:32:05 -07:00
Taras Martyniuk
a4893ab561
terraform: Add outline queries (#16945)
Closes #16944

Added outline schema for terraform/HCL

Release Notes:

- N/A


![SCR-20240827-omjs](https://github.com/user-attachments/assets/48a31863-e848-4a86-97b7-67440d62c93f)
2024-08-28 21:51:08 -07:00
Marshall Bowers
ace8734b63
Revert "extension: Define capabilities in the extension manifest (#16953)" (#17003)
This PR reverts the addition of extension capabilities from #16953.

While these may end up being useful at some point, after some discussion
they don't seem like the exact fit for what we're looking to do right
now.

This reverts commit 8ec36f1e2b.

Release Notes:

- N/A
2024-08-28 09:30:13 -04:00
Christoph Schmatzler
81eb594037
elixir: Add support for property macro in runnables (#16985)
Closes #16984 

Release Notes:

- Added support for `property` tests in runnables for Elixir ([#16984](https://github.com/zed-industries/zed/issues/16984))
2024-08-28 11:11:35 +03:00
Marshall Bowers
1f0b7d45ff
extensions: Upgrade zed_extension_api to v0.1.0 (#16955)
This PR updates the `zed_extension_api` to v0.1.0 for the extensions
that live in this repo.

The changes in that version of additive, so none of the extensions need
to change their usage in order to upgrade.

Release Notes:

- N/A
2024-08-27 12:00:43 -04:00
Marshall Bowers
8ec36f1e2b
extension: Define capabilities in the extension manifest (#16953)
This PR adds an initial notion of extension capabilities.

Capabilities are used to express the operations an extension is capable
of doing. This will provide further insights into what an extension can
do, as well as provide the ability to grant or deny the set of
capabilities.

Capabilities are defined in the `capabilities` field in the extension
manifest. This field contains an array of capabilities.

Each capability has a `kind` to denote the known capability it
corresponds to. Individual capabilities may have additional fields,
based on the `kind`.

Here's an example of some capabilities:

```toml
capabilities = [
    { kind = "download-file", host = "github.com", path_prefix = "owner/repo" },
    { kind = "npm:install", package = "@vue/language-server" },
]
```

In order to avoid a breaking change, the `capabilities` field is
currently optional and defaults to an empty array. This will allow us to
add support for extensions to define capabilities before we start
enforcing them.

Release Notes:

- N/A
2024-08-27 11:10:58 -04:00
Vitaly Slobodin
14d0f4fbb2
ruby: Upgrade zed_extension_api to v0.1.0 (#16907)
This pull request upgrades the Ruby extension to use v0.1.0 of the Zed
extension API.

Release Notes:

- N/A
2024-08-26 14:20:41 -04:00
Vitaly Slobodin
4c7c8b005d
ruby: Update tree-sitter grammar for the Ruby language (#16892)
Closes [#7776](https://github.com/zed-industries/zed/issues/7776)

Hi, this pull request updates the tree-sitter grammar for the Ruby
language.

The changes between two version do not have any breaking change:
dc2d7d6b50..7dbc1e2d0e

Release Notes:

- N/A
2024-08-26 12:44:04 -04:00
Vitaly Slobodin
5f6726acc0
ruby: Rename "rbs" language to "RBS" (#16893)
Rename rbs to RBS. This is primarily a UX change, as the proper name for
the Ruby Type Signature language is RBS, not rbs.

Screenshots:

Before:
![CleanShot 2024-08-26 at 18 28
45@2x](https://github.com/user-attachments/assets/c6773fe5-f071-47c7-91b3-27f448ce3b2a)

After:

![CleanShot 2024-08-26 at 18 29
44@2x](https://github.com/user-attachments/assets/ddd8859e-6cbc-4a6f-8485-2b663a76420f)


Release Notes:

- N/A
2024-08-26 12:43:33 -04:00
Marshall Bowers
c658ad8380
elixir: Bump to v0.0.9 (#16879)
This PR bumps the Elixir extension to v0.0.9.

Changes:

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

Release Notes:

- N/A
2024-08-26 10:58:49 -04:00
Kai
dd8d52f4f4
elixir: Make files required by elixir-ls executable (#16819)
Closes:

- #15802

This PR fixes an issue in the `elixir-ls` language server installation
where some of the required scripts was not being made executable when
installed from GitHub.

Release Notes:

- Fixed elixir-rs files not being executable ([#15802](https://github.com/zed-industries/zed/issues/15802))
2024-08-25 20:51:25 +03:00
Fabien Salathe
79d8b97531
Add more PHP keywords (#16720)
Release Notes:

- Improved PHP highlights by adding more language keywords
2024-08-23 09:51:07 +03:00
Thorsten Ball
59dd7c9138
zig: Bump to v0.3.0 (#16669)
This PR bumps the Zig extension to v0.3.0

Changes:

- #16645

Release Notes:

- N/A
2024-08-22 15:56:09 +02:00
versecafe
bb725d3158
zig: Unpin Zig LSP grab newest version off GH releases, and download from zigtools.org (#16645)
Fixed Zig LSP being pinned to 0.11.0 due to discontinuation of `.tar.gz`

Release Notes:

- N/A
2024-08-22 15:45:04 +02:00
Marshall Bowers
77c08fade5
elixir: Bump to v0.0.8 (#16495)
This PR bumps the Elixir extension to v0.0.8.

Changes:

- #16382

Release Notes:

- N/A
2024-08-19 19:15:41 -04:00
Stanislav Alekseev
8993a9f2ee
elixir: Make two more files required by lexical executable (#16382)
I still haven't fixed building dev extensions with rust managed by nix,
so I'd appreciate testing this for me

Release Notes:

- N/A
2024-08-19 18:48:05 -04:00
Nathan Sobo
43e13df9f3
Add a /perplexity slash command in an extension (#16438)
Release Notes:

- N/A
2024-08-18 16:34:55 -06:00
Marshall Bowers
cb423bcb6f
Remove tooltip_text from extension manifests (#16312)
This PR removes the `tooltip_text` from the extension manifests.

We stopped reading this value in #16306, as it wasn't being used, so we
don't need to include it in the manifest anymore.

Release Notes:

- N/A
2024-08-15 15:54:53 -04:00
Marshall Bowers
5a30e29848
Add example extension to showcase slash commands (#16300)
This PR adds an example extension to showcase how to write slash
commands in an extension.

Release Notes:

- N/A
2024-08-15 12:26:13 -04:00
Marshall Bowers
1117d89057
zig: Bump to v0.2.0 (#16261)
This PR bumps the Zig extension to v0.2.0.

Changes:

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

Release Notes:

- N/A
2024-08-14 18:57:43 -04:00
Marshall Bowers
0df4d12234
zig: Upgrade zed_extension_api to v0.1.0 (#16260)
This PR updates the Zig extension to use v0.1.0 of the Zed extension
API.

This allows us to pin ZLS to v0.11.0, as the more recent releases of ZLS
don't have `.tar.gz` assets available.

Release Notes:

- N/A
2024-08-14 18:40:27 -04:00
Marshall Bowers
a6461f90a1
gleam: Bump to v0.2.0 (#16258)
This PR bumps the Gleam extension to v0.2.0.

Changes:

- Added `/gleam-project` slash command
- Added `gleam-hexdocs` provider for the `/docs` slash command
- https://github.com/zed-industries/zed/pull/12221
- https://github.com/zed-industries/zed/pull/15659

Release Notes:

- N/A
2024-08-14 18:14:19 -04:00
Marshall Bowers
2e1750d5e2
gleam: Switch to published version of zed_extension_api (#16256)
This PR updates the Gleam extension to use the published version of the
`zed_extension_api`.

Release Notes:

- N/A
2024-08-14 18:04:05 -04:00
Marshall Bowers
6365000b68
gleam: Clean up slash commands in preparation for release (#16232)
This PR cleans up the slash command functionality in preparation for an
upcoming release:

- Removed arguments to `/gleam-project` that were just used as an
example
- Removed `/gleam-docs` in favor of `/docs` with the `gleam-hexdocs`
provider
- Pulled a list of all Gleam packages to use as suggestions

Release Notes:

- N/A
2024-08-14 12:22:22 -04:00
Marshall Bowers
340a1d145e
haskell: Bump to v0.1.1 (#16228)
This PR bumps the Haskell extension to v0.1.1.

Changes:

- https://github.com/zed-industries/zed/pull/13268
- https://github.com/zed-industries/zed/pull/15998

Release Notes:

- N/A
2024-08-14 11:57:47 -04:00
Thanabodee Charoenpiriyakij
f5532afaa7
erlang: Update tree-sitter grammar and query files (#15973)
Hi, I bump the tree-sitter-erlang to a newest version and sync the
hightlight query to fix long standing issue in the Zed erlang extension
about incorrect function highlighting, not support the triple quote
string and many more.

Release Notes:

- N/A

Signed-off-by: Thanabodee Charoenpiriyakij <wingyminus@gmail.com>
2024-08-14 11:07:54 -04:00
Kirill Bulatov
8fe2de1737
Further improve /tabs command and slash arguments completion (#16216)
* renames `/tabs` to `/tab`
* allows to insert multiple tabs when fuzzy matching by the names
* improve slash command completion API, introduce a notion of multiple
arguments
* properly fire off commands on arguments' completions with
`run_command: true`

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <marshall@zed.dev>
2024-08-14 17:11:51 +03:00
Marshall Bowers
aa12ae0e3c
Allow extensions to suggest packages for /docs completions (#16185)
This PR gives extensions the ability to suggest packages to show up in
`/docs` completions by default.

Release Notes:

- N/A
2024-08-13 16:50:57 -04:00
Marshall Bowers
8a9c58e515
zed_extension_api: Add HttpRequestBuilder (#16165)
This PR adds an `HttpRequestBuilder` to the extension API to allow for a
more ergonomic way for constructing HTTP requests within extensions.

The HTTP client functionality is now also exposed via the
`zed_extension_api::http_client` module instead of top-level.

Release Notes:

- N/A
2024-08-13 11:12:10 -04:00
Marshall Bowers
4450ebff6b
Allow extensions to control the redirect policy for the HTTP client (#16162)
This PR extends the extension API with support for controlling the
redirect policy used by the HTTP client.

Release Notes:

- N/A
2024-08-13 10:40:21 -04:00
Stanislav Alekseev
f956257638
haskell: Pass environment to hls (#15998)
Fixed environment not being passed to hls, breaking local nix-based
installations

Release Notes:

- N/A
2024-08-12 18:38:23 -04:00
Nathan Sobo
fc64843dd5
Enhance HTTP API for extensions (#16067)
# HTTP Client Improvements for Extension API

This PR enhances the HTTP client functionality in the Zed extension API,
providing more control over requests and allowing for streaming
responses.

## Key Changes

1. Extended `HttpRequest` struct:
   - Added `method` field to specify HTTP method
   - Added `headers` field for custom headers
   - Added optional `body` field for request payload

2. Introduced `HttpMethod` enum for supported HTTP methods

3. Updated `HttpResponse` struct:
   - Added `headers` field to access response headers
- Changed `body` type from `String` to `Vec<u8>` for binary data support

4. Added streaming support:
   - New `fetch_stream` function to get a response stream
   - Introduced `HttpResponseStream` resource for chunked reading

5. Updated internal implementations to support these new features

6. Modified the Gleam extension to use the new API structure

## Motivation

These changes provide extension developers with more flexibility and
control over HTTP requests. The streaming support is particularly useful
for handling large responses efficiently or ideally streaming into the
UI.

## Testing

- [x] Updated existing tests
- [ ] Added new tests for streaming functionality

## Next Steps

- Consider adding more comprehensive examples in the documentation
- Evaluate performance impact of streaming for large responses

Please review and let me know if any adjustments are needed.

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-08-12 10:36:49 -04:00
Jonathan Dickinson
864c443f4b
csharp: Use lsp settings to locate binary if present (#15885)
C# extension now honors the "lsp" config section

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-08-07 10:58:13 -04:00
Marshall Bowers
5ce6c374b0
gleam: Revert version bump (#15908)
This PR reverts a version bump to the Gleam extension that was included
in #15866, as we're not ready to publish a new version.

Release Notes:

- N/A
2024-08-07 10:27:34 -04:00
Piotr Osiewicz
2db2b636f2
assistant: Add annotations to more languages (#15866)
Release Notes:

- N/A
2024-08-07 13:47:21 +02:00
Xander
4f69336024
php: Add bracket highlighting (#15881)
Improved PHP extension by adding bracket highlighting 

Release Notes:

- N/A

Screenshot: 
<img width="402" alt="image"
src="https://github.com/user-attachments/assets/4dd02b41-8637-49b8-b3ce-41791227f945">

<img width="537" alt="image"
src="https://github.com/user-attachments/assets/b6dc7091-4588-460b-9051-4675eb0df538">
2024-08-06 17:36:40 -04:00
Marshall Bowers
591b579ccf
elixir: Bump to v0.0.7 (#15867)
This PR bumps the Elixir extension to v0.0.7.

Changes:

- #14831

Release Notes:

- N/A
2024-08-06 13:07:47 -04:00
Vitaly Slobodin
889a14a2c2
ruby: Bump to v0.1.0 (#15855)
ruby: Bump extension version to v0.1.0 Why not v0.0.9? I think the Ruby
extension is mature, and it's time to release the first minor version.
But I am totally OK with changing it to 0.0.9.

Included changes:

- https://github.com/zed-industries/zed/pull/15778
- https://github.com/zed-industries/zed/pull/15762
- https://github.com/zed-industries/zed/pull/15110
- https://github.com/zed-industries/zed/pull/15297

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-08-06 09:53:02 -04:00
Marshall Bowers
a054a2a9a3
ruff: Refactor language server loading (#15852)
This PR refactors the language server loading in the Ruff extension to
mirror our other extensions.

Also fixed an issue where the cached binary path was not being
respected.

Release Notes:

- N/A
2024-08-06 09:10:18 -04:00
Vitaly Slobodin
1c3f303594
ruby: Support "binary" settings for Rubocop and Solargraph (#15110)
Hello, this pull request adds support for specifying and using the
"binary" settings for Rubocop and Solargraph LSPs. AFAIK, Ruby LSP does
not require the bundler context but that could be added later easily.

In Ruby world, like in Node.js world, almost all
projects rely on project specific packages (gems) and their versions.
Solargraph and Rubocop gems are usually installed as project
dependencies. Attempting to use global installation of them fail in most
cases due to incompatible or missing dependencies (gems).

To avoid that, Ruby engineers have the `bundler`
gem that provides the `exec` command. This command executes the given
command in the context of the bundle.

This pull request adds support for pulling the `binary` settings to use
them in starting both LSPs. For instance, to start the Solargraph gem in
the context of the bundler, the end user must configure the binary
settings in the folder-specific settings file like so:

```json
{
  "lsp": {
    "solargraph": {
      "binary": {
        "path": "/Users/vslobodin/Development/festivatica/bin/rubocop"
      }
    }
  }
}
```

The `path` key must be an absolute path to the `binstub` of the
`solargraph` gem. The same applies to the "rubocop" gem. Side note but
it would be awesome to use Zed specific environment variables to make
this a bit easier. For instance, we could use the `ZED_WORKTREE_ROOT`
environment variable:

```json
{
  "lsp": {
    "solargraph": {
      "binary": {
        "path": "${ZED_WORKTREE_ROOT}/bin/rubocop"
      }
    }
  }
}
```

But this is out of the scope of this pull request. The code is a bit
messy and repeatable in some places, I am happy to improve it here or
later.

References:
- https://bundler.io/v2.4/man/bundle-exec.1.html
- https://solargraph.org/guides/troubleshooting
- https://bundler.io/v2.5/man/bundle-binstubs.1.html

This pull request is based on these two pull requests:

- https://github.com/zed-industries/zed/pull/14655
- https://github.com/zed-industries/zed/issues/15001

Closes https://github.com/zed-industries/zed/issues/5109.

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
2024-08-06 08:36:14 -04:00
Vitaly Slobodin
45afe9dffa
ruby: Add support for *.rbs files (#15778)
Hi, this pull request adds support for RBS files for the Ruby language.
[RBS](https://github.com/ruby/rbs) is a language to describe the
structure of Ruby programs.

This pull request:

- adds a new grammar to the Ruby extension for RBS
https://github.com/joker1007/tree-sitter-rbs
- configures the Ruby extension to use the added grammar.

Release Notes:

- N/A
2024-08-06 09:51:44 +02:00
Reese is on Codeberg
49e736d8ef
ruby: Recognize Steepfiles as Ruby (#15762)
Release Notes:

- N/A
2024-08-04 11:57:34 -04:00
Joseph T Lyons
35a3b00255 Add link to docs for configuring ruff 2024-08-02 11:06:01 -04:00
Marshall Bowers
906d9736d5
gleam: Update Tree-sitter grammar for label shorthand syntax (#15659)
This PR updates the Gleam Tree-sitter grammar to support label shorthand
syntax.

Release Notes:

- N/A
2024-08-01 17:46:23 -04:00