Merge pull request #20368 from clason/vim-9.0.0599

vim-patch:9.0.0602: new TypeScript extensions are not recognized

Problem:    New TypeScript extensions are not recognized.
Solution:   Recognize .mts and .cts files. (closes vim/vim#11237)
7fc6c0e4da

vim-patch:9.0.0600: GYP files are not recognized

Problem:    GYP files are not recognized.
Solution:   Recognize GYP files. (closes vim/vim#11242)
d324742292

vim-patch:9.0.0599: latexmkrc files are not recognized

Problem:    Latexmkrc files are not recognized.
Solution:   Use Perl filetype for latexmkrc files. (closes vim/vim#11241)
cde0319385
This commit is contained in:
Christian Clason 2022-09-27 14:02:10 +02:00 committed by GitHub
commit 4278a2d359
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 5 deletions

View File

@ -771,8 +771,8 @@ au BufNewFile,BufRead gitolite.conf setf gitolite
au BufNewFile,BufRead {,.}gitolite.rc,example.gitolite.rc setf perl
" Glimmer-flavored TypeScript and JavaScript
au BufNewFile,BufRead *.gts setf typescript.glimmer
au BufNewFile,BufRead *.gjs setf javascript.glimmer
au BufNewFile,BufRead *.gts setf typescript.glimmer
au BufNewFile,BufRead *.gjs setf javascript.glimmer
" Gnuplot scripts
au BufNewFile,BufRead *.gpi,.gnuplot setf gnuplot
@ -803,6 +803,9 @@ au BufNewFile,BufRead */etc/group,*/etc/group-,*/etc/group.edit,*/etc/gshadow,*/
" GTK RC
au BufNewFile,BufRead .gtkrc,gtkrc setf gtkrc
" GYP
au BufNewFile,BufRead *.gyp,*.gypi setf gyp
" Hack
au BufRead,BufNewFile *.hack,*.hackpartial setf hack
@ -1027,6 +1030,9 @@ au BufNewFile,BufRead Kconfig,Kconfig.debug setf kconfig
" Lace (ISE)
au BufNewFile,BufRead *.ace,*.ACE setf lace
" Latexmkrc
au BufNewFile,BufRead .latexmkrc,latexmkrc setf perl
" Latte
au BufNewFile,BufRead *.latte,*.lte setf latte
@ -2084,7 +2090,7 @@ au BufNewFile,BufReadPost *.tutor setf tutor
" TWIG files
au BufNewFile,BufReadPost *.twig setf twig
" Typescript or Qt translation file (which is XML)
" TypeScript or Qt translation file (which is XML)
au BufNewFile,BufReadPost *.ts
\ if getline(1) =~ '<?xml' |
\ setf xml |
@ -2092,6 +2098,9 @@ au BufNewFile,BufReadPost *.ts
\ setf typescript |
\ endif
" TypeScript module and common
au BufNewFile,BufRead *.mts,*.cts setf typescript
" TypeScript with React
au BufNewFile,BufRead *.tsx setf typescriptreact
@ -2283,7 +2292,7 @@ au BufNewFile,BufRead *.fsproj,*.fsproj.user setf xml
au BufNewFile,BufRead *.vbproj,*.vbproj.user setf xml
" Qt Linguist translation source and Qt User Interface Files are XML
" However, for .ts Typescript is more common.
" However, for .ts TypeScript is more common.
au BufNewFile,BufRead *.ui setf xml
" TPM's are RDF-based descriptions of TeX packages (Nikolai Weibull)

View File

@ -448,6 +448,8 @@ local extension = {
gsp = 'gsp',
gjs = 'javascript.glimmer',
gts = 'typescript.glimmer',
gyp = 'gyp',
gypi = 'gyp',
hack = 'hack',
hackpartial = 'hack',
haml = 'haml',
@ -1019,6 +1021,8 @@ local extension = {
ts = function(path, bufnr)
return M.getlines(bufnr, 1):find('<%?xml') and 'xml' or 'typescript'
end,
mts = 'typescript',
cts = 'typescript',
tsx = 'typescriptreact',
uc = 'uc',
uit = 'uil',
@ -1496,6 +1500,8 @@ local filename = {
['/etc/shadow-'] = 'passwd',
['/etc/shadow'] = 'passwd',
['/etc/passwd.edit'] = 'passwd',
['latexmkrc'] = 'perl',
['.latexmkrc'] = 'perl',
['pf.conf'] = 'pf',
['main.cf'] = 'pfmain',
pinerc = 'pine',

View File

@ -240,6 +240,7 @@ let s:filename_checks = {
\ 'grub': ['/boot/grub/menu.lst', '/boot/grub/grub.conf', '/etc/grub.conf', 'any/boot/grub/grub.conf', 'any/boot/grub/menu.lst', 'any/etc/grub.conf'],
\ 'gsp': ['file.gsp'],
\ 'gtkrc': ['.gtkrc', 'gtkrc', '.gtkrc-file', 'gtkrc-file'],
\ 'gyp': ['file.gyp', 'file.gypi'],
\ 'hack': ['file.hack', 'file.hackpartial'],
\ 'haml': ['file.haml'],
\ 'hamster': ['file.hsm'],
@ -412,7 +413,7 @@ let s:filename_checks = {
\ 'pccts': ['file.g'],
\ 'pcmk': ['file.pcmk'],
\ 'pdf': ['file.pdf'],
\ 'perl': ['file.plx', 'file.al', 'file.psgi', 'gitolite.rc', '.gitolite.rc', 'example.gitolite.rc'],
\ 'perl': ['file.plx', 'file.al', 'file.psgi', 'gitolite.rc', '.gitolite.rc', 'example.gitolite.rc', '.latexmkrc', 'latexmkrc'],
\ 'pf': ['pf.conf'],
\ 'pfmain': ['main.cf'],
\ 'php': ['file.php', 'file.php9', 'file.phtml', 'file.ctp', 'file.phpt', 'file.theme'],
@ -582,6 +583,7 @@ let s:filename_checks = {
\ 'tssop': ['file.tssop'],
\ 'tsv': ['file.tsv'],
\ 'twig': ['file.twig'],
\ 'typescript': ['file.mts', 'file.cts'],
\ 'typescript.glimmer': ['file.gts'],
\ 'typescriptreact': ['file.tsx'],
\ 'uc': ['file.uc'],