]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.0.2060: *.{gn,gni} files are not recognized v9.0.2060
authorAmaan Qureshi <amaanq12@gmail.com>
Mon, 23 Oct 2023 17:16:14 +0000 (19:16 +0200)
committerChristian Brabandt <cb@256bit.org>
Mon, 23 Oct 2023 17:16:14 +0000 (19:16 +0200)
Problem:  *.{gn,gni} files are not recognized
Solution: Detect some as gn filetype (without adding an extra filetype)

Those come from: https://gn.googlesource.com/gn/

closes: #13405

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
runtime/filetype.vim
src/testdir/test_filetype.vim
src/version.c

index 54bc7a55f46932e744f893889194910fab1e184a..6fef4b77a7d9b37c408aeafb43f1c53c8e740fd0 100644 (file)
@@ -818,6 +818,9 @@ au BufNewFile,BufRead *.gleam                       setf gleam
 " GLSL
 au BufNewFile,BufRead *.glsl                   setf glsl
 
+" GN (generate ninja) files
+au BufNewFile,BufRead *.gn,*.gni               setf gn
+
 " GP scripts (2.0 and onward)
 au BufNewFile,BufRead *.gp,.gprc               setf gp
 
index ce4d5ea2cff0c272e88ad72f7a2a485b655e26e2..bfaab514ebbf0871a31385666f966cd820f7b651 100644 (file)
@@ -277,6 +277,7 @@ def s:GetFilenameChecks(): dict<list<string>>
     gkrellmrc: ['gkrellmrc', 'gkrellmrc_x'],
     gleam: ['file.gleam'],
     glsl: ['file.glsl'],
+    gn: ['file.gn', 'file.gni'],
     gnash: ['gnashrc', '.gnashrc', 'gnashpluginrc', '.gnashpluginrc'],
     gnuplot: ['file.gpi', '.gnuplot'],
     go: ['file.go'],
index 8f0a9c3ba530fc0255410e601f70ca70e8ec2a67..37a31fdace5e776cace13f8902bab7521ed20d00 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2060,
 /**/
     2059,
 /**/