mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
feat(filetype.lua): add support for files under .git
This commit is contained in:
parent
27b664a2de
commit
7a574e54f2
@ -1359,6 +1359,12 @@ local pattern = {
|
||||
[".*/0/.*"] = function() vim.fn["dist#ft#FTfoam"]() end,
|
||||
[".*/0%.orig/.*"] = function() vim.fn["dist#ft#FTfoam"]() end,
|
||||
[".*/etc/sensors%.d/[^.].*"] = starsetf('sensors'),
|
||||
[".*%.git/.*"] = function(path, bufnr)
|
||||
local firstline = getline(bufnr, 1)
|
||||
if firstline:find("^" .. string.rep("%x", 40) .. "+ ") or firstline:sub(1, 5) == "ref: " then
|
||||
return "git"
|
||||
end
|
||||
end,
|
||||
-- END PATTERN
|
||||
}
|
||||
-- luacheck: pop
|
||||
|
Loading…
Reference in New Issue
Block a user