TerminalFi / LSP-copilot

GitHub Copilot support for Sublime Text LSP plugin provided through Copilot.vim.
658 stars 24 forks source link

Request copilot from command line #63

Closed sucrecacao closed 1 year ago

sucrecacao commented 1 year ago

Hi,

A bit of a silly question, but is it possible to use lsp-copilot to request github copilote from the command line. Simple example:

$ echo "def add(x, y):" | some-script-using-lsp-copilot.sh 
def add(x, y):
    return x + y
TerminalFi commented 1 year ago

That is a pretty interesting use case! But sadly it is not possible. However, what you are asking is likely not to difficult. Is how you are listing here your exact use case ?

sucrecacao commented 1 year ago

But sadly it is not possible. However, what you are asking is likely not to difficult

I don't understand.. "not possible" but at the same time "not difficult"??

I was just wondering the simplest way to fetch copilot API.

My exact use case would be to integrate copilot with a variety of tools, including kakoune text editor

TerminalFi commented 1 year ago

It’s not possible with our plug-in.

It’s not difficult to create this type of CLI tool as the copilot is just using JSON rpc