commit 5f0224e848740eaf8fa68fe9cd89b060b31616fc
parent d432bba4e46cf215a1879cdbe7673160e612425a
Author: Christian Clason <c.clason@uni-graz.at>
Date: Mon, 23 Oct 2023 19:19:58 +0200
vim-patch:9.0.2060: *.{gn,gni} files are not recognized
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: vim/vim#13405
https://github.com/vim/vim/commit/84394f2be4a750f1e26b478e36de041663f4b5a4
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
Diffstat:
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua
@@ -459,6 +459,8 @@ local extension = {
gift = 'gift',
gleam = 'gleam',
glsl = 'glsl',
+ gn = 'gn',
+ gni = 'gn',
gpi = 'gnuplot',
go = 'go',
gp = 'gp',
diff --git a/test/old/testdir/test_filetype.vim b/test/old/testdir/test_filetype.vim
@@ -267,6 +267,7 @@ func s:GetFilenameChecks() abort
\ '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'],