From 9fe704f88e455f886c8854604b2869c72b28e510 Mon Sep 17 00:00:00 2001 From: Christian Clason <christian.clason@uni-due.de> Date: Sun, 3 Oct 2021 13:40:59 +0200 Subject: [PATCH] vim-patch:8.2.3464: nginx files are not recognized (#15883) Problem: nginx files are not recognized. Solution: Add several file patterns. (Chris Aumann, closes vim/vim#8922) https://github.com/vim/vim/commit/8b8c0ed657fabd88e610401ca8a12366f987db94 --- runtime/filetype.vim | 3 +++ src/nvim/testdir/test_filetype.vim | 1 + 2 files changed, 4 insertions(+) diff --git a/runtime/filetype.vim b/runtime/filetype.vim index bc3965d4b6..5e0c6fb32e 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1136,6 +1136,9 @@ au BufNewFile,BufRead Neomuttrc setf neomuttrc " Netrc au BufNewFile,BufRead .netrc setf netrc +" Nginx +au BufNewFile,BufRead *.nginx,nginx*.conf,*nginx.conf,*/etc/nginx/*,*/usr/local/nginx/conf/*,*/nginx/*.conf setf nginx + " Ninja file au BufNewFile,BufRead *.ninja setf ninja diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim index cc789cb6bd..9eb64f68ef 100644 --- a/src/nvim/testdir/test_filetype.vim +++ b/src/nvim/testdir/test_filetype.vim @@ -344,6 +344,7 @@ let s:filename_checks = { \ 'nanorc': ['/etc/nanorc', 'file.nanorc', 'any/etc/nanorc'], \ 'ncf': ['file.ncf'], \ 'netrc': ['.netrc'], + \ 'nginx': ['file.nginx', 'nginxfile.conf', 'filenginx.conf', 'any/etc/nginx/file', 'any/usr/local/nginx/conf/file', 'any/nginx/file.conf'], \ 'ninja': ['file.ninja'], \ 'nqc': ['file.nqc'], \ 'nroff': ['file.tr', 'file.nr', 'file.roff', 'file.tmac', 'file.mom', 'tmac.file'],