How to format the auto filled text in the style used in Github Copilot?

Viewed 58

I'm trying to make a extension for VSCode similar to Github Copilot as in it predicts and autofills text directly into the active text editor.

This is how Github Copilot does the autofill: enter image description here

After you type the def max_sum_slice , it fills the code suggestion in grey whilst you can edit it, and only display the normal syntax highlighting colours after you press tab: enter image description here

How would I achieve this same effect, is there a single function in the API that would allow this or would I have to implement this myself. Any help is appreciated.

0 Answers
Related