]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.0389: filetype: templ files are not recognized v9.1.0389
authortris203 <admin@snappeh.com>
Thu, 2 May 2024 11:08:25 +0000 (13:08 +0200)
committerChristian Brabandt <cb@256bit.org>
Thu, 2 May 2024 11:08:25 +0000 (13:08 +0200)
Problem:  filetype: templ files are not recognized
Solution: Detect '*.templ' files as filetype templ
          (Tristan Knight)

See:
- https://github.com/a-h/templ
- https://templ.guide/

closes: #14697

Signed-off-by: tris203 <admin@snappeh.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/filetype.vim
src/testdir/test_filetype.vim
src/version.c

index 0532c5f514ac12d77d26b7803f5329a1199b85c5..de432869babcaaaeaba8e57f6b4a3bda4554fcd7 100644 (file)
@@ -2383,6 +2383,9 @@ au BufNewFile,BufRead *.tcl,*.tm,*.tk,*.itcl,*.itk,*.jacl,.tclshrc,.wishrc,.tcls
 " Xilinx's xsct and xsdb use tcl
 au BufNewFile,BufRead .xsctcmdhistory,.xsdbcmdhistory  setf tcl
 
+" templ 
+au BufNewFile,BufRead *.templ                  setf templ
+
 " Teal
 au BufRead,BufNewFile *.tl                     setf teal
 
index d96cce79268aec5fa610687b5bbd90dcb6da0e8f..1dc79fd52ac6487d324a909c34780ada13b2c5d4 100644 (file)
@@ -747,6 +747,7 @@ def s:GetFilenameChecks(): dict<list<string>>
     tcl: ['file.tcl', 'file.tm', 'file.tk', 'file.itcl', 'file.itk', 'file.jacl', '.tclshrc', 'tclsh.rc', '.wishrc', '.tclsh-history', '.xsctcmdhistory', '.xsdbcmdhistory'],
     tablegen: ['file.td'],
     teal: ['file.tl'],
+    templ: ['file.templ'],
     template: ['file.tmpl'],
     teraterm: ['file.ttl'],
     terminfo: ['file.ti'],
index 99346430583dbc08397088c5fc759a94014e2232..da56ffc1caa5fe266da36464aa52bea9ca37f4e1 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    389,
 /**/
     388,
 /**/