aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/filetype.vim3
-rw-r--r--runtime/scripts.vim4
-rw-r--r--src/nvim/testdir/test_filetype.vim2
3 files changed, 9 insertions, 0 deletions
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 1343a1fd0b..250eea4ea6 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -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
diff --git a/runtime/scripts.vim b/runtime/scripts.vim
index 536993d485..3b3409bf4b 100644
--- a/runtime/scripts.vim
+++ b/runtime/scripts.vim
@@ -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
diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim
index 815827e224..74437b050e 100644
--- a/src/nvim/testdir/test_filetype.vim
+++ b/src/nvim/testdir/test_filetype.vim
@@ -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.