Hacker News new | ask | show | jobs
by thakkarparth007 1278 days ago
Heh this blew up here :D Didn't know till a friend told me about it.

I'd love to know if you guys have any specific questions about copilot's internals that I can try to answer by staring at the code or if you have any feedback for the tool/post!

2 comments

Any word on what the neovim plugin does? Considering some features like,

> Then, most recently accessed 20 files of the same language are queried from VSCode.

are probably not available by default in nvim?

---

Also, do you think there's any chance you get in trouble for reverse engineering copilot?

RE: neovim

Looks like the 20 file logic is present in neovim as well. I went through its code (https://github.com/github/copilot.vim/blob/release/copilot/d...) after beautifying it (https://codebeautify.org/jsviewer), and found it present.

I couldn't exactly trace it to a specific neovim event but I'm guessing it corresponds to buffer-update-events (https://neovim.io/doc/user/api.html#api-buffer-updates) or something like that.

Re: getting in trouble

I surely hope not :P. I mean, the code is basically public (available on every user's computer).

Interesting, thanks.
The neovim plugin mostly actually communicates with a node-js service seen here (https://github.com/github/copilot.vim/tree/release/copilot/d...). This is why they require you to install node for using the plugin and allows them to share logic with the vscode extension (also in javascript). I think all the features should be available even in neovim.
Just a note on the first sentence under "What does a prompt look like?", it seems like there's a continuity error from the above paragraph.
oh lol. Yeah, messed up while rewriting. Fixing. Thanks!