There are countless complaints on Copilot for inserting a ton of garbage when someone wants only one line or a part of the first line. It's unanswered since 2021 by the devs and their marketing focuses on "40%-60% more efficient coding", if they'd allow word-by-word inserts their efficiency would lower from 60% to the actual realworld ~5%.
So I am looking for a way to intercept those completions of Github copilot and then directly offer them as "word-by-word" inserts.
The easiest way would be appreciated as I am not experienced in plugins, so if it can be done with the IDE scripting console that would be easiest.
My idea of implementation:
1) Watch for TAB and take a copy of the source code open
2) watch for the code to change (completion inserted)
3) restore previous version of source and offer the change as completion for word-by-word inserts through a shortcut (like CTRL TAB etc)
Another option that would be even better:
1) When copilot shows a completion that whole text must be available somewhere in the IDE context.
2) Take that completion and insert word-by-word on keypress of an alternative shortcut
I'm just not sure if it's possible to get that data from the IDE by plugin/script ?
Any snippet that shows how I could get the completion from the IDE and insert text at the cursor position on shurtcut click.