Skip to content

Commit 4b5cd72

Browse files
Freed-Wuchrisbra
authored andcommitted
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>
1 parent 55d4f3c commit 4b5cd72

3 files changed

Lines changed: 6 additions & 1 deletion

File tree

runtime/filetype.vim

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1017,6 +1017,9 @@ au BufRead,BufNewFile *.hoon setf hoon
10171017
" Tilde (must be before HTML)
10181018
au BufNewFile,BufRead *.t.html setf tilde
10191019

1020+
" Translate shell
1021+
au BufNewFile,BufRead init.trans,*/etc/translate-shell,.trans setf clojure
1022+
10201023
" HTML (.shtml and .stm for server side)
10211024
au BufNewFile,BufRead *.html,*.htm,*.shtml,*.stm call dist#ft#FThtml()
10221025
au BufNewFile,BufRead *.cshtml setf html

src/testdir/test_filetype.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def s:GetFilenameChecks(): dict<list<string>>
155155
chuck: ['file.ck'],
156156
cl: ['file.eni'],
157157
clean: ['file.dcl', 'file.icl'],
158-
clojure: ['file.clj', 'file.cljs', 'file.cljx', 'file.cljc'],
158+
clojure: ['file.clj', 'file.cljs', 'file.cljx', 'file.cljc', 'init.trans', 'any/etc/translate-shell', '.trans'],
159159
cmake: ['CMakeLists.txt', 'file.cmake', 'file.cmake.in'],
160160
cmod: ['file.cmod'],
161161
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'],

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,8 @@ static char *(features[]) =
704704

705705
static int included_patches[] =
706706
{ /* Add new patch number below this line */
707+
/**/
708+
318,
707709
/**/
708710
317,
709711
/**/

0 commit comments

Comments
 (0)