DONE: Could syntax highlighting for htmx and _hyperscript be implemented?
DONE: Could syntax highlighting for htmx and _hyperscript be implemented?
Their websites are htmx.org and hyperscript.org. As I know there are syntax highlighting already available for VSCode and Sublime Text.
Re: Could syntax highlighting for htmx and _hyperscript be implemented?
Do you think it's worth trying? According to htmx author's own words, htmx is over.
...Okay, okay, it will be back in the afternoon, as always is. (For those of you who don't follow @htmx_org on Twitter, htmx is regularly "over", only to be "back" in a couple of hours/days later, with new logo and new memes. It is just an injoke, the technology itself is very interesting, and the progress is stable.)
What is htmx?
htmx code may look like this:
(from https://htmx.org/examples/confirm/)
There is indeed hyperscript syntax highlighting for Sublime Text. Highlighted htmx code looks like this (basically it is highlighting inside HTML attributes values):

I think it would be a valuable enhancement to RJ TE. Keywords are listed in one of these files at Github, however being able to use Sublime's syntax files verbatim would be even bigger win for RJ TE.
...Okay, okay, it will be back in the afternoon, as always is. (For those of you who don't follow @htmx_org on Twitter, htmx is regularly "over", only to be "back" in a couple of hours/days later, with new logo and new memes. It is just an injoke, the technology itself is very interesting, and the progress is stable.)
What is htmx?
Instead of JSON, it imports HTML chunks from the server and inserts them into DOM (true REST approach).htmx is a library that allows you to access modern browser features directly from HTML, rather than using javascript.
https://htmx.org/docs/
htmx code may look like this:
Code: Select all
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<button hx-get="/confirmed"
_="on htmx:confirm(issueRequest)
halt the event
call Swal.fire({title: 'Confirm', text:'Do you want to continue?'})
if result.isConfirmed issueRequest()">
Click Me
</button>
There is indeed hyperscript syntax highlighting for Sublime Text. Highlighted htmx code looks like this (basically it is highlighting inside HTML attributes values):

I think it would be a valuable enhancement to RJ TE. Keywords are listed in one of these files at Github, however being able to use Sublime's syntax files verbatim would be even bigger win for RJ TE.
Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus
- Rickard Johansson
- Site Admin
- Posts: 6783
- Joined: 19 Jul 2006 14:29
Re: Could syntax highlighting for htmx and _hyperscript be implemented?
Will be added in the next release (v15.91). Thanks!
I may still make some minor changes, but it seems to be working properly...
I may still make some minor changes, but it seems to be working properly...
Re: DONE: Could syntax highlighting for htmx and _hyperscript be implemented?
Yay! htmx all the way!

Alium tibi quaere fratrem; hic, quem tuum putas, meus est. Titus Flāvius Caesar Vespasiānus Augustus