Skip to content

How does the default "Buffer selection" inline assistant work? #537

Answered by olimorris
zhou13 asked this question in Q&A
Discussion options

You must be logged in to vote

When I select several lines of code, press <C-a>, and then select "Buffer selection", the codecompanion.nvim does not ask me what I want to do with these lines of code. Instead, it always replaces the buffer with something that does not make sense. What is the intended way to use the default "Buffer selection" inline assistant?

So the buffer selection, as per its description ("Send the current buffer to the LLM as part of an inline prompt") will send over all of the current buffer as context alongside your code selection and your code prompt:

In the example above, I've selected some code in a mini.test file and asked the LLM to tell me what the selection does in the context of the whol…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by olimorris
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants