David-Kunz / gen.nvim

Neovim plugin to generate text using LLMs with customizable prompts
The Unlicense
977 stars 62 forks source link

How to close the modal window? #78

Closed Mte90 closed 3 months ago

Mte90 commented 4 months ago

Also if I run :q is still there but empty.

Kahitar commented 3 months ago

For me it's just pressing the 'q' key when the modal is in focus.

Mte90 commented 3 months ago

In my case doesn't work

David-Kunz commented 3 months ago

Hi @Mte90 ,

This is a just a normal window, so :q should close it. There's also the q shortcut. I wonder why both of them won't work in your case, do you have any other plugins installed which might interfere?

Mte90 commented 3 months ago

So a :q close the content but the buffer is still there.

image

My mapping is on https://github.com/mte90/dotfiles/blob/master/.config/nvim/lua/mappings.lua

I think that the only mapping involved is this:

-- Close buffer with no window changes, it is executed also on empty buffers
vim.api.nvim_command("cnoreabbrev <expr> q getcmdtype() == ':' && getcmdline() == 'q' ? 'Bdelete' : 'q'")

I have to try it without that.

Mte90 commented 3 months ago

So without that rule :q works but not just q