patch 9.1.0532: filetype: Cedar files not recognized Commit: https://github.com/vim/vim/commit/15addb24dd3b2645f5c04d2742ab5eb53444a3a0 Author: Riley Bruins <ribr...@hotmail.com> Date: Fri Jul 5 21:14:26 2024 +0200
patch 9.1.0532: filetype: Cedar files not recognized Problem: filetype: Cedar files not recognized Solution: Detect '*.cedar' files as cedar filetype (Riley Bruins) References: https://github.com/cedar-policy closes: #15148 Signed-off-by: Riley Bruins <ribr...@hotmail.com> Signed-off-by: Doug Kearns <dougkea...@gmail.com> Signed-off-by: Christian Brabandt <c...@256bit.org> diff --git a/.github/MAINTAINERS b/.github/MAINTAINERS index d36c6e7aa..2b4c475ff 100644 --- a/.github/MAINTAINERS +++ b/.github/MAINTAINERS @@ -113,6 +113,7 @@ runtime/ftplugin/astro.vim @romainl runtime/ftplugin/awk.vim @dkearns runtime/ftplugin/basic.vim @dkearns runtime/ftplugin/bst.vim @tpope +runtime/ftplugin/cedar.vim @ribru17 runtime/ftplugin/cfg.vim @chrisbra runtime/ftplugin/chatito.vim @ObserverOfTime runtime/ftplugin/chicken.vim @evhan diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 6cb2de1d6..c814baa23 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -321,6 +321,9 @@ au BufNewFile,BufRead *.toc " Cdrdao config au BufNewFile,BufRead */etc/cdrdao.conf,*/etc/defaults/cdrdao,*/etc/default/cdrdao,.cdrdao setf cdrdaoconf +" Cedar +au BufNewFile,BufRead *.cedar setf cedar + " Cfengine au BufNewFile,BufRead cfengine.conf setf cfengine diff --git a/runtime/ftplugin/cedar.vim b/runtime/ftplugin/cedar.vim new file mode 100644 index 000000000..74a1903b4 --- /dev/null +++ b/runtime/ftplugin/cedar.vim @@ -0,0 +1,13 @@ +" Vim filetype plugin +" Language: Cedar +" Maintainer: Riley Bruins <ribr...@gmail.com> +" Last Change: 2024 Jul 4 + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 + +setl comments=:// commentstring=//\ %s + +let b:undo_ftplugin = 'setl com< cms<' diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim index 2dd317e63..a3d88910b 100644 --- a/src/testdir/test_filetype.vim +++ b/src/testdir/test_filetype.vim @@ -142,6 +142,7 @@ def s:GetFilenameChecks(): dict<list<string>> 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'], cdrtoc: ['file.toc'], + cedar: ['file.cedar'], cf: ['file.cfm', 'file.cfi', 'file.cfc'], cfengine: ['cfengine.conf'], cfg: ['file.hgrc', 'filehgrc', 'hgrc', 'some-hgrc'], diff --git a/src/version.c b/src/version.c index 9cf60326a..9cea34493 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 532, /**/ 531, /**/ -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/E1sPod9-0050Dh-QN%40256bit.org.