Closed tofeeh closed 1 month ago
You mean something like autocompletion with copilot? If this is the case, I am not thinking of supporting such a feature. I want this plugin to be something that you query on demand. In case you want to have autocompletion with code before and after n-lines, there are many ways to create appropriate prompts.
I could look something like this:
code before ...
CODE TO COMPLETE
code after ...
Please fill in the missing code for CODE TO COMPLETE.
In case I have misunderstood ... perhaps you would like to explain what you mean in more detail.
I was thinking of prompt like:
Task: Code snippet completion.
Code Before: [Provide the exact lines of code preceding the line needing completion.]
Current Line (Cursor Position Indicated): [Insert the incomplete line with a
Example (Java):
Code Before:
public class HelloWorld {
public static void main(String[] args) {
Current Line:
System.out.println("H
but used like completion. I think https://github.com/tzachar/cmp-ai is done like this, but has very poor way to configure it
The new template placeholder (see https://github.com/frankroeder/parrot.nvim?tab=readme-ov-file#utilizing-template-placeholders) provides this functionality to include context before and after the desired snippet. Functionalities similar to autocompletion are not part of this project and explicitly excluded, as they require constant and intransparent analysis of your files.
How hard would it be to generate suggestions based on n-lines before and m-lines after? But I mean something that will work with LSP.