Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update HEEx comment syntax #581

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ftplugin/eelixir.vim
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ if !exists('b:surround_5')
let b:surround_5 = "<% \r %>\n<% end %>"
endif

setlocal comments=:<%#
setlocal commentstring=<%#\ %s\ %>
setlocal comments=:<%!--
setlocal commentstring=<%!--\ %s\ --%>

let b:undo_ftplugin = "setl cms< " .
\ " | unlet! b:browsefilter b:match_words | " . s:undo_ftplugin
Expand Down
2 changes: 1 addition & 1 deletion syntax/eelixir.vim
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ exe 'syn region surfaceExpression matchgroup=surfaceDelimiter start="{{" end="}
exe 'syn region surfaceExpression matchgroup=surfaceDelimiter start="{" end="}" contains=@elixirTop containedin=ALLBUT,@eelixirRegions keepend'
exe 'syn region surfaceExpression matchgroup=surfaceDelimiter start="{" end="}" skip="#{[^}]*}" contains=@elixirTop containedin=htmlValue keepend'
exe 'syn region eelixirQuote matchgroup=eelixirDelimiter start="<%%" end="%\@<!%>" contains=@elixirTop containedin=ALLBUT,@eelixirRegions keepend'
exe 'syn region eelixirComment matchgroup=eelixirDelimiter start="<%#" end="%\@<!%>" contains=elixirTodo,@Spell containedin=ALLBUT,@eelixirRegions keepend'
exe 'syn region eelixirComment matchgroup=eelixirDelimiter start="<%!--" end="%\@<!--%>"'

" Define the default highlighting.

Expand Down
2 changes: 1 addition & 1 deletion syntax/elixir.vim
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ syn region heexComponent matchgroup=eelixirDelimiter start="<\.[a-z_]\+" end="%
syn region eelixirExpression matchgroup=eelixirDelimiter start="<%" end="%\@<!%>" contains=ALLBUT,@elixirNotTop containedin=@elixirTemplateSigils keepend
syn region eelixirExpression matchgroup=eelixirDelimiter start="<%=" end="%\@<!%>" contains=ALLBUT,@elixirNotTop containedin=@elixirTemplateSigils keepend
syn region eelixirQuote matchgroup=eelixirDelimiter start="<%%" end="%\@<!%>" contains=ALLBUT,@elixirNotTop containedin=@elixirTemplateSigils keepend
syn region heexComment matchgroup=eelixirDelimiter start="<%!--" end="%\@<!--%>" contains=elixirTodo,eelixirComment,@Spell containedin=@elixirTemplateSigils keepend
syn region heexComment matchgroup=eelixirDelimiter start="<%!--"ms=s-1 end="%\@<!--%>"me=e+1 containedin=@HTML,@elixirTemplateSigils keepend
syn region heexExpression matchgroup=heexDelimiter start="=\zs{" end="}" contains=ALLBUT,@elixirNotTop containedin=htmlValue keepend
syn region heexExpression matchgroup=heexDelimiter start="=\zs{" end="}" skip="#{[^}]*}" contains=ALLBUT,@elixirNotTop containedin=htmlValue keepend
" missing `keepend` on next line is intentional
Expand Down