JetBrains / js-graphql-intellij-plugin

GraphQL language support for WebStorm, IntelliJ IDEA and other IDEs based on the IntelliJ Platform.
https://jimkyndemeyer.github.io/js-graphql-intellij-plugin/
MIT License
879 stars 97 forks source link

Implement GraphQL formatter #684

Open xzec opened 10 months ago

xzec commented 10 months ago

Hi, I have a question regarding this plugin. The plugin's description mentions that it supports GraphQL code-formatting. However, I've been struggling to understand how to actually utilize this feature.

Here's what I've attempted so far:

I've searched for a keyboard shortcut in Keymap > Plugins > GraphQL, I've looked for a formatting button within the UI for GraphQL, I've tried using the built-in "Reformat Code" action on .graphql files, I've also attempted to use the built-in "Reformat File..." action on .graphql files.

So far nothing worked.

Could you please provide more guidance on how to effectively reformat GraphQL code using this plugin?

Version and Environment Details Operation system: Windows 11 Pro, 22H2 IDE name and version: WebStorm 2023.2, Build #WS-232.8660.143 Plugin version: 4.0.2

vepanimas commented 10 months ago

@xzec hi! The plugin reformats indentation only at the current state. A feature-rich formatter is in the roadmap, however, I am unable to provide an estimated time of completion at this point.

kicktipp commented 6 months ago

I have the same problem. Formatting of Graphql files or rragments does not work with Code > Reformat Code (Ctrl-Alt -L) The only thing happening is fixing indentation. But no line breaks are added. This is very tedious work to do manual. And i would consider it very important for this plugin to get it implemented. As everything else works just amazingly.