You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wasn't sure whether to file this as a bug or feature request, but the primary driver here is adding support for HEEx templates, which were added to the Phoenix web framework somewhat recently. Those embed what is something like eex syntax directly inside of an Elixir .ex file.
defmoduleMyAppWeb.ThermostatLivedo# In Phoenix v1.6+ apps, the line is typically: use MyAppWeb, :live_viewusePhoenix.LiveViewdefrender(assigns)do~H""" Current temperature: <%= @temperature %>°F <button phx-click="inc_temperature">+</button>"""enddefmount(_params,_session,socket)dotemperature=70# Let's assume a fixed temperature for now{:ok,assign(socket,:temperature,temperature)}enddefhandle_event("inc_temperature",_params,socket)do{:noreply,update(socket,:temperature,&(&1+1))}endend
However, when I was exploring further, I realized that in general sigils that use """ delimiters also don't work as expected. I think adding support for HEEx completely (like, for example, in tree-sitter-heex) would be nice but difficult. In the short term, doing what GitHub does and ensuring that """-enclosed sigils are treated as strings would be great.
The text was updated successfully, but these errors were encountered:
Name of the lexer
Elixir
Code sample
This is taken from the elixir documentation about sigils and character escaping:
Link to
jneen
example: rouge.jneen.net.Additional context
I wasn't sure whether to file this as a bug or feature request, but the primary driver here is adding support for
HEEx
templates, which were added to the Phoenix web framework somewhat recently. Those embed what is something likeeex
syntax directly inside of an Elixir.ex
file.Here is an example from the Phoenix LiveView getting started documentation:
(and relevant
jneen
link)However, when I was exploring further, I realized that in general sigils that use
"""
delimiters also don't work as expected. I think adding support for HEEx completely (like, for example, in tree-sitter-heex) would be nice but difficult. In the short term, doing what GitHub does and ensuring that"""
-enclosed sigils are treated as strings would be great.The text was updated successfully, but these errors were encountered: