vscode-snippet icon indicating copy to clipboard operation
vscode-snippet copied to clipboard

Implement new live-suggestion feature of cheat.sh

Open mre opened this issue 7 years ago • 5 comments

In #5, @chubin mentioned a new interface for live suggestions in cheat.sh:

$ curl cheat.sh/python/create+empty?query=complete
create empty list
create empty array
create empty file
create empty dict
create empty set

(See here: https://github.com/mre/vscode-snippet/issues/5#issuecomment-430407443)

This is a tracking ticket for this feature. As soon as it becomes available, we should add it to vscode-snippet, as it provides a lot of value in my opinion.

mre avatar Nov 01 '18 11:11 mre

On that note, we also might want to add a "suggestion delay" config variable, which indicates how long vscode-snippet is going to wait before sending a query to cheat.sh.

mre avatar Nov 01 '18 11:11 mre

@mre Why do you think that we need a delay here? Why don't you want to send a query immediately?

chubin avatar Nov 01 '18 17:11 chubin

My reasoning was that I want to avoid overloading the server, but maybe I was a bit too conservative here. Let's try without a delay and go from there.

mre avatar Nov 01 '18 17:11 mre

Currently, VS Code does not provide the needed API for this functionality, See https://github.com/microsoft/vscode/issues/21372

msanjeevkumar avatar Oct 19 '19 10:10 msanjeevkumar

The last comment in the linked issue mentions the new QuickPick API. https://github.com/microsoft/vscode/issues/21372#issuecomment-419864437 Maybe that can help us?

Looks like it was done here? https://github.com/KnisterPeter/vscode-github/pull/234/files

mre avatar Oct 19 '19 11:10 mre