feat: rename everything
This commit is contained in:
parent
8f7442eaa2
commit
67116f38bc
16 changed files with 172 additions and 165 deletions
26
plugin/diffs.lua
Normal file
26
plugin/diffs.lua
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
if vim.g.loaded_diffs then
|
||||
return
|
||||
end
|
||||
vim.g.loaded_diffs = 1
|
||||
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
pattern = { 'fugitive', 'git' },
|
||||
callback = function(args)
|
||||
local diffs = require('diffs')
|
||||
if args.match == 'git' and not diffs.is_fugitive_buffer(args.buf) then
|
||||
return
|
||||
end
|
||||
diffs.attach(args.buf)
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd('OptionSet', {
|
||||
pattern = 'diff',
|
||||
callback = function()
|
||||
if vim.wo.diff then
|
||||
require('diffs').attach_diff()
|
||||
else
|
||||
require('diffs').detach_diff()
|
||||
end
|
||||
end,
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue