Skip to content
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

GraphQL #149

Closed
1 task done
smbkr opened this issue Dec 7, 2022 · 16 comments
Closed
1 task done

GraphQL #149

smbkr opened this issue Dec 7, 2022 · 16 comments
Labels
language A request to add a language extension

Comments

@smbkr
Copy link

smbkr commented Dec 7, 2022

Check for existing issues

  • Completed

Language

graphql

Tree Sitter parser link

No response

Language server link

https://github.com/graphql/graphiql/tree/main/packages/graphql-language-service-server

Misc notes

No response

@smbkr smbkr added the language A request to add a language extension label Dec 7, 2022
@fbjork
Copy link

fbjork commented Mar 28, 2023

Is this something we could help contribute?

@hovsater
Copy link

Not until there’s a plug-in API available.

@fbjork
Copy link

fbjork commented Mar 28, 2023

@hovsater ok, is there an issue we can track for that?

@hovsater
Copy link

Yeah, there’s zed-industries/zed#5269 currently tracking that. 🙂

@JosephTLyons JosephTLyons changed the title GraphQL Support GraphQL support Apr 6, 2023
@XiNiHa
Copy link
Contributor

XiNiHa commented Oct 4, 2023

I'd also like to have Relay LSP support (which is done by an extension in VSCode) which can be utilized by calling the Relay compiler binary with the lsp command (ref)

@fbjork
Copy link

fbjork commented Nov 10, 2023

Why not add GraphQL support natively instead of plugins?

@JosephTLyons
Copy link
Collaborator

We will be going open source FairlySoon™️. After that, users will be able to propose languages we should bake into the editor, open PRs to do so, or help out with a plugin system so that we can have language extensibility!

@JosephTLyons JosephTLyons transferred this issue from zed-industries/community Jan 24, 2024
@dannyhw
Copy link

dannyhw commented Feb 5, 2024

when you say "users will be able to propose languages", does this now count as a language proposal? because this would be really nice to have.

@ejkg
Copy link

ejkg commented Feb 14, 2024

In the micro, this lack of language-specific syntax highlighting is my biggest deal breaker for adopting Zed. I like the editor and its performance is excellent. However, without a plugin system or some way to extend the editor issues like this will continue to spoil adoption rates.

@shellscape
Copy link

Zed extensions was just launched today, so there's an opportunity to add a GraphQL language extension!

@XiNiHa
Copy link
Contributor

XiNiHa commented Feb 15, 2024

It looks like not having a well-maintained Tree-sitter parser for GraphQL is the biggest blocker right now, since the official GraphQL syntax extension for VSCode is based on TextMate grammar

@11bit
Copy link
Contributor

11bit commented Feb 23, 2024

I made an extension with the parser recommended by tree-sitter website. Not sure how good the parser is but it seems to be not maintained anymore. If you find any bugs with parsing/highlighting you can report them in extenion's repo. I am going to work on it

@JosephTLyons JosephTLyons transferred this issue from zed-industries/zed Feb 26, 2024
@JosephTLyons JosephTLyons changed the title GraphQL support GraphQL Feb 26, 2024
@JosephTLyons JosephTLyons reopened this Feb 26, 2024
@dannyhw
Copy link

dannyhw commented Feb 26, 2024

could we get this to support graphql inline and not just graphql files? In typescript on vscode we get this with the gql function and things like this leading comment /* GraphQL */

@brookback
Copy link

could we get this to support graphql inline and not just graphql files?

Maybe feels like a separate, general, extension for setting another language/grammar on a block inside of an existing grammar?

@llllvvuu
Copy link

llllvvuu commented Mar 4, 2024

could we get this to support graphql inline and not just graphql files? In typescript on vscode we get this with the gql function and things like this leading comment /* GraphQL */

zed does have injections.scm. However, I've found #8795 to be a blocker to doing things the "right" way.

The following is almost a workaround (the fatal flaw is that it de-registers the TypeScript LSP):

  1. Copy languages/typescript and languages/tsx from https://github.com/llllvvuu/zed-extension-graphql/tree/feat/tsx into
    ~/Library/Application Support/Zed/extensions/installed/graphql/languages
  2. Make the following edit to ~/Library/Application Support/Zed/extensions/installed/graphql/extension.json:
-    "GraphQL": "languages/graphql"
+    "GraphQL": "languages/graphql",
+    "TSX": "languages/tsx",
+    "TypeScript": "languages/typescript"

@maxdeviant
Copy link
Member

The GraphQL extension was added in #91.

Going to close this issue out.

Any further requests/issues can be directed to the extension repo: https://github.com/11bit/zed-extension-graphql.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language A request to add a language extension
Projects
None yet
Development

No branches or pull requests