mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:9.0.2063: pacman hooks are detected as conf filetype
Problem: pacman hooks are detected as conf filetype
Solution: make it consistent to pacman.conf and detect those
hooks as confini
Because confini has much better syntax highlighting than conf.
For reference, I identified pacman.conf and pacman hooks as dosini in
https://github.com/vim/vim/pull/6335, then
https://github.com/vim/vim/pull/10213 changed them to conf, then
https://github.com/vim/vim/pull/10518 changed pacman.conf to confini but
forgot to change hooks.
closes: vim/vim#13399
7d254dbc2d
Co-authored-by: Guido Cella <guido@guidocella.xyz>
This commit is contained in:
parent
4f0adb6a78
commit
0b1ec3b162
@ -282,7 +282,7 @@ local extension = {
|
|||||||
atg = 'coco',
|
atg = 'coco',
|
||||||
recipe = 'conaryrecipe',
|
recipe = 'conaryrecipe',
|
||||||
hook = function(path, bufnr)
|
hook = function(path, bufnr)
|
||||||
return M._getline(bufnr, 1) == '[Trigger]' and 'conf' or nil
|
return M._getline(bufnr, 1) == '[Trigger]' and 'confini' or nil
|
||||||
end,
|
end,
|
||||||
nmconnection = 'confini',
|
nmconnection = 'confini',
|
||||||
mklx = 'context',
|
mklx = 'context',
|
||||||
|
@ -1388,12 +1388,12 @@ func Test_hook_file()
|
|||||||
|
|
||||||
call writefile(['[Trigger]', 'this is pacman config'], 'Xfile.hook', 'D')
|
call writefile(['[Trigger]', 'this is pacman config'], 'Xfile.hook', 'D')
|
||||||
split Xfile.hook
|
split Xfile.hook
|
||||||
call assert_equal('conf', &filetype)
|
call assert_equal('confini', &filetype)
|
||||||
bwipe!
|
bwipe!
|
||||||
|
|
||||||
call writefile(['not pacman'], 'Xfile.hook')
|
call writefile(['not pacman'], 'Xfile.hook')
|
||||||
split Xfile.hook
|
split Xfile.hook
|
||||||
call assert_notequal('conf', &filetype)
|
call assert_notequal('confini', &filetype)
|
||||||
bwipe!
|
bwipe!
|
||||||
|
|
||||||
filetype off
|
filetype off
|
||||||
|
Loading…
Reference in New Issue
Block a user