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

% and Tag Highlighting are not working for HEEX as they are working for EElixir format #567

Open
collegeimprovements opened this issue Mar 3, 2023 · 4 comments

Comments

@collegeimprovements
Copy link

Filing a bug? Have you already tried updating vim-elixir? For indentation/highlighting bugs, please use the following template:

Actual EElixir filetype for same format

Screen Shot 2023-03-04 at 1 54 06 AM

Actual HEEX filetype for same format

Screen Shot 2023-03-04 at 1 56 01 AM

Also, % is not working as it doesn't take us to closing tag.

@mbramson
Copy link

mbramson commented Oct 8, 2023

Also encountering this. Using Neovim if that's useful.

@ghost
Copy link

ghost commented Oct 12, 2023

@mbramson , @collegeimprovements:

There was a commit on both vim & neovim runtime (vimscripts distributed along vim) to include support for matchit:

Take a look at vim/vim@8967f6c & neovim/neovim@9b2f251

Some distributions (like MacOS) don't allow modifying system files, but you can try including the patch in an after-directory, the exact location depends on your runtimepath setting.

For example, in my configuration, the patch sits on ~/.config/vim/after/ftplugin/heex.vim (it looks like this):

" See: https://github.com/vim/vim/blob/master/runtime/ftplugin/heex.vim

" HTML: thanks to Johannes Zellner and Benji Fisher.
if exists("loaded_matchit") && !exists("b:match_words")
  let b:match_ignorecase = 1
  let b:match_words = '<%\{-}!--:--%\{-}>,' ..
                    \ '<:>,' ..
                    \ '<\@<=[ou]l\>[^>]*\%(>\|$\):<\@<=li\>:<\@<=/[ou]l>,' ..
                    \ '<\@<=dl\>[^>]*\%(>\|$\):<\@<=d[td]\>:<\@<=/dl>,' ..
                    \ '<\@<=\([^/!][^ \t>]*\)[^>]*\%(>\|$\):<\@<=/\1>'
  let b:undo_ftplugin ..= " | unlet! b:match_ignorecase b:match_words"
endif

That would be only a work-around but that's what I can offer you right now since I'm not sure how vim-elixir should play along with $VIMRUNTIME 😅.

Hope it helps on the meantime 🙂.

@ghost
Copy link

ghost commented Oct 12, 2023

Forgot to mention that such patch only addresses the problem with matchit.

A work-around for syntax highlighting would be to include set syntax=eelixir on after/ftpulgin/heex.vim.

@sodapopcan
Copy link
Collaborator

Sorry, I linked the wrong issue. My PR does not affect this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants