diff options
author | Christian Clason <c.clason@uni-graz.at> | 2023-10-23 19:30:44 +0200 |
---|---|---|
committer | Christian Clason <c.clason@uni-graz.at> | 2023-10-24 10:15:47 +0200 |
commit | 4f0adb6a783e2d92301d5391c4b35a62268d2a00 (patch) | |
tree | ba8f34123f5199237a4f7eb7b9884dde3799f55a /runtime/lua/vim | |
parent | 94fee354465d7d8636f454a9bcca9080ef9e50bd (diff) | |
download | rneovim-4f0adb6a783e2d92301d5391c4b35a62268d2a00.tar.gz rneovim-4f0adb6a783e2d92301d5391c4b35a62268d2a00.tar.bz2 rneovim-4f0adb6a783e2d92301d5391c4b35a62268d2a00.zip |
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: vim/vim#13400
https://github.com/vim/vim/commit/c038427d2a27445e612761f19c92b2b8b05afdea
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
Diffstat (limited to 'runtime/lua/vim')
-rw-r--r-- | runtime/lua/vim/filetype.lua | 1 | ||||
-rw-r--r-- | runtime/lua/vim/filetype/detect.lua | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua index 763ed99914..3c3e2a7b5b 100644 --- a/runtime/lua/vim/filetype.lua +++ b/runtime/lua/vim/filetype.lua @@ -536,6 +536,7 @@ local extension = { jal = 'jal', jpr = 'jam', jpl = 'jam', + janet = 'janet', jav = 'java', java = 'java', jj = 'javacc', diff --git a/runtime/lua/vim/filetype/detect.lua b/runtime/lua/vim/filetype/detect.lua index 934b02dcdd..e53ff08536 100644 --- a/runtime/lua/vim/filetype/detect.lua +++ b/runtime/lua/vim/filetype/detect.lua @@ -1652,8 +1652,9 @@ local patterns_hashbang = { ['icon\\>'] = { 'icon', { vim_regex = true } }, guile = 'scheme', ['nix%-shell'] = 'nix', - ['crystal\\>'] = { 'crystal', { vim_regex = true } }, + ['^crystal\\>'] = { 'crystal', { vim_regex = true } }, ['^\\%(rexx\\|regina\\)\\>'] = { 'rexx', { vim_regex = true } }, + ['^janet\\>'] = { 'janet', { vim_regex = true } }, } ---@private |