mirror of
https://github.com/neovim/neovim.git
synced 2025-12-09 16:12:48 +00:00
vim-patch:9.0.0434: gitignore files are not recognized (#20143)
Problem: gitignore files are not recognized.
Solution: Add patterns for the gitignore filetype. (closes vim/vim#11102)
9ba2786f15
This commit is contained in:
@@ -1385,6 +1385,7 @@ local filename = {
|
||||
['.gitconfig'] = 'gitconfig',
|
||||
['.gitmodules'] = 'gitconfig',
|
||||
['.gitattributes'] = 'gitattributes',
|
||||
['.gitignore'] = 'gitignore',
|
||||
['gitolite.conf'] = 'gitolite',
|
||||
['git-rebase-todo'] = 'gitrebase',
|
||||
gkrellmrc = 'gkrellmrc',
|
||||
@@ -1835,6 +1836,13 @@ local pattern = {
|
||||
return 'gitattributes'
|
||||
end
|
||||
end,
|
||||
['.*%.git/info/exclude'] = 'gitignore',
|
||||
['.*/%.config/git/ignore'] = 'gitignore',
|
||||
['.*/git/ignore'] = function(path, bufnr)
|
||||
if vim.env.XDG_CONFIG_HOME and path:find(vim.env.XDG_CONFIG_HOME .. '/git/ignore') then
|
||||
return 'gitignore'
|
||||
end
|
||||
end,
|
||||
['%.gitsendemail%.msg%.......'] = 'gitsendemail',
|
||||
['gkrellmrc_.'] = 'gkrellmrc',
|
||||
['.*/usr/.*/gnupg/options%.skel'] = 'gpg',
|
||||
|
||||
Reference in New Issue
Block a user