sg.nvim
sg.nvim copied to clipboard
Inline directly into current buffer
The :CodyDo "<query>"
popup is cool
but It'd be better to have a command that will inline CodyDo to your buffer cursor position.
It would also be neat to see CodyDo
replace selected text if it was invoked in visual mode. If that's too intrusive for default behavior, perhaps a keybinding that "accepts" the text in the floating buffer would be better.
@mattvaughan so you can do :CodyTaskAccept
in the floating buffer and it will replace the text on which the task was performed.
You can bind that to a keystroke of your choosing if you want :)
@pjlast I think He actually meant something similar to me.
Project needs some interactivity. I think the popup is redundant.
Why not inline it directly to the buffer? And add a function to toggle the response.
Like the following example (Using snippets):
https://github.com/sourcegraph/sg.nvim/assets/101834410/1756aeff-eff0-4aba-82c3-494ccf5b56a3
This will give the feeling "AI is in your editor" feeling much better. (Especially with text models that generate gradually. Not in a ms like in the DEMO)
@orhnk
:CodyTask
now works exactly how you proposed. You can use <CR>
to accept and replace text in place.