]> granicus.if.org Git - vim/commitdiff
patch 8.2.4424: ".gts" and ".gjs" files are not recognized v8.2.4424
authorNullVoxPopuli <LPSego3+dev@gmail.com>
Sat, 19 Feb 2022 16:35:58 +0000 (16:35 +0000)
committerBram Moolenaar <Bram@vim.org>
Sat, 19 Feb 2022 16:35:58 +0000 (16:35 +0000)
Problem:    ".gts" and ".gjs" files are not recognized.
Solution:   Recognize Glimmer flavored typescript and javascript.
            (closes #9799)

runtime/filetype.vim
src/testdir/test_filetype.vim
src/version.c

index c75fdfb8c7560ae022160aa731d256c12b25e252..df076d16955d2d1e1943ecea3836a35fa2a17277 100644 (file)
@@ -730,6 +730,10 @@ au BufNewFile,BufRead gnashrc,.gnashrc,gnashpluginrc,.gnashpluginrc setf gnash
 au BufNewFile,BufRead gitolite.conf            setf gitolite
 au BufNewFile,BufRead {,.}gitolite.rc,example.gitolite.rc      setf perl
 
+" Glimmer-flavored TypeScript and JavaScript
+au BufNewFile,BufRead *.gts    setf typescript.glimmer
+au BufNewFile,BufRead *.gjs    setf javascript.glimmer
+
 " Gnuplot scripts
 au BufNewFile,BufRead *.gpi,.gnuplot           setf gnuplot
 
index eaaa39a9cc07aec3ddbb2aeed66025ed33efac6f..01978ef3f9523d530f377af40f57f69ea1898b4c 100644 (file)
@@ -272,6 +272,7 @@ let s:filename_checks = {
     \ 'java': ['file.java', 'file.jav'],
     \ 'javacc': ['file.jj', 'file.jjt'],
     \ 'javascript': ['file.js', 'file.javascript', 'file.es', 'file.mjs', 'file.cjs'],
+    \ 'javascript.glimmer': ['file.gjs'],
     \ 'javascriptreact': ['file.jsx'],
     \ 'jess': ['file.clp'],
     \ 'jgraph': ['file.jgr'],
@@ -547,6 +548,7 @@ let s:filename_checks = {
     \ 'tssgm': ['file.tssgm'],
     \ 'tssop': ['file.tssop'],
     \ 'twig': ['file.twig'],
+    \ 'typescript.glimmer': ['file.gts'],
     \ 'typescriptreact': ['file.tsx'],
     \ 'uc': ['file.uc'],
     \ 'udevconf': ['/etc/udev/udev.conf', 'any/etc/udev/udev.conf'],
index 7d585ba08313bc3c46a661afc13d97bfede2403a..f15153131cf5f7f20f4c2c7055fa38ba6b543702 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    4424,
 /**/
     4423,
 /**/