feat: add support for diff and other filetypes

This commit is contained in:
Barrett Ruth 2026-02-12 18:04:47 -05:00
parent 9a0b812f69
commit 3990014a93
Signed by: barrett
GPG key ID: A6C96C9349D2FC81
4 changed files with 40 additions and 4 deletions

View file

@ -6,7 +6,7 @@ vim.g.loaded_diffs = 1
require('diffs.commands').setup()
vim.api.nvim_create_autocmd('FileType', {
pattern = { 'fugitive', 'git', 'gitcommit' },
pattern = (vim.g.diffs or {}).filetypes or { 'fugitive', 'git', 'gitcommit' },
callback = function(args)
local diffs = require('diffs')
if args.match == 'git' and not diffs.is_fugitive_buffer(args.buf) then