vim-patch:8.2.2392: fennel filetype not recognized

Problem:    Fennel filetype not recognized.
Solution:   Detect with pattern and hashbang. (Chinmay Dalal, closes vim/vim#7729)
402115f1c2
This commit is contained in:
Jan Edmund Lazo
2021-01-23 11:18:30 -05:00
parent 69103ff0cf
commit 2ce7e4e8a7
3 changed files with 9 additions and 0 deletions

View File

@@ -585,6 +585,9 @@ au BufNewFile,BufRead *.fan,*.fwt setf fan
" Factor
au BufNewFile,BufRead *.factor setf factor
" Fennel
autocmd BufRead,BufNewFile *.fnl setf fennel
" Fetchmail RC file
au BufNewFile,BufRead .fetchmailrc setf fetchmail

View File

@@ -186,6 +186,10 @@ if s:line1 =~# "^#!"
elseif s:name =~# 'instantfpc\>'
set ft=pascal
" Fennel
elseif s:name =~# 'fennel\>'
set ft=fennel
endif
unlet s:name

View File

@@ -171,6 +171,7 @@ let s:filename_checks = {
\ 'factor': ['file.factor'],
\ 'falcon': ['file.fal'],
\ 'fan': ['file.fan', 'file.fwt'],
\ 'fennel': ['file.fnl'],
\ 'fetchmail': ['.fetchmailrc'],
\ 'fgl': ['file.4gl', 'file.4gh', 'file.m4gl'],
\ 'focexec': ['file.fex', 'file.focexec'],
@@ -622,6 +623,7 @@ let s:script_checks = {
\ ['// -*- C++ -*-']],
\ 'yaml': [['%YAML 1.2']],
\ 'pascal': [['#!/path/instantfpc']],
\ 'fennel': [['#!/path/fennel']],
\ }
" Various forms of "env" optional arguments.