]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.0318: filetype: translate shell config files are not recognized v9.1.0318
authorWu, Zhenyu <wuzhenyu@ustc.edu>
Sat, 13 Apr 2024 16:28:28 +0000 (18:28 +0200)
committerChristian Brabandt <cb@256bit.org>
Sat, 13 Apr 2024 16:28:28 +0000 (18:28 +0200)
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>
runtime/filetype.vim
src/testdir/test_filetype.vim
src/version.c

index 96ecb1aaae905449a4d49f3d99b18a499ce80b3a..bdf2d6c6fe1a34c013f2d3c4116840ad05b90748 100644 (file)
@@ -1017,6 +1017,9 @@ au BufRead,BufNewFile *.hoon                      setf hoon
 " 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
index 3d513907c0c85a55602d5d517a03613e59287623..079a6e646214c9cbf6857f6ab151d895519473b2 100644 (file)
@@ -155,7 +155,7 @@ def s:GetFilenameChecks(): dict<list<string>>
     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'],
index 8b23724020b8df3cbaf031add545b6049477f733..b6c4e96c19df41573b68e67eacbaa6d8b8dc1b56 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    318,
 /**/
     317,
 /**/