Closed ohmree closed 3 years ago
@ohmree how much difference is .sface from .heex? would it be good enough to get .heex to work and then use it for surface?
@ohmree how much difference is .sface from .heex? would it be good enough to get .heex to work and then use it for surface?
I'm not sure actually, I've since moved on to another project so it's been a while since I've used phoenix. You might have better luck asking the surface authors.
Maybe it is worth closing this for now then as there seems to be no interest?
@wkirschbaum I think so .... if there are a lot of Surface users perhaps I'll look at it
@ohmree how much difference is .sface from .heex? would it be good enough to get .heex to work and then use it for surface?
Is there work being done on .heex
? Phoenix is going to deprecate .leex
at some point.
Surface is a markup language for writing Phoenix Liveview components, kind of like Vue or Svelte but with embedded Elixir expressions instead of JS.
The language uses the
.sface
file extension and the main syntactic additions to regular HTML are:{!-- comment syntax that looks like this --}
in addition to regular html comments.{arbitrary_embedded(:elixir_code)}
along with some syntactic sugar for common usecases that are described in the docs - should be properly highlighted as elixir code.{#unless expr} foo {/unless}
, whereexpr
is a valid elixir expression and should have proper syntax highlighting.:
, e.g.<div :if={@loading}>
.More detailed information can be found in the docs I linked above.
I've tried to implement this myself a couple of times now but I'm not even remotely close to being able to wrap my head around the structure of
web-mode.el
, so if someone who's more familiar with the codebase could help it'd be gladly appreciated (although 100% not necessary!).