feat: update autocmds for git filetypes with fugiive:/// bufnames

This commit is contained in:
Barrett Ruth 2026-02-02 16:46:58 -05:00
parent e2a62a6aa5
commit 686b02b790
3 changed files with 9 additions and 5 deletions

View file

@ -4,9 +4,13 @@ end
vim.g.loaded_fugitive_ts = 1
vim.api.nvim_create_autocmd('FileType', {
pattern = 'fugitive',
pattern = { 'fugitive', 'git' },
callback = function(args)
require('fugitive-ts').attach(args.buf)
local ft = require('fugitive-ts')
if args.match == 'git' and not ft.is_fugitive_buffer(args.buf) then
return
end
ft.attach(args.buf)
end,
})