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

Editor support for Fourmolu CLI option #2827

Closed
georgefst opened this issue Apr 12, 2022 · 9 comments
Closed

Editor support for Fourmolu CLI option #2827

georgefst opened this issue Apr 12, 2022 · 9 comments

Comments

@georgefst
Copy link
Collaborator

As for:

Add config option to editor plugins e.g. VSCode

Is there anything I need to do? I see from #1576 that we have some auto-generation script. Is this part of the release process? Is any of this (i.e. the process of adding an option) documented anywhere?

Originally posted by @georgefst in #2763 (comment)

@georgefst
Copy link
Collaborator Author

The functionality added in #244 is in a weird state, of being implemented but not supported by editor integrations. It would be great to get some help from someone who knows more about how plugin-specific options work. I suspect it's simple for anyone who knows the system, but I don't know how to proceed by myself.

More generally, we could really do with a documented process for this. I'm sure other contributors will want to add plugin options in future.

@georgefst georgefst changed the title Add support for config option for Fourmolu Editor support for Fourmolu CLI option Apr 12, 2022
@pepeiborra
Copy link
Collaborator

I think @berberman contributed the support for plugin-specific options. What do you need help with?

@berberman
Copy link
Collaborator

#1576 provided --vscode-extension-schema for generating available client options, which can be used in package.json of vscode-haskell. Yes, this should be a part of the release process of vscode-haskell, and iirc @jneira used to do that. It would be better to have a documentation for this. However, for other editors, there is no automated generating support, because they usually have their own formats of configurations, and I think they always can translate the vscode one to their formats if needed.

@michaelpj
Copy link
Collaborator

@fendor seems to be doing the vscode plugin release.

It would be great if someone could write some documentation in the vscode-haskell readme about how to add new HLS options there, since this question comes up a lot.

@fendor
Copy link
Collaborator

fendor commented Apr 28, 2022

I tried to look into and I am honestly a little confused myself, can someone help me out writing some nice docs for this task?

@georgefst
Copy link
Collaborator Author

#1576 provided --vscode-extension-schema

FYI, there's no --, it's just haskell-language-server vscode-extension-schema.

Anyway, I finally looked in to this. #3284 combined with haskell/vscode-haskell#736 should solve the problem at hand. But I'm reluctant to close this thread since it's now being used to track something more general: documenting what plugin writers need to do to add full support for any plugin options.

PS. The Fourmolu CLI option can be used in the latest release of HLS with VSCode by adding "haskell.plugin.fourmolu.config.external": true to the VSCode settings JSON file manually. It doesn't matter that neither of the aformentioned PRs have been merged.

@jhrcek
Copy link
Collaborator

jhrcek commented Nov 14, 2022

Could you please document the haskell.plugin.fourmolu.config.external option in hls docs?
I managed to make it work, but had to do a lot of searching before I found this thread 😄

@michaelpj
Copy link
Collaborator

Or better, do #3183

@georgefst
Copy link
Collaborator Author

Closing this. It is now usable, as outlined in #2827 (comment). Though I agree that #3183 is important.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants