-
-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Blink's auto_insert
causes slashcommand not to get deleted
#617
Comments
FWIW, this is a bit of what I mean with "using autocompletion to re-implement commands will always see you fighting many edge-case bugs" ;) |
This will be a change in something Blink related. Right now it feels most of my bug fixing time is related to Blink issues. I'll dig into this later in the week. |
I imagine. Just keeping my blink config up-to-date has been annoying. |
Unfortunately, the problem gets slightly more murky. In the For reference: -- ctx table
{
bounds = {
length = 2,
line_number = 3,
start_col = 30
},
bufnr = 7,
cursor = { 3, 31 },
id = 0,
line = "I wish blink.cmp would work /fi",
mode = "default",
providers = { "lsp", "path", "snippets", "buffer", "codecompanion" },
trigger = {
initial_character = "/",
initial_kind = "trigger_character",
kind = "keyword"
},
<metatable> = {
__index = {
get_bounds = <function 1>,
get_cursor = <function 2>,
get_keyword = <function 3>,
get_line = <function 4>,
get_mode = <function 5>,
new = <function 6>,
set_cursor = <function 7>,
within_query_bounds = <function 8>
}
}
}
-- item.ctx table
{
bounds = {
length = 0,
line_number = 3,
start_col = 30
},
bufnr = 7,
cursor = { 3, 29 },
id = 0,
line = "I wish blink.cmp would work /",
mode = "default",
providers = { "lsp", "path", "snippets", "buffer", "codecompanion" },
trigger = {
character = "/",
initial_character = "/",
initial_kind = "trigger_character",
kind = "trigger_character"
},
<metatable> = {
__index = {
get_bounds = <function 1>,
get_cursor = <function 2>,
get_keyword = <function 3>,
get_line = <function 4>,
get_mode = <function 5>,
new = <function 6>,
set_cursor = <function 7>,
within_query_bounds = <function 8>
}
}
} In the ctx table you can see I think this is an issue upstream so I will duly raise it there. |
auto_insert
causes slashcommand not get deletedauto_insert
causes slashcommand not to get deleted
Your
minimal.lua
configError messages
N/A
Log output
N/A
Health check output
Describe the bug
What I expect: After executing
/buffer
, there is no spurious text to the bufferWhat happens: After executing
/buffer
, the string of text I used to find the completion is left.Reproduce the bug
Note: blink changed the config structure one or two days ago. The minimal.lua only works with the latest blink.
bug.mp4
I dug around the code a bit, and there is a very good chance this is not a codecompanion issue, or not directly fixable in codecompanion. As far as I can tell, the "buff" text gets inserted into the buffer after blink/init.lua's "execute" func runs.
It also does not get reported as part of "length" in
item.ctx.bounds.length
- that is consistently zero.As of today or yesterday, blink supports a callback for the "auto_insert" option, so the following is a possible workaround:
Adapter and model
n/a
Final checks
minimal.lua
file from above and have shared thisThe text was updated successfully, but these errors were encountered: