From c24dcb1bea1fcd7384ccb09bd3bd1d25db51f890 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Sun, 31 Mar 2024 18:57:50 +0200 Subject: vim-patch:9.1.0234: filetype: support for Intel HEX files is lacking Problem: filetype: support for Intel HEX files is lacking Solution: Add more file extensions that are typical for Intel HEX files (Wu, Zhenyu) Reference: https://en.wikipedia.org/wiki/Intel_HEX closes: vim/vim#14355 https://github.com/vim/vim/commit/e523dd9803ed62ea0657af8c85ab7bdfe80f4c53 Co-authored-by: Wu, Zhenyu --- runtime/lua/vim/filetype.lua | 9 +++++++++ test/old/testdir/test_filetype.vim | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua index cb5b8fec7a..13a3953e8a 100644 --- a/runtime/lua/vim/filetype.lua +++ b/runtime/lua/vim/filetype.lua @@ -504,7 +504,16 @@ local extension = { vc = 'hercules', heex = 'heex', hex = 'hex', + ['a43'] = 'hex', + ['a90'] = 'hex', ['h32'] = 'hex', + ['h80'] = 'hex', + ['h86'] = 'hex', + ihex = 'hex', + ihe = 'hex', + ihx = 'hex', + int = 'hex', + mcs = 'hex', hjson = 'hjson', m3u = 'hlsplaylist', m3u8 = 'hlsplaylist', diff --git a/test/old/testdir/test_filetype.vim b/test/old/testdir/test_filetype.vim index c5e0d6808f..3def636f38 100644 --- a/test/old/testdir/test_filetype.vim +++ b/test/old/testdir/test_filetype.vim @@ -302,7 +302,7 @@ func s:GetFilenameChecks() abort \ 'hcl': ['file.hcl'], \ 'heex': ['file.heex'], \ 'hercules': ['file.vc', 'file.ev', 'file.sum', 'file.errsum'], - \ 'hex': ['file.hex', 'file.h32'], + \ 'hex': ['file.hex', 'file.ihex', 'file.ihe', 'file.ihx', 'file.int', 'file.mcs', 'file.h32', 'file.h80', 'file.h86', 'file.a43', 'file.a90'], \ 'hgcommit': ['hg-editor-file.txt'], \ 'hjson': ['file.hjson'], \ 'hlsplaylist': ['file.m3u', 'file.m3u8'], -- cgit