diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2022-05-26 02:07:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-25 18:07:58 -0600 |
commit | 068fb748e18f7907e2e2b9363b009fe5f3288f02 (patch) | |
tree | 9922a5a5f13d4ab1511ca682008fc28ef814399d | |
parent | 6db3f3f62457ff99a763d912f42d6d66eea8b74a (diff) | |
download | rneovim-068fb748e18f7907e2e2b9363b009fe5f3288f02.tar.gz rneovim-068fb748e18f7907e2e2b9363b009fe5f3288f02.tar.bz2 rneovim-068fb748e18f7907e2e2b9363b009fe5f3288f02.zip |
vim-patch:8.2.5015: Hoon and Moonscript files are not recognized (#18747)
Problem: Hoon and Moonscript files are not recognized.
Solution: Add filetype patterns. (Goc Dundar, closes vim/vim#10478)
https://github.com/vim/vim/commit/bf82df0dd48a26404b92a596498b6892c9572c53
-rw-r--r-- | runtime/filetype.vim | 8 | ||||
-rw-r--r-- | runtime/lua/vim/filetype.lua | 3 | ||||
-rw-r--r-- | src/nvim/testdir/test_filetype.vim | 4 |
3 files changed, 13 insertions, 2 deletions
diff --git a/runtime/filetype.vim b/runtime/filetype.vim index b8f40bbef0..c73f5f6cb7 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -405,7 +405,7 @@ au BufNewFile,BufRead *.cu,*.cuh setf cuda " Dockerfile; Podman uses the same syntax with name Containerfile " Also see Dockerfile.* below. -au BufNewFile,BufRead Containerfile,Dockerfile,*.Dockerfile setf dockerfile +au BufNewFile,BufRead Containerfile,Dockerfile,dockerfile,*.[dD]ockerfile setf dockerfile " WildPackets EtherPeek Decoder au BufNewFile,BufRead *.dcd setf dcd @@ -815,6 +815,9 @@ au BufNewFile,BufRead *.hjson setf hjson " Hollywood au BufRead,BufNewFile *.hws setf hollywood +" Hoon +au BufRead,BufNewFile *.hoon setf hoon + " Tilde (must be before HTML) au BufNewFile,BufRead *.t.html setf tilde @@ -1168,6 +1171,9 @@ au BufNewFile,BufRead *.isc,*.monk,*.ssc,*.tsc setf monk " MOO au BufNewFile,BufRead *.moo setf moo +" Moonscript +au BufNewFile,BufRead *.moon setf moonscript + " Modconf au BufNewFile,BufRead */etc/modules.conf,*/etc/modules,*/etc/conf.modules setf modconf diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua index c9e81b53d7..c26a43f776 100644 --- a/runtime/lua/vim/filetype.lua +++ b/runtime/lua/vim/filetype.lua @@ -283,6 +283,7 @@ local extension = { hjson = 'hjson', hog = 'hog', hws = 'hollywood', + hoon = 'hoon', htt = 'httest', htb = 'httest', iba = 'ibasic', @@ -418,6 +419,7 @@ local extension = { tsc = 'monk', isc = 'monk', moo = 'moo', + moon = 'moonscript', mp = 'mp', mof = 'msidl', odl = 'msidl', @@ -1058,6 +1060,7 @@ local filename = { ['.dircolors'] = 'dircolors', ['/etc/dnsmasq.conf'] = 'dnsmasq', Containerfile = 'dockerfile', + dockerfile = 'dockerfile', Dockerfile = 'dockerfile', npmrc = 'dosini', ['/etc/yum.conf'] = 'dosini', diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim index 9eccb4babd..4819c4877c 100644 --- a/src/nvim/testdir/test_filetype.vim +++ b/src/nvim/testdir/test_filetype.vim @@ -151,7 +151,7 @@ let s:filename_checks = { \ 'diff': ['file.diff', 'file.rej'], \ 'dircolors': ['.dir_colors', '.dircolors', '/etc/DIR_COLORS', 'any/etc/DIR_COLORS'], \ 'dnsmasq': ['/etc/dnsmasq.conf', '/etc/dnsmasq.d/file', 'any/etc/dnsmasq.conf', 'any/etc/dnsmasq.d/file'], - \ 'dockerfile': ['Containerfile', 'Dockerfile', 'file.Dockerfile', 'Dockerfile.debian', 'Containerfile.something'], + \ 'dockerfile': ['Containerfile', 'Dockerfile', 'dockerfile', 'file.Dockerfile', 'file.dockerfile', 'Dockerfile.debian', 'Containerfile.something'], \ 'dosbatch': ['file.bat'], \ 'dosini': ['.editorconfig', '/etc/yum.conf', 'file.ini', 'npmrc', '.npmrc', 'php.ini', 'php.ini-5', 'php.ini-file', '/etc/yum.repos.d/file', 'any/etc/yum.conf', 'any/etc/yum.repos.d/file', 'file.wrap'], \ 'dot': ['file.dot', 'file.gv'], @@ -245,6 +245,7 @@ let s:filename_checks = { \ 'hjson': ['file.hjson'], \ 'hog': ['file.hog', 'snort.conf', 'vision.conf'], \ 'hollywood': ['file.hws'], + \ 'hoon': ['file.hoon'], \ 'hostconf': ['/etc/host.conf', 'any/etc/host.conf'], \ 'hostsaccess': ['/etc/hosts.allow', '/etc/hosts.deny', 'any/etc/hosts.allow', 'any/etc/hosts.deny'], \ 'html': ['file.html', 'file.htm', 'file.cshtml'], @@ -353,6 +354,7 @@ let s:filename_checks = { \ 'modula3': ['file.m3', 'file.mg', 'file.i3', 'file.ig'], \ 'monk': ['file.isc', 'file.monk', 'file.ssc', 'file.tsc'], \ 'moo': ['file.moo'], + \ 'moonscript': ['file.moon'], \ 'mp': ['file.mp'], \ 'mplayerconf': ['mplayer.conf', '/.mplayer/config', 'any/.mplayer/config'], \ 'mrxvtrc': ['mrxvtrc', '.mrxvtrc'], |