diff options
author | Christian Clason <c.clason@uni-graz.at> | 2022-09-27 14:02:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-27 14:02:10 +0200 |
commit | 4278a2d35990730c1ea40205291cc60209eae7b5 (patch) | |
tree | 4270b086b4c63d2a1d1a311386e611888bfc2623 /runtime | |
parent | 1d337d4e2f2265b13ecf19a3bc17ad302d3b0d96 (diff) | |
parent | fe0727a1bfebdb8dc27bd8c276566f203b4d6a18 (diff) | |
download | rneovim-4278a2d35990730c1ea40205291cc60209eae7b5.tar.gz rneovim-4278a2d35990730c1ea40205291cc60209eae7b5.tar.bz2 rneovim-4278a2d35990730c1ea40205291cc60209eae7b5.zip |
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)
https://github.com/vim/vim/commit/7fc6c0e4dab4e80b9806a973936af54276468513
vim-patch:9.0.0600: GYP files are not recognized
Problem: GYP files are not recognized.
Solution: Recognize GYP files. (closes vim/vim#11242)
https://github.com/vim/vim/commit/d32474229213276c64cb293885a975dcb406fbc9
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)
https://github.com/vim/vim/commit/cde031938537970938437cdbb235bc0da755ae4a
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/filetype.vim | 17 | ||||
-rw-r--r-- | runtime/lua/vim/filetype.lua | 6 |
2 files changed, 19 insertions, 4 deletions
diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 11536adf69..3042e62508 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -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) diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua index bd317baae9..a7a34a54cd 100644 --- a/runtime/lua/vim/filetype.lua +++ b/runtime/lua/vim/filetype.lua @@ -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', |