Mercurial > vim
changeset 35597:e1d1abdfc8e7 v9.1.0544
patch 9.1.0544: filetype: ldapconf files are not recognized
Commit: https://github.com/vim/vim/commit/62f31e949918167cb7f50cdf1737f7c28460b62b
Author: Riley Bruins <ribru17@hotmail.com>
Date: Sun Jul 7 21:20:22 2024 +0200
patch 9.1.0544: filetype: ldapconf files are not recognized
Problem: filetype: ldapconf files are not recognized
Solution: Detect '.ldaprc', 'ldap.conf' and 'ldaprc' files as ldapconf
filetype, include a simple ldapconf ftplugin file
(Riley Bruins)
[Specification](https://www.openldap.org/software//man.cgi?query=ldap.conf&sektion=5&apropos=0&manpath=OpenLDAP+2.4-Release)
closes: #15176
Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 07 Jul 2024 21:30:05 +0200 |
parents | 83409a7c6cb2 |
children | d58f4ca037cc |
files | .github/MAINTAINERS runtime/filetype.vim runtime/ftplugin/ldapconf.vim src/testdir/test_filetype.vim src/version.c |
diffstat | 5 files changed, 20 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/.github/MAINTAINERS +++ b/.github/MAINTAINERS @@ -187,6 +187,7 @@ runtime/ftplugin/kconfig.vim @chrisbra runtime/ftplugin/kdl.vim @imsnif @jiangyinzuo runtime/ftplugin/kivy.vim @ribru17 runtime/ftplugin/kotlin.vim @udalov +runtime/ftplugin/ldapconf.vim @ribru17 runtime/ftplugin/less.vim @genoma runtime/ftplugin/lex.vim @ribru17 runtime/ftplugin/liquid.vim @tpope
--- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1250,6 +1250,9 @@ au BufNewFile,BufRead */etc/limits,*/etc " LambdaProlog or SML (see dist#ft#FTmod for *.mod) au BufNewFile,BufRead *.sig call dist#ft#FTsig() +" LDAP configuration +au BufNewFile,BufRead ldaprc,.ldaprc,ldap.conf setf ldapconf + " LDAP LDIF au BufNewFile,BufRead *.ldif setf ldif
new file mode 100644 --- /dev/null +++ b/runtime/ftplugin/ldapconf.vim @@ -0,0 +1,13 @@ +" Vim filetype plugin +" Language: ldap.conf(5) configuration file. +" Maintainer: Riley Bruins <ribru17@gmail.com> +" Last Change: 2024 Jul 06 + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 + +setl comments=:# commentstring=#\ %s + +let b:undo_ftplugin = 'setl com< cms<'
--- a/src/testdir/test_filetype.vim +++ b/src/testdir/test_filetype.vim @@ -385,6 +385,7 @@ def s:GetFilenameChecks(): dict<list<str lace: ['file.ace', 'file.ACE'], latte: ['file.latte', 'file.lte'], ld: ['file.ld', 'any/usr/lib/aarch64-xilinx-linux/ldscripts/aarch64elf32b.x'], + ldapconf: ['ldap.conf', '.ldaprc', 'ldaprc'], ldif: ['file.ldif'], lean: ['file.lean'], ledger: ['file.ldg', 'file.ledger', 'file.journal'],