David-Kunz / gen.nvim

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

fix: parse opts.prompt instead of prompt #90

Closed jmdaly closed 3 months ago

jmdaly commented 3 months ago

Hi David,

I recently noticed a small issue when opts.show_prompt is set to true. An earlier commit (ed802f06a691895c8d6c5cf88b70b698a52514ad) introduced the run_command function. As a result of this function, the local variable prompt does not exist in the scope of the run_command function. Instead, when opts.show_prompt is true, we now parse the opts.prompt variable, which is available in the run_command function.

I believe this PR fixes the issue. Hopefully it's useful!

Thanks, John