pwshub.com

SuperHTML: Live syntax checking for HTML

Developer Loris Cro reckons his LSP language server for HTML is a world first, and that the absence of such tools up to now has had grave consequences for the web.

SuperHTML is a language server that talks to compatible code editing apps over the Language Server Protocol (LSP). What that means is that you can plug it into Visual Studio Code – or many other LSP-compatible editors, from Emacs to Kate to Vim. Or, if you prefer, run it as a standalone tool from the command line. It can also reformat your HTML for you.

That means live on-the-fly validation, and autocorrect for HTML5, as you type. Its author believes this is a first, and that it's also the first built in Wasm using WASI. Live HTML checking isn't unique – his blog post notes that Jetbrains' WebStorm can do it, for instance – but doing it in FOSS in a cross-editor compatible way is.

In a distant and better-forgotten era, The Reg FOSS desk built his homepage in flat static HTML because that is just how things were done around 1996 or so. Even then, we used various web page editors such as what LowEndMac called the irreplaceable Claris Home Page. Syntax checking was largely limited to "does it look right in the WYSIWYG preview?" and occasionally "why is my browser crashing?" But even this doddering web geriatric recognizes that such approaches don't cut the mustard as we approach a quarter of the way through the 21st century.

This also struck SuperHTML's author, who describes what he calls the Static Site Paradox: if you want to host your own website, it's considerably easier to use…

As opposed to:

  • Want to feel old? Excel just entered its 40th year
  • Big browsers are about to throw a wrench in your ad-free paradise
  • Windows 7 finally checks out as POSReady 7 closes the till on an era
  • Opening up the WinAmp source to all goes badly as owners delete entire repo

As he notes, you'd expect that uploading a couple of files to a folder somewhere was the simple approach for a non-techie, whereas an expert would go for the complex but theoretically scalable approach. In fact, today the reverse is true. It is still possible, and occasionally, people still do it, as a very techie acquaintance of this vulture recently demonstrated… but it is sadly rare.

We rather fear that live syntax validation as you hand-code HTML is one answer to this, but on its own isn't sufficient. But we really wish it were – and we would be very happy to be wrong.

As we have described before, there are still some ultra-lightweight web browsers out there, such as the recently revived Dillo. Since that article, Dillo received another update, to version 3.1.1, which coincidentally brings its version number to parity with the latest NetSurf. Perhaps someone somewhere could resurrect a competition for the tiniest and simplest fully functional website, in the spirit of the 5k and the later 10k Apart contest. ®

Source: theregister.com

Other stories
23 minutes ago - Researchers have uncovered an enormous lithium deposit in southwestern Arkansas – a discovery that has the potential to remake the electric vehicle industry and bolster the US' position in the clean energy race.Read Entire Article
38 minutes ago - As another government yet again seeks to reform UK GDPR, legislators say data must continue to flow UK lawmakers have warned the government that if it doesn't continue to harmonize its post-Brexit data rules with the EU, the consequences...
46 minutes ago - These simple tricks can help you boost your smartphone signal, no matter where you roam.
46 minutes ago - I deployed a handful of tactics to rid my apartment of mice, including safe and humane peppermint spray. Here's how it went.
46 minutes ago - Why You Can Trust CNET Our expert, award-winning staff selects the products we cover and rigorously researches and tests our top picks. If you buy...