monaco-editor icon indicating copy to clipboard operation
monaco-editor copied to clipboard

HTMLHint (or extension support)

Open ptyork opened this issue 8 years ago • 14 comments

Currently VSCode/Monaco supports linting for a good number of languages, but HTML is not one of them. VSCode makes up for this with an extension: https://github.com/Microsoft/vscode-htmlhint

So, will VSCode extensions (perhaps with minor mods) work in Monaco? If not, any plans to add HTML linting?

ptyork avatar Jun 27 '16 16:06 ptyork

fyi @aeschli

Today the html language support is still inside monaco-editor-core aka in the vscode repo. That is because 100% the same code ships with vscode and with the editor. We plan to break up this code, to create a vscode html extension and once that is done, we can create a monaco-html editor plugin that reuses some of the code, but that is independent of vscode. We can then consider adding more features to it.

TL;DR we can't do it yet due to it affecting vscode, but we plan to fix this by making things separate.

alexdima avatar Jun 28 '16 08:06 alexdima

Sounds good, thanks. I'm creating a tool to help students learn HTML+CSS so this will be quite helpful. Happy to help with this when it becomes possible.

ptyork avatar Jun 28 '16 13:06 ptyork

@alexandrudima would the creation of a monaco-html editor plugin include support for Emmet?

joeskeen avatar Jun 29 '16 17:06 joeskeen

@alexandrudima has there been any positive progress on this? I as well am trying to indicate syntax errors while editing HTML

scniro avatar Apr 27 '17 16:04 scniro

May I add that I see the monaco-html plugin. @alexandrudima is there I way I can accomplish the hinting with this module? I'm browsing the object and monaco.languages.html.htmlDefaults appears to be missing diagnosticsOptions similar to the other languages. Am I overlooking something?

scniro avatar Apr 27 '17 16:04 scniro

The Monaco HTML support doesn't include any validation and there are currently no plans to work on it. Contributions are welcome. The code base is at https://github.com/Microsoft/vscode-html-languageservice.

aeschli avatar Apr 27 '17 19:04 aeschli

@aeschli may I ask, why? Is validating HTML just outright not interesting to Microsoft, or is it just backlogged pretty deep? I open up VS Code and have no sense of assurance that any of my markup is even close to being valid. I find this very surprising.

scniro avatar Apr 27 '17 20:04 scniro

It just hasn't gotten any priority yet and surprisingly there haven't been many requests for it. My guess this has to do that there are plenty of good validators out there. It's quite some work to keep a validator up-to-date. One issue with HTML is that there are many templating variants of HTML around, and for these files validation often flags problems that are false positives.

aeschli avatar Apr 27 '17 20:04 aeschli

@aeschli gotcha. I was hoping there could be at least something simple e.g. <div><div isn't a closed tag and flagged by the editor (similar to how Webstorm will do it). Thanks for the explanation. hopefully more requests for this will roll in but at this point I can't see it happening!

scniro avatar Apr 27 '17 21:04 scniro

+1 this is really needed

jbenguira avatar Jul 22 '18 07:07 jbenguira

+1 jumping on the this is needed train

alexkoffler avatar Apr 17 '19 04:04 alexkoffler

+1 Another vote for needed

JasonFritsche avatar Mar 09 '20 21:03 JasonFritsche

+1 Another vote for needed

NiravDoshi1305 avatar Jun 06 '22 14:06 NiravDoshi1305

+1 Another vote for needed

jainharsh97 avatar Jun 10 '22 06:06 jainharsh97

+1 for this

silli-scale avatar Jan 26 '23 18:01 silli-scale

We closed this issue because we don't plan to address it in the foreseeable future. If you disagree and feel that this issue is crucial: we are happy to listen and to reconsider.

If you wonder what we are up to, please see our roadmap and issue reporting guidelines.

Thanks for your understanding, and happy coding!

hediet avatar Feb 21 '23 17:02 hediet