0

I am using VScode (version 1.80.2) with multiple extensions including github Copilot (v1.100.306) and autoDoctring (v0.6.1) which automatically generates a docstring template for python functions. When typing """ (which starts a docstring in python) I sometimes get a suggestion from github Copilot (usually one sentence) and other times the option 'Generate Docstring' from the autoDocstring extension. As the autoDocstring is more useful in this case, I would like to give it priority over the github Copilot extension, but without de-activating the copilot each time. Thus, I am wondering if there is a way to set a priority between VScode autocompletion extensions?

While this contitutes rather an inconvenience than a major problem, I was searching for a solution and haven't found something so far. Currently, I try typing the """ with different speeds and sometimes get to the desired autoDocstring option and other times remain 'stuck' with the Copilot suggestion.

rioV8
  • 24,506
  • 3
  • 32
  • 49
Timo
  • 53
  • 3
  • the completion providers are asked async for results, depending who gives results first get displayed first, maybe the order of extension activation might help but I don't know if you can control that, and maybe the extension adds a completion provider only when you open a file it can handle – rioV8 Aug 04 '23 at 15:04
  • 1
    Perhaps it is possible to define different [shortcut](https://code.visualstudio.com/docs/getstarted/keybindings#_keyboard-shortcuts-editor) keys for these two commands. Or you can file a report request on [GitHub](https://github.com/microsoft/vscode/issues/new/choose). – JialeDu Aug 07 '23 at 07:55
  • Thanks for the idea @JialeDu, I think using a shortcut for autoDocstring is a great solution I haven't thought of before. – Timo Aug 08 '23 at 07:24
  • @Timo Thank you for your approval. I have made an answer. If you don't mind, you could click '✔' to mark my reply as the accepted answer. It will also help others to solve the similar issue. – JialeDu Aug 08 '23 at 08:19

1 Answers1

0

As a workaround:

You can assign different shortcut keys to the two extended commands respectively.

enter image description here

JialeDu
  • 6,021
  • 2
  • 5
  • 24