-
Notifications
You must be signed in to change notification settings - Fork 17
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
Doesn't work with built-in nvim completion #59
Comments
@flexagoon What is the behaviour of Using nvim v0.10.0 I only seem to get help for |
@AlejandroSuero it's not in 0.10, it was added only recently. I'm using 0.11 nightly. |
Here's the PR that added this functionality @MariaSolOs do you know what this may be related to? |
@AlejandroSuero I think the popup menu that's used here is the regular completion popup, you can trigger the same thing by using omnicompletion ( |
@flexagoon I am not sure if the PR maybe conflicting with the default If you haven't other keymaps using require("supermaven-nvim").setup({
accept_suggestion = "<C-y>",
}) Right now supermaven uses this when accepting a completion: supermaven-nvim/lua/supermaven-nvim/completion_preview.lua Lines 140 to 171 in ef3bd1a
Maybe |
@AlejandroSuero this isn't about key bindings, the conflict happens before anything is pressed, when the popup window opens. The completion preview is overriden by supermaven completion |
@flexagoon I compared the 2 screenshots and the only difference is, in the 1st one, there's ghost text inserted by Supermaven. Looking at 2nd screenshot, it doesn't seem to have hidden anything? |
@hboon supermaven ghost text hides the |
If accepting the text provided by |
@flexagoon ah, I see what you mean now. Thanks. |
I think |
In |
One more update on this LOGS:
-- using nvim-cmp
event {
buf = 11,
event = "InsertCharPre",
file = "/Users/aome/dev/nvim_plugins/supermaven-nvim/lua/supermaven-nvim/api.lua",
group = 18,
id = 43,
match = "/Users/aome/dev/nvim_plugins/supermaven-nvim/lua/supermaven-nvim/api.lua"
}
event {
buf = 11,
event = "InsertCharPre",
file = "/Users/aome/dev/nvim_plugins/supermaven-nvim/lua/supermaven-nvim/api.lua",
group = 18,
id = 43,
match = "/Users/aome/dev/nvim_plugins/supermaven-nvim/lua/supermaven-nvim/api.lua"
}
event {
buf = 11,
event = "InsertCharPre",
file = "/Users/aome/dev/nvim_plugins/supermaven-nvim/lua/supermaven-nvim/api.lua",
group = 18,
id = 43,
match = "/Users/aome/dev/nvim_plugins/supermaven-nvim/lua/supermaven-nvim/api.lua"
}
event {
buf = 11,
event = "InsertCharPre",
file = "/Users/aome/dev/nvim_plugins/supermaven-nvim/lua/supermaven-nvim/api.lua",
group = 18,
id = 43,
match = "/Users/aome/dev/nvim_plugins/supermaven-nvim/lua/supermaven-nvim/api.lua"
}
event {
buf = 11,
event = "InsertCharPre",
file = "/Users/aome/dev/nvim_plugins/supermaven-nvim/lua/supermaven-nvim/api.lua",
group = 18,
id = 43,
match = "/Users/aome/dev/nvim_plugins/supermaven-nvim/lua/supermaven-nvim/api.lua"
}
event {
buf = 11,
event = "InsertCharPre",
file = "/Users/aome/dev/nvim_plugins/supermaven-nvim/lua/supermaven-nvim/api.lua",
group = 18,
id = 43,
match = "/Users/aome/dev/nvim_plugins/supermaven-nvim/lua/supermaven-nvim/api.lua"
}
event {
buf = 11,
event = "InsertCharPre",
file = "/Users/aome/dev/nvim_plugins/supermaven-nvim/lua/supermaven-nvim/api.lua",
group = 18,
id = 43,
match = "/Users/aome/dev/nvim_plugins/supermaven-nvim/lua/supermaven-nvim/api.lua"
}
event {
buf = 11,
event = "InsertCharPre",
file = "/Users/aome/dev/nvim_plugins/supermaven-nvim/lua/supermaven-nvim/api.lua",
group = 18,
id = 43,
match = "/Users/aome/dev/nvim_plugins/supermaven-nvim/lua/supermaven-nvim/api.lua"
}
-- using vim.lsp.completion
event {
buf = 11,
event = "InsertCharPre",
file = "/Users/aome/dev/nvim_plugins/supermaven-nvim/lua/supermaven-nvim/api.lua",
group = 18,
id = 43,
match = "/Users/aome/dev/nvim_plugins/supermaven-nvim/lua/supermaven-nvim/api.lua"
} Note The first registered event is me writting |
I added a little change with the events mentioned in neovim/neovim#25714 (comment) and here is the result: nvim-builtin-completion-changed-events.mp4@hboon @flexagoon if you have some thoughts on how this looks to start a PR about it, would be helpful. I added the events on this: supermaven-nvim/lua/supermaven-nvim/document_listener.lua Lines 12 to 22 in ef3bd1a
|
I figure it has to be tested on 0.11.x to be sure though |
@hboon it behaves the same as shown in the previous comment both in stable (v0.10.0) and nightly (v0.11.x) vim.api.nvim_create_autocmd({ "TextChanged", "TextChangedI", "TextChangedP", "CompleteChanged", "CompleteDone" } ...) I tested it without each one separately and with all together, with the same result. Seems like |
And something weird happens if you trigger |
Sorry but I’m honestly unsure as to what may be the source of the conflict here. |
When you set up built-in nvim lsp completion like this:
In your LspAttach, and then try to type something, the completion conflicts with Supermaven
Autocompletion inserts the text preview into the buffer, but supermaven writes its ghost text on top of that, so the completion preview isn't visible.
Here's what it looks like with supermaven disabled:
The text was updated successfully, but these errors were encountered: