diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-06-26 10:50:17 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-06-26 10:51:29 -0400 |
commit | 750ad1884586628c5aa7fca7a23411035ce26a42 (patch) | |
tree | 4aa129cc6a0b882735520f95717940abe7f8ce22 /runtime/autoload | |
parent | 5c0b01fd887ff5043e196a0e21f03d547e65a98b (diff) | |
download | rneovim-750ad1884586628c5aa7fca7a23411035ce26a42.tar.gz rneovim-750ad1884586628c5aa7fca7a23411035ce26a42.tar.bz2 rneovim-750ad1884586628c5aa7fca7a23411035ce26a42.zip |
vim-patch:8.2.3050: cannot recognize elixir files
Problem: Cannot recognize elixir files.
Solution: Recognize Elixir-specific files. Check if an .ex file is Euphoria
or Elixir. (Austin Gatlin, closes vim/vim#8401, closes vim/vim#8446)
https://github.com/vim/vim/commit/f3caeb63d62c08b579e9b5f40b35e8bf64dde87a
Diffstat (limited to 'runtime/autoload')
-rw-r--r-- | runtime/autoload/dist/ft.vim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/runtime/autoload/dist/ft.vim b/runtime/autoload/dist/ft.vim index 1ac74b5785..ac80659113 100644 --- a/runtime/autoload/dist/ft.vim +++ b/runtime/autoload/dist/ft.vim @@ -172,6 +172,17 @@ func dist#ft#FTent() setf dtd endfunc +func dist#ft#ExCheck() + let lines = getline(1, min([line("$"), 100])) + if exists('g:filetype_euphoria') + exe 'setf ' . g:filetype_euphoria + elseif match(lines, '^--\|^ifdef\>\|^include\>') > -1 + setf euphoria3 + else + setf elixir + endif +endfunc + func dist#ft#EuphoriaCheck() if exists('g:filetype_euphoria') exe 'setf ' . g:filetype_euphoria |