patch 9.1.0318: filetype: translate shell config files are not recognized
Problem: filetype: translate shell config files are not recognized
Solution: Detect 'init.trans', 'translate-shell' and '.trans' files as
clojure (Wu, Zhenyu)
See: https://github.com/soimort/translate-shell/wiki/Configuration
closes: #14499
Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 96ecb1a..bdf2d6c 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1017,6 +1017,9 @@
" Tilde (must be before HTML)
au BufNewFile,BufRead *.t.html setf tilde
+" Translate shell
+au BufNewFile,BufRead init.trans,*/etc/translate-shell,.trans setf clojure
+
" HTML (.shtml and .stm for server side)
au BufNewFile,BufRead *.html,*.htm,*.shtml,*.stm call dist#ft#FThtml()
au BufNewFile,BufRead *.cshtml setf html
diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim
index 3d51390..079a6e6 100644
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -155,7 +155,7 @@
chuck: ['file.ck'],
cl: ['file.eni'],
clean: ['file.dcl', 'file.icl'],
- clojure: ['file.clj', 'file.cljs', 'file.cljx', 'file.cljc'],
+ clojure: ['file.clj', 'file.cljs', 'file.cljx', 'file.cljc', 'init.trans', 'any/etc/translate-shell', '.trans'],
cmake: ['CMakeLists.txt', 'file.cmake', 'file.cmake.in'],
cmod: ['file.cmod'],
cmusrc: ['any/.cmus/autosave', 'any/.cmus/rc', 'any/.cmus/command-history', 'any/.cmus/file.theme', 'any/cmus/rc', 'any/cmus/file.theme', '/.cmus/autosave', '/.cmus/command-history', '/.cmus/file.theme', '/.cmus/rc', '/cmus/file.theme', '/cmus/rc'],
diff --git a/src/version.c b/src/version.c
index 8b23724..b6c4e96 100644
--- a/src/version.c
+++ b/src/version.c
@@ -705,6 +705,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 318,
+/**/
317,
/**/
316,