-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tracking Issue: Language Extensions #7096
Comments
Part of #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>
@maxbrunsfeld what are difference between plugins and extensions? Other Question, this topic:
Can I try to implement this? Im know we need API definition but I can fake and when have API, we modify definition.
Give me feedback and if you want I can try to implement. |
@foxkdev My plan is to start with the backend part of this API. We'll be adding REST APIs to In general, we'll be working in the language extensions channel in Zed. You're welcome to join. |
This PR adds a view for installing extensions within Zed. My subtasks: - [X] Page Extensions and assign in App Menu - [X] List extensions - [X] Button to Install/Uninstall - [x] Search Input to search in extensions registry API - [x] Get Extensions from API - [x] Action install to download extension and copy in /extensions folder - [x] Action uninstall to remove from /extensions folder - [x] Filtering - [x] Better UI Design Open to collab! Release Notes: - Added an extension installation view. Open it using the `zed: extensions` action in the command palette ([#7096](#7096)). --------- Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com> Co-authored-by: Marshall <marshall@zed.dev> Co-authored-by: Carlos <foxkdev@gmail.com> Co-authored-by: Marshall Bowers <elliott.codes@gmail.com> Co-authored-by: Max <max@zed.dev>
I was just playing w/ creating an extension for Laravel Blade files. It went OK following the example at https://github.com/zed-extensions/nu and also the stuff in https://github.com/zed-industries/zed/tree/main/crates/zed/src/languages. I did get it working, at least to the extent that that tree-sitter parser allowed, but I have a few quick comments:
Thank you! It was fun playing with this and getting it set up. |
Seconded on Clayton's comment above regarding debug logs. I'm trying — for fun — to add support for SQL grammar (based on https://github.com/DerekStride/tree-sitter-sql), but I can't for my life get it to work 😄 I've mimicked a bunch of existing Zed language extensions, but it's very hard without any logs telling me why it's not working properly. The repo: https://github.com/johanbrook/zed-sql My woes"SQL" shows up in the language selector when I bring it up manually, but it's not:
|
What work is remaining to support language servers via extensions? I see my PR #8384 was closed in favor of this ongoing work - looking at where I can help out 😄 |
For anyone who's late to the party, right now the language folder is this: https://github.com/zed-industries/zed/tree/main/crates/languages/src (correct me if I'm wrong) |
Based on my findings in the above issue, I believe today Zed doesn't reconcile multiple language matches. I propose simply reconciling using the length of longest longest-matched suffix of each language extension. |
Note for linux users: Make sure you have a xdg FileChooser, else Also, this error is not too apparent and I needed to modify the source code to log it. Zed should log errors like this? relevant is |
Follow-up from zed-industries#9138 Release Notes: - Adds suggested extensions for some filetypes ([zed-industries#7096](zed-industries#7096)). --------- Co-authored-by: Felix Zeller <felixazeller@gmail.com>
Language extensions work now. |
Before opening a new issue: does Zed support multiple LSPs at once for one language? I came across that TypeScript autocompletion does not work when using the Biome extension: biomejs/biome-zed#10 |
There are currently some issues when there are two language servers running for a given language. I'm looking to address that with #10906. |
Problem
Right now, all of the languages that Zed supports are bundled into the binary. This means that users cannot add support for their own languages. It also means that the more languages Zed supports, the longer our compile time becomes.
Proposed Plan
Zed's first form of user-installed extensions will be language extensions. These plugins will have a directory structure similar to the per-language folders in Zed's current
languages folder
. In addition to the TOML config, and the query files, they will also contain a WASM build of the Tree-sitter parser.In order to promote sharing of plugins, we'll create a new GitHub repository in the Zed organization that contains some directory of all known plugins. We'll add functionality to zed.dev so that when editing an unsupported language, Zed will be able to query for any known plugins that add support for that file extensions, and automatically download and install them.
Steps
Tree-sitter
Zed Extension Support
Convenient Extension Installation
Language Server Extensions
zed-extension-api
crate to crates.ioThe text was updated successfully, but these errors were encountered: