vim-patch:9.1.0998: filetype: TI assembly files are not recognized (#31929)

Problem:  filetype: TI assembly files are not recognized
Solution: inspect '*.sa' and assembly files and detect TI assembly
          files, include filetype plugin and syntax script for TI
          assembly files (Wu, Zhenyu)

closes: vim/vim#15827

4f73c07abf

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
This commit is contained in:
zeertzjq
2025-01-09 17:30:26 +08:00
committed by GitHub
parent d740a4274d
commit 3f0adf90de
5 changed files with 152 additions and 2 deletions

View File

@@ -672,7 +672,6 @@ func s:GetFilenameChecks() abort
\ 'samba': ['smb.conf'],
\ 'sas': ['file.sas'],
\ 'sass': ['file.sass'],
\ 'sather': ['file.sa'],
\ 'sbt': ['file.sbt'],
\ 'scala': ['file.scala'],
\ 'scheme': ['file.scm', 'file.ss', 'file.sld', 'file.stsg', 'any/local/share/supertux2/config', '.lips_repl_history'],
@@ -2322,6 +2321,22 @@ func Test_cmd_file()
filetype off
endfunc
func Test_sa_file()
filetype on
call writefile([';* XXX-a.sa: XXX for TI C6000 DSP *;', '.no_mdep'], 'Xfile.sa')
split Xfile.sa
call assert_equal('tiasm', &filetype)
bwipe!
call writefile(['-- comment'], 'Xfile.sa')
split Xfile.sa
call assert_equal('sather', &filetype)
bwipe!
filetype off
endfunc
func Test_sig_file()
filetype on