neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 0abaccb2a795c40cd7f55b9a19fe6ecb765479e2
parent 3c53e8f78511d6db9a6c804e5a479ba38c33102d
Author: Christian Clason <c.clason@uni-graz.at>
Date:   Fri,  5 Jul 2024 21:39:51 +0200

vim-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: vim/vim#15148

https://github.com/vim/vim/commit/15addb24dd3b2645f5c04d2742ab5eb53444a3a0

Co-authored-by: Riley Bruins <ribru17@hotmail.com>

Diffstat:
Aruntime/ftplugin/cedar.vim | 13+++++++++++++
Mruntime/lua/vim/filetype.lua | 1+
Mtest/old/testdir/test_filetype.vim | 1+
3 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/runtime/ftplugin/cedar.vim b/runtime/ftplugin/cedar.vim @@ -0,0 +1,13 @@ +" Vim filetype plugin +" Language: Cedar +" Maintainer: Riley Bruins <ribru17@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/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua @@ -261,6 +261,7 @@ local extension = { cdc = 'cdc', cdl = 'cdl', toc = detect_line1('\\contentsline', 'tex', 'cdrtoc'), + cedar = 'cedar', cfc = 'cf', cfm = 'cf', cfi = 'cf', diff --git a/test/old/testdir/test_filetype.vim b/test/old/testdir/test_filetype.vim @@ -143,6 +143,7 @@ func s:GetFilenameChecks() abort \ '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'],