From 37abcdd04423b82765a360f28d556cb35ffd9ee9 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 30 May 2026 11:47:59 +0800 Subject: [PATCH] vim-patch:9.2.0562: filetype: SGF files are not recognized Problem: filetype: SGF files are not recognized Solution: Detect *.sgf as sgf filetype (Borys Lykah) Reference: https://www.red-bean.com/sgf/index.html closes: vim/vim#20349 https://github.com/vim/vim/commit/dda45ba88fef901ac524c158eaeb1ce799dde273 Co-authored-by: Borys Lykah --- runtime/lua/vim/filetype.lua | 1 + test/old/testdir/test_filetype.vim | 1 + 2 files changed, 2 insertions(+) diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua index 4c89200f5d..92ed432e22 100644 --- a/runtime/lua/vim/filetype.lua +++ b/runtime/lua/vim/filetype.lua @@ -1191,6 +1191,7 @@ local extension = { sdl = 'sdl', sed = 'sed', sexp = 'sexplib', + sgf = 'sgf', bash = detect.bash, bats = detect.bash, cygport = detect.bash, diff --git a/test/old/testdir/test_filetype.vim b/test/old/testdir/test_filetype.vim index eabb6fb7ca..9268802d8f 100644 --- a/test/old/testdir/test_filetype.vim +++ b/test/old/testdir/test_filetype.vim @@ -740,6 +740,7 @@ func s:GetFilenameChecks() abort \ 'services': ['/etc/services', 'any/etc/services'], \ 'setserial': ['/etc/serial.conf', 'any/etc/serial.conf'], \ 'sexplib': ['file.sexp'], + \ 'sgf': ['file.sgf'], \ 'sh': ['.bashrc', '.bash_profile', '.bash-profile', '.bash_logout', '.bash-logout', '.bash_aliases', '.bash-aliases', '.bash_history', '.bash-history', \ '/tmp/bash-fc-3Ozjlw', '/tmp/bash-fc.3Ozjlw', 'PKGBUILD', 'file.bash', '/usr/share/doc/bash-completion/filter.sh', \ '/etc/udev/cdsymlinks.conf', 'any/etc/udev/cdsymlinks.conf', 'file.bats', '.ash_history', 'any/etc/neofetch/config.conf', '.xprofile',