neogit icon indicating copy to clipboard operation
neogit copied to clipboard

Feature request: Set buffer options in gitcommit/NeogitCommitMessage filetype

Open catgoose opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe. I am unable to load after/ftplugin/gitcommit because https://github.com/NeogitOrg/neogit/blob/master/lua/neogit/buffers/editor/init.lua#L174 sources $VIMRUNTIME/ftplugin/gitcommit.vim thus overwriting any buffer local options applied from the ftplugin or an autocmd.

To avoid the x/y problem what I really want to do is set formatoptions and textwidth for gitcommit filetype

Describe the solution you'd like Several options:

  1. NeogitCommitMessageCreated autocommand
  2. Callback executed after gitcommit.vim is sourced
  3. Create config option to set buffer/window opts for gitcommit filetype

Describe alternatives you've considered I have tried several methods to set buffer local options to gitcommit/NeogitCommitMessage filetype: autocommands, after/ftplugin, etc

catgoose avatar May 18 '24 18:05 catgoose