aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2022-09-10 13:30:54 +0200
committerGitHub <noreply@github.com>2022-09-10 13:30:54 +0200
commit40f9f479b746d0f76fbdd4bc0567d593ca7a6070 (patch)
treed2526296c298a038337b2bd99b7228366db1e2a2 /runtime/lua
parent82d93429e78b661027c05f3fbc862aa0e0c6cd95 (diff)
downloadrneovim-40f9f479b746d0f76fbdd4bc0567d593ca7a6070.tar.gz
rneovim-40f9f479b746d0f76fbdd4bc0567d593ca7a6070.tar.bz2
rneovim-40f9f479b746d0f76fbdd4bc0567d593ca7a6070.zip
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) https://github.com/vim/vim/commit/9ba2786f15f0b53a90fd221832a5bedfc6dbfe20
Diffstat (limited to 'runtime/lua')
-rw-r--r--runtime/lua/vim/filetype.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua
index 6aa765ebaf..c8777801ec 100644
--- a/runtime/lua/vim/filetype.lua
+++ b/runtime/lua/vim/filetype.lua
@@ -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',