willothy / flatten.nvim

Open files and command output from wezterm, kitty, and neovim terminals in your current neovim instance
https://luarocks.org/modules/willothy/flatten.nvim
MIT License
473 stars 13 forks source link

Added `diff` to `block_for` option in default setup. #74

Closed jokesper closed 11 months ago

jokesper commented 11 months ago

When running git add -p and then selecting e (edit) it isn't blocking. This commit aims to fix that.

willothy commented 11 months ago

Thanks for the PR!

I think a better solution for this would be to set $VISUAL to nvim --cmd 'let g:flatten_wait=1' or nvim -b if you have that setup in your config. That should work for this use case AFAIK, I am not sure it's a good idea for diffs to always block as there may be use cases where users don't want to block the terminal when opening a diff, and this would be a frustrating change for those users.

Let me know if that solution doesn't work, I'll leave this open for now. I definitely understand the use case for this, but I think it is better handled in user configs and not in the plugin's defaults.

jokesper commented 11 months ago

Sorry I completly forgot that part even while reading the readme to copy the default values for the option. On that note: The readme and the docs are missing the gitrebase

willothy commented 11 months ago

Thanks for letting me know, I'll update that :)

willothy commented 11 months ago

Also, if you need, you can also customize the should_block hook in your config for more granular control over blocking than just filetypes.