-
Notifications
You must be signed in to change notification settings - Fork 109
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
Update js-beautify v1.15.1 to add new angular templating option #181
Conversation
@microsoft-github-policy-service agree company="Corellia SRL" |
It seems to me that this PR will not work
getTemplatingFormatOption function should return HTMLFormatConfiguration.templating I think the VSCode repository needs to be updated: https://github.com/microsoft/vscode/blob/main/extensions/html-language-features/package.json |
@NesTeRDGIT You were right I pushed a change, thank you for your feedback IMO, the best thing to do is to keep the "boolean" property with the possibility to add the js-beautify configuration This means that we need to do something like that (see picture) in the vscode repository to be able to configure a boolean or an array of values I just need to confirm that this kind of config is possible, but it would hope it is :) What do you think ? |
I am not a VSCode developer But I think VSCode will not accept such configuration because it is js-beautify private settings. These are not common options for all HTML extensions. I was suggested to the js-beautify developers to develop an extension for VSCode, for example like: https://github.com/HookyQR/VSCodeBeautify |
The problem is that "js-beautify developers" is mostly me. I don't have the time to be primary maintainer on a VSCode plugin. If you are interested in forking the HookyQR beautifier plugin into https://github.com/beautifier and doing the work to spin up that project, please open an issue over in |
The HTML language service formatter and (VS Code) currently has an on/off setting for template support. I wonder, do you know the reason why |
Reading more about it, I see that the angular support got turned off due to performance reasons: beautifier/js-beautify#2246 The thing is, the HTML language server is intended for HTML as understood by browser. Templating languages are extensions of HTML and, if they extend the syntax, not HTML. We can add the new options to vscode-html-languageservice, but I'm not in favor of complicating the settings of the HTML formatter in VS Code with a list of templating languages. That would give the impression that the HTML language extension is also for these languages, which it isn't. |
Thank you for the feedback @aeschli I understand your point, but since the options are there, it feels a little bid odd (for me) to not allow users of VS Code to use it
It was maybe not intended at first, but with the dependency on js-beautify, now the HTML language extension is linked to the languages supported by the lib. |
This pull request addresses the open issue #177.
As I don't often submit pull requests, I would appreciate any feedback on the implementation and/or description.