changeset 31794:745772308c81 v9.0.1229

patch 9.0.1229: Cap'n Proto files are not recognized Commit: https://github.com/vim/vim/commit/040e795e8da05ff38cc896528d4dcad100f0b584 Author: Amaan Qureshi <amaanq12@gmail.com> Date: Sun Jan 22 13:10:39 2023 +0000 patch 9.0.1229: Cap'n Proto files are not recognized Problem: Cap'n Proto files are not recognized. Solution: Add a pattern and the "capnp" filetype. (Amaan Qureshi, closes #11862)
author Bram Moolenaar <Bram@vim.org>
date Sun, 22 Jan 2023 14:15:04 +0100
parents 452cd5a93ed3
children 3542f4bba987
files runtime/filetype.vim src/testdir/test_filetype.vim src/version.c
diffstat 3 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -277,6 +277,9 @@ au BufNewFile,BufRead *.lpc,*.ulpc		setf
 " Calendar
 au BufNewFile,BufRead calendar			setf calendar
 
+" Cap'n Proto
+au BufNewFile,BufRead *.capnp			setf capnp
+
 " C#
 au BufNewFile,BufRead *.cs,*.csx		setf cs
 
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -96,6 +96,7 @@ let s:filename_checks = {
     \ 'cabalconfig': ['cabal.config'],
     \ 'cabalproject': ['cabal.project', 'cabal.project.local'],
     \ 'calendar': ['calendar', '/.calendar/file', '/share/calendar/any/calendar.file', '/share/calendar/calendar.file', 'any/share/calendar/any/calendar.file', 'any/share/calendar/calendar.file'],
+    \ 'capnp': ['file.capnp'],
     \ 'catalog': ['catalog', 'sgml.catalogfile', 'sgml.catalog', 'sgml.catalog-file'],
     \ 'cdl': ['file.cdl'],
     \ 'cdrdaoconf': ['/etc/cdrdao.conf', '/etc/defaults/cdrdao', '/etc/default/cdrdao', '.cdrdao', 'any/etc/cdrdao.conf', 'any/etc/default/cdrdao', 'any/etc/defaults/cdrdao'],
--- a/src/version.c
+++ b/src/version.c
@@ -696,6 +696,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1229,
+/**/
     1228,
 /**/
     1227,