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:

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:

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.