jackMort / ChatGPT.nvim

ChatGPT Neovim Plugin: Effortless Natural Language Generation with OpenAI's ChatGPT API
Apache License 2.0
3.71k stars 310 forks source link

[Req] Highlisted text should be pasted into prompt when openChat is called #337

Open ldelossa opened 10 months ago

ldelossa commented 10 months ago

Often times you want to ask a question about a piece of code in the editor.

It would be nice to transparently paste in any highlighted text, possible including the full file, into ChatGPT (given that the user doesn't mind about token count).

I think ChatGPT is smart enough to handle a message like this

{some snippet of code}
---
The above code (continue prompt...)