I can not access the text of it before it is applied, that is part of a private variable in that class implementation but I can trigger it. I can trigger copilot natively to apply a completion, as if I pressed TAB: Using the IDE scripting console with the native Nashorn javascript: So I would split up the 5-10 lines of completion text by whitespaces and then fill one word after another until I am happy. So currently if I want to use a completion I press "TAB" and then I have to navigate down and start removing all the excessive code that was inserted.Ī plugin script that takes the intercepts the completion CoPilot offers and presents it as a word-by-word completion through a shortcut. What I want in 99% of all cases: I just want from caret position to the end of line (or even less) because the code after the line is already correct and finished. The CoPilot completions are in most cases 5-10 lines long, they start at the caret position and extend to multiple lines of code. I'll try to summarize the problem and what I want: I'm just not sure if it's possible to get that data from the IDE by plugin/script ?ĪNY source code, preferred for that javascript "Nashorn" IDE would be very appreciated.Īny snippet that shows how I could get the completion from the IDE and insert text at the cursor position on shurtcut click. The only code is a minimalistic "Kotlin" script which is not supported by PHPStorm, for Javascript you find not one code online and the other recommended plugin "Flora" directly crashes the IDE on start.ġ) Watch for TAB and take a copy of the source code openĢ) watch for the code to change (completion inserted)ģ) restore previous version of source and offer the change as completion for word-by-word inserts through a shortcut (like CTRL TAB etc)Īnother option that would be even better:ġ) When copilot shows a completion that whole text must be available somewhere in the IDE context.Ģ) Take that completion and insert word-by-word on keypress of an alternative shortcut Sadly there is literally not one working example on the documentation for the scripting console. 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. So I am looking for a way to intercept those completions of Github copilot and then directly offer them as "word-by-word" inserts. 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%. In my personal account github settings it shows Github Copilot is active:Īnd the charge for Github Copilot is also correctly shown under Billing and Plans > Plans and usageīeta Was this translation helpful? Give feedback.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. I feel like I'm missing something here, but maybe I'm just on a waiting list for the chat and it's simply a question of waiting. So it seems that if you sign up to the technical preview you would have access also to Github Copilot chat? An active subscription to GitHub Copilot for Business or GitHub Copilot for Individuals is required for access to GitHub Copilot chat. I've signed up through this url when copilot x was announced: Īfter I signed up through the wait list link, I had access to Github Copilot inside the code in VSC, but not the Github Copilot Chat in the left toolbar, so is the assumption that there is another different wait list for the chat that you have to sign up separately?Īt this time, the technical preview is for VS or VSCode users.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |