Bryley / neoai.nvim

Neovim plugin for intracting with GPT models from OpenAI
MIT License
558 stars 51 forks source link

The shortcuts works only the first time, then gets overridden in some way next time nvim is started #54

Open emilBeBri opened 11 months ago

emilBeBri commented 11 months ago

So this is probably a more directly related issue of NeoAI than my other report might be:

The keyboard prompts of this plugin is a killer feature, absolutely gorgeous. However, for some strange reason, when using the completely default setup, taken directly from your defaults, (only changing the API key value from nil to my key, so that I don't have to set it in enviroment), they keys get messed up in some way. So this is what happens:

1) I open my config, put in the defaults only changing the api key value, then save 2) I open nvim, and I use as, as per default, in visual mode, to summarize a text. This works and is fantastic. It even displays with which-key. However, 3) I close nvim and reopen it. Now, when I press a in normal mode, it displays 'summarize text' (as it did previosly in visual mode), and nothing happens. In visual mode, the which-key promps for as has now disappeared, and nothing happens when using it, either.

I can then remove the setup() part, save it, and open nvim - and then re-instate it, save it and reload nvim - and now it works again - but only once, as described in 1-3. I'm not sure how to proceed. I tried changing the shortcut to something else with (es), and I'm sure it is not used, and that does not work either. At the end of my init.lua, I have my keymap lua script being sourced, could that be it?

thank you for a great plugin. Excuse me if the bug report is too confused for you to act on, I understand, and please don't be offended.