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 settings UI #11

Open
stevenzeck opened this issue Jan 16, 2018 · 3 comments
Open

Editor settings UI #11

stevenzeck opened this issue Jan 16, 2018 · 3 comments
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@stevenzeck
Copy link
Contributor

Thinking about the various editors (Atom, Sublime, VS Code) and how they should present options to the user. I've not used Sublime or VS Code and I'm not 100% sure how the integrations with all of the packages will work there. But with Atom Beautify it sounds like the direction we're taking is to have each beautifier be it's own Atom package. So beautifier-prettier here would have to be installed as an Atom package for it to be used by Atom Beautify.

This presents an opportunity to spread the options out per beautifier versus cramming them all into Atom Beautify, so the beautifier-prettier package would show all of the options listed https://github.com/Unibeautify/beautifier-prettier/blob/master/src/index.ts#L11-L60.

I have no idea how to take those options and "look them up" in Unibeautify's OptionsRegistry to get the title, description, etc, so if that's the direction to take I would need some guidance there.

Thoughts/feedback?

@stevenzeck stevenzeck added the question Further information is requested label Jan 16, 2018
@Glavin001
Copy link
Member

The beautifier specific options will be exposed by unibeautify-beautifier wrapper, depending on the environment (e.g. Atom). See https://github.com/Unibeautify/unibeautify-beautifier/blob/master/src/beautifier.ts#L46

This works for Atom because it has a Services API: http://blog.atom.io/2015/03/25/new-services-API.html
However, VS Code and Sublime do not have such a feature. I was thinking we would utilize some form of discovery like https://github.com/Unibeautify/unibeautify-cli uses. Similar to Atom users installing individual beautifiers as Atom/apm packages, VS Code and Sublime users would install the Node.js/npm version of the beautifiers package and use those.

Here's some documentation on the available options per beautifier: https://unibeautify.github.io/docs/beautifier-prettier.html

Unibeautify itself will have a new configuration file format, .unibeautifyrc (using https://github.com/davidtheclark/cosmiconfig ) and will include choosing which beautifiers to apply.

Atom will have a GUI (with https://atom.io/packages/settings-view ).
VS Code will provide contributes.configuration: https://code.visualstudio.com/docs/extensionAPI/extension-points#_contributesconfiguration
Not sure what Sublime convention is.

@Glavin001 Glavin001 added the help wanted Extra attention is needed label Jan 16, 2018
@stevenzeck
Copy link
Contributor Author

OK got it. For populating the config const in each of the individual beautifiers, is there a method that does that yet?

@Glavin001
Copy link
Member

Not yet. This still needs to be designed and developed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants