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

SCSS formatter #237

Closed
jonas-jonas opened this issue Aug 30, 2019 · 11 comments
Closed

SCSS formatter #237

jonas-jonas opened this issue Aug 30, 2019 · 11 comments

Comments

@jonas-jonas
Copy link

Hey,

as far as I can see there is no option to format neither HTML nor SCSS.

Maybe it is possible to use prettier for this?

@angelozerr
Copy link
Contributor

angelozerr commented Aug 30, 2019

It was a long time but I created an issue for vscode CSS LS to support formatting. The idea is to configure the CSS Language Server with a JS formatter like jsbeautify or prettier. See microsoft/vscode-css-languageservice#44 and microsoft/vscode#39088 but it requires a PR.

Once this PR will be done, we could having formatting for CSS with LS without adding extra code.

@mickaelistria
Copy link
Contributor

As @angelozerr , this is something that needs to be fixed upstream, in VSCode language Servers.

@jonas-jonas
Copy link
Author

For HTML as well? I see why this would be desirable in the LS, but wouldn't it make sense to also provide some other formatter as well? See tons of VSCode plugins...

@mickaelistria
Copy link
Contributor

The scope of Wild Web Developer is to leverage language servers and redirect most language smartness effort into the language server. So, yes, even for HTML, Wild Web Developer won't use or host another formatter. If some want to put some development effort to implement formatting, then this effort has to be directed to VSCode, and then Wild Web Developer will enable it for free.

@vogella
Copy link
Contributor

vogella commented Aug 30, 2019

+1 for the suggestion. @mickaelistria can you open an upstream bug?

@angelozerr
Copy link
Contributor

So, yes, even for HTML, Wild Web Developer won't use or host another formatter.

@mickaelistria it seems vscode supports html format. It seems that it is enable with dynamic settings https://github.com/microsoft/vscode/blob/master/extensions/html-language-features/server/src/htmlServerMain.ts#L175

@mickaelistria
Copy link
Contributor

Thanks a lot for those pieces of information @angelozerr . I'm preparing a PR to enable HTML formatting.

@mickaelistria
Copy link
Contributor

Thanks to @angelozerr 's hint, HTML formatter was added and will be available in next snapshots (and next release).

@vogella
Copy link
Contributor

vogella commented Sep 6, 2019 via email

@mickaelistria mickaelistria changed the title HTML & SCSS formatter SCSS formatter Sep 6, 2019
@mickaelistria
Copy link
Contributor

So HTML is supported and CSS is tracked in #38 , let's close.

@angelozerr
Copy link
Contributor

My current PR #925 (comment) activate CSS formatter but without preferences.

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

No branches or pull requests

4 participants