Robitx / gp.nvim

Gp.nvim (GPT prompt) Neovim AI plugin: ChatGPT sessions & Instructable text/code operations & Speech to text [OpenAI]
MIT License
537 stars 49 forks source link

Send whole file as a context #143

Open quolpr opened 1 week ago

quolpr commented 1 week ago

Hi! Great plugin. I am curious - is it possible on GpAppend/GpPrepend send the enirre buffer + visual selection? So, the prompt will be something like:

For given file <path>:

---
...file
---

With this part code at lines <n>-<k>:
---
...selection
---

Do <something>

So chatgpt will have more context what is needed to do.

quolpr commented 1 week ago

Oh, there is PR https://github.com/Robitx/gp.nvim/pull/142/files . Looks great!