1
0
forked from aniani/vim

patch 9.0.2062: Janet files are not recognised

Problem:  Janet files are not recognised
Solution: Add filename and shebang detection (without
          adding an extra filetype plugin)

Those are used by the Janet language:
http://www.janet-lang.org

closes: #13400

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
This commit is contained in:
Doug Kearns
2023-10-23 19:24:05 +02:00
committed by Christian Brabandt
parent ae9021a840
commit c038427d2a
4 changed files with 11 additions and 0 deletions

View File

@@ -217,6 +217,10 @@ export def Exe2filetype(name: string, line1: string): string
elseif name =~ '^\%(rexx\|regina\)\>'
return 'rexx'
# Janet
elseif name =~ '^janet\>'
return 'janet'
endif
return ''

View File

@@ -1034,6 +1034,9 @@ au BufNewFile,BufRead *.jal,*.JAL setf jal
" Jam
au BufNewFile,BufRead *.jpl,*.jpr setf jam
" Janet
au BufNewFile,BufRead *.janet setf janet
" Java
au BufNewFile,BufRead *.java,*.jav setf java