Skip to content

Commit

Permalink
Remove ftdetect
Browse files Browse the repository at this point in the history
Elixir and all of the most popular template syntaxes
(LEEx, HEEx, Surface) are included in Vim and Neovim's native filetype
detection and now longer have to provided by a plugin.

I noticed the FileType event was being emitted twice when opening Elixir
files, which was causing me some problems. This should fix that.

This also switches the .lexs extension for eelixir to elixir, as that
those files are have elixir in them, not eelixir.
  • Loading branch information
mhanberg committed Mar 27, 2022
1 parent ff7a122 commit 8f35c74
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ftdetect/elixir.vim
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
au BufRead,BufNewFile *.ex,*.exs set filetype=elixir
au BufRead,BufNewFile *.eex,*.heex,*.leex,*.sface,*.lexs set filetype=eelixir
au BufRead,BufNewFile mix.lock set filetype=elixir
au BufRead,BufNewFile *.lexs set filetype=elixir "File extension used by https://github.com/mhanberg/temple
au BufRead,BufNewFile * call s:DetectElixir()

function! s:DetectElixir()
Expand Down

0 comments on commit 8f35c74

Please sign in to comment.