nvim: add autosplit workaround vor NeogitCommitMessage
it doesn't work with vim.g.autosplit_ft, probably because the filetype is set later than expected
This commit is contained in:
parent
5602a63e52
commit
374b4ed38d
|
@ -43,7 +43,8 @@ neogit.setup {
|
|||
kind = 'tab',
|
||||
integrations = {
|
||||
diffview = true
|
||||
}
|
||||
},
|
||||
disable_insert_on_commit = false
|
||||
}
|
||||
map('n', '<Leader>gg', neogit.open, 'Open Neogit')
|
||||
|
||||
|
@ -51,10 +52,16 @@ map('n', '<Leader>gg', neogit.open, 'Open Neogit')
|
|||
vim.api.nvim_create_augroup('config_coding', { clear = true })
|
||||
vim.api.nvim_create_autocmd({ 'FileType' }, {
|
||||
group = 'config_coding',
|
||||
pattern = { 'gitcommit', 'gitrebase', 'NeogitCommitMessage' },
|
||||
pattern = { 'gitcommit', 'gitrebase' },
|
||||
command = [[startinsert | 1]]
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd({ 'FileType' }, {
|
||||
group = 'config_coding',
|
||||
pattern = { 'NeogitCommitMessage' },
|
||||
callback = require('autosplit')
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd({ 'FileType' }, {
|
||||
group = 'config_coding',
|
||||
pattern = { 'Neogit*' },
|
||||
|
|
|
@ -40,7 +40,7 @@ vim.api.nvim_create_user_command('Ht', 'tab help <args>', {
|
|||
-- split these vertically if there is enough space
|
||||
vim.g.autosplit_bt = { 'help', 'terminal' }
|
||||
vim.g.autosplit_ft = {
|
||||
'man', 'fugitive', 'gitcommit', 'gitrebase', 'NeogitCommitMessage'
|
||||
'man', 'fugitive', 'gitcommit', 'gitrebase'
|
||||
}
|
||||
|
||||
-- theme
|
||||
|
|
Loading…
Reference in New Issue