diff options
author | Doug Kearns <dougkearns@gmail.com> | 2023-10-23 19:24:05 +0200 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2023-10-23 19:24:05 +0200 |
commit | c038427d2a27445e612761f19c92b2b8b05afdea (patch) | |
tree | 13a5fd47a162bc5ffd5c44e847aecc59f8a4238c /runtime | |
parent | ae9021a840db3253b0e0cb84186faae73368afd7 (diff) |
patch 9.0.2062: Janet files are not recognisedv9.0.2062
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>
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/autoload/dist/script.vim | 4 | ||||
-rw-r--r-- | runtime/filetype.vim | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/runtime/autoload/dist/script.vim b/runtime/autoload/dist/script.vim index fca5dcdbe6..fd7b8e08f8 100644 --- a/runtime/autoload/dist/script.vim +++ b/runtime/autoload/dist/script.vim @@ -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 '' diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 07d6bbfca1..aa66bead32 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -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 |