A question. Does copilot.lua expose the project or open tabs to copilot? #171
-
Many thanks for the plugin. I hope it's OK to ask a question here. I read that Vscode shares the content of open tabs with copilot in order to improve the project context. Does copilot.lua do the same thing, ie. should I be opening multiple tabs within my project in order to improve the copilot suggestions? Similarly, if it's up to the editor to decide which files are exposed to copilot, could copilot.lua be enhanced to allow me to share my entire project (or a configured subset) with copilot to improve the context without the overhead of opening multiple files? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
My instinct and anecdotal experience supports the idea that requesting a completion from a buffer forwards it's content into copilot's scope. Opening a new buffer is enough to attach the client to it and should be sufficient. To do this without opening a buffer requires workspace support, which I'm not certain copilot has. You would have to ask this in the copilot discussion or try and format + read the packed code inside the lsp server js file to figure this out since copilot.vim doesn't do any special handling for it that I'm aware of. |
Beta Was this translation helpful? Give feedback.
-
Related: https://github.com/orgs/community/discussions/13617 So Copilot in VSCode does this but vim doesn't, or? |
Beta Was this translation helpful? Give feedback.
My instinct and anecdotal experience supports the idea that requesting a completion from a buffer forwards it's content into copilot's scope. Opening a new buffer is enough to attach the client to it and should be sufficient.
To do this without opening a buffer requires workspace support, which I'm not certain copilot has.
You would have to ask this in the copilot discussion or try and format + read the packed code inside the lsp server js file to figure this out since copilot.vim doesn't do any special handling for it that I'm aware of.