Summary
Add brace matching support for heredoc delimiters ("""...""" and '''...''') so that when the cursor is positioned near a heredoc delimiter, its matching pair is highlighted.
Current Behavior
Currently, heredocs are tokenized as single tokens (EX_HEREDOC and EX_CHARLIST_HEREDOC) containing the entire heredoc content. This means the lexer produces:
EX_HEREDOC: """
multiline
content
"""
As a single token, there's no way to match the opening """ with the closing """.
Desired Behavior
When the cursor is near an opening """ or ''', the matching closing delimiter should be highlighted, similar to how do...end and fn...end work.
Reference
IntelliJ-Elixir implements this with HEREDOC_PROMOTER and HEREDOC_TERMINATOR tokens:
Acceptance Criteria
Summary
Add brace matching support for heredoc delimiters (
"""..."""and'''...''') so that when the cursor is positioned near a heredoc delimiter, its matching pair is highlighted.Current Behavior
Currently, heredocs are tokenized as single tokens (
EX_HEREDOCandEX_CHARLIST_HEREDOC) containing the entire heredoc content. This means the lexer produces:As a single token, there's no way to match the opening
"""with the closing""".Desired Behavior
When the cursor is near an opening
"""or''', the matching closing delimiter should be highlighted, similar to howdo...endandfn...endwork.Reference
IntelliJ-Elixir implements this with
HEREDOC_PROMOTERandHEREDOC_TERMINATORtokens:Acceptance Criteria
"""matches closing"""'''matches closing'''