aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2022-09-09 17:53:15 +0200
committerGitHub <noreply@github.com>2022-09-09 17:53:15 +0200
commitad2d6a624b10a52cdcfb7fdd9d8b1be24b13ed83 (patch)
tree6c7c6acba8746cd744b746dbe1b0ef5257674055 /runtime/lua/vim
parent22a88c425e2fe99bcb534e43396a0b00044ae67d (diff)
downloadrneovim-ad2d6a624b10a52cdcfb7fdd9d8b1be24b13ed83.tar.gz
rneovim-ad2d6a624b10a52cdcfb7fdd9d8b1be24b13ed83.tar.bz2
rneovim-ad2d6a624b10a52cdcfb7fdd9d8b1be24b13ed83.zip
vim-patch:9.0.0424: gitattributes files are not recognized (#20134)
Problem: gitattributes files are not recognized. Solution: Add patterns to match gitattributes files. (closes vim/vim#11085) https://github.com/vim/vim/commit/7d56cfc861e57145f003315efd835cf5dfd5b145
Diffstat (limited to 'runtime/lua/vim')
-rw-r--r--runtime/lua/vim/filetype.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua
index fc2bcdabd2..12e6fa837b 100644
--- a/runtime/lua/vim/filetype.lua
+++ b/runtime/lua/vim/filetype.lua
@@ -1383,6 +1383,7 @@ local filename = {
['EDIT_DESCRIPTION'] = 'gitcommit',
['.gitconfig'] = 'gitconfig',
['.gitmodules'] = 'gitconfig',
+ ['.gitattributes'] = 'gitattributes',
['gitolite.conf'] = 'gitolite',
['git-rebase-todo'] = 'gitrebase',
gkrellmrc = 'gkrellmrc',
@@ -1825,6 +1826,14 @@ local pattern = {
return 'gitconfig'
end
end,
+ ['.*%.git/info/attributes'] = 'gitattributes',
+ ['.*/etc/gitattributes'] = 'gitattributes',
+ ['.*/%.config/git/attributes'] = 'gitattributes',
+ ['.*/git/attributes'] = function(path, bufnr)
+ if vim.env.XDG_CONFIG_HOME and path:find(vim.env.XDG_CONFIG_HOME .. '/git/attributes') then
+ return 'gitattributes'
+ end
+ end,
['%.gitsendemail%.msg%.......'] = 'gitsendemail',
['gkrellmrc_.'] = 'gkrellmrc',
['.*/usr/.*/gnupg/options%.skel'] = 'gpg',