From e45d141e28a4b31b4c98f7ed1655e9c7141ae74f Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Sat, 2 Apr 2022 13:36:19 +0200 Subject: [PATCH] vim-patch:8.2.4664: Elvish files are not recognized (#17963) Problem: Elvish files are not recognized. Solution: Recognize .elv files. (Bruno Roque, closes vim/vim#10058) https://github.com/vim/vim/commit/c1658a196bb05dd96562fd0a92409be2201b62e9 --- runtime/filetype.vim | 3 +++ runtime/lua/vim/filetype.lua | 1 + src/nvim/testdir/test_filetype.vim | 1 + 3 files changed, 5 insertions(+) diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 65e0b49e61..2f4b03606c 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -416,6 +416,9 @@ au BufNewFile,BufRead *.ex call dist#ft#ExCheck() au BufRead,BufNewFile mix.lock,*.exs setf elixir au BufRead,BufNewFile *.eex,*.leex setf eelixir +" Elvish +au BufRead,BufNewFile *.elv setf elvish + " Euphoria 3 or 4 au BufNewFile,BufRead *.eu,*.ew,*.exu,*.exw call dist#ft#EuphoriaCheck() if has("fname_case") diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua index 927ef36391..65edaed530 100644 --- a/runtime/lua/vim/filetype.lua +++ b/runtime/lua/vim/filetype.lua @@ -177,6 +177,7 @@ local extension = { leex = "eelixir", exs = "elixir", elm = "elm", + elv = "elvish", epp = "epuppet", erl = "erlang", hrl = "erlang", diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim index dd08d8bd09..720c003ace 100644 --- a/src/nvim/testdir/test_filetype.vim +++ b/src/nvim/testdir/test_filetype.vim @@ -168,6 +168,7 @@ let s:filename_checks = { \ 'eelixir': ['file.eex', 'file.leex'], \ 'elm': ['file.elm'], \ 'elmfilt': ['filter-rules'], + \ 'elvish': ['file.elv'], \ 'epuppet': ['file.epp'], \ 'erlang': ['file.erl', 'file.hrl', 'file.yaws'], \ 'eruby': ['file.erb', 'file.rhtml'],