jackMort / jackMort/ChatGPT.nvim

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

Open
#337 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Lua
Stars
4k
Forks
317
PR merge metrics
No merged PRs in 30d

Description

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...)
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the openChat entry point mentioned in the issue and trace how the current prompt is assembled. Check how highlighted text or the full editor file can be obtained, then verify that selected content is included before the continuation prompt when openChat is called.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, neovim
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.