Open aaronmcadam opened 4 months ago
@aaronmcadam from what I can tell it looks like you cycle through with "down arrow" just not with <CTRL-n>
?
@aaronmcadam from what I can tell it looks like you cycle through with "down arrow" just not with
<CTRL-n>
?
Correct, but that's awkward as I never use the arrow keys for cycling suggestions 😄
Just trying to understand the issue. Does this happen with other sources? If so, does it still happen with other sources if you add completion = { nvim_cmp = false }
to your obsidian.nvim config?
The flickering doesn't happen with other sources in other files (for example a tsx file):
https://github.com/epwalsh/obsidian.nvim/assets/37928/a494f9b1-4129-46ce-9e72-010d175f7c81
The Text source works ok from a markdown file:
So it appears to be only "Reference" sources that don't seem to allow cycling for me.
I changed the binding for select_next_item
to <Tab>
just in case of a conflict somewhere, and I saw the same issue.
I can't reproduce this, but I can give you some things to try. Go into your clone of obsidian.nvim and try editing the cmp
entries here: https://github.com/epwalsh/obsidian.nvim/blob/4c3601063fb89ca83d2c00ab0fb081bb6e433f8e/lua/cmp_obsidian.lua#L73-L76
In particular see what happens if you remove the documentation
field or change the kind
field.
In particular see what happens if you remove the documentation field or change the kind field
I've removed the documentation field and changed the kind, but I see the same issue.
Hey @hrsh7th, do you have any idea what might cause this?
I had the same issue with cycling, but without flickering. And also I can't confirm any suggestion.
Surprisingly, when I changed
['<C-y>'] = cmp.mapping.confirm { select = true },
to
['<CR>'] = cmp.mapping.confirm { select = true },
in nvim-cmp
config, confirmation began to work. But I still couldn't cycle with <C-n>
and <C-p>
.
Finally, in @epwalsh dotfiles I found this line
['<C-y>'] = cmp.mapping.confirm { select = false, behavior = cmp.ConfirmBehavior.Insert },
This line fixes confirmation and cycling issue too.
I had the same issue with cycling, but without flickering. And also I can't confirm any suggestion.
Surprisingly, when I changed
['<C-y>'] = cmp.mapping.confirm { select = true },
to
['<CR>'] = cmp.mapping.confirm { select = true },
in
nvim-cmp
config, confirmation began to work. But I still couldn't cycle with<C-n>
and<C-p>
.Finally, in @epwalsh dotfiles I found this line
['<C-y>'] = cmp.mapping.confirm { select = false, behavior = cmp.ConfirmBehavior.Insert },
This line fixes confirmation and cycling issue too.
Overriding the confirm behaviour didn't work for me.
🐛 Describe the bug
I can't seem to cycle through suggestions. My keybinding will only let me choose one, and then I see a flicker.
See the attached video for more context:
https://github.com/epwalsh/obsidian.nvim/assets/37928/9d32996f-e449-409f-a13e-098167e4021f
Config
Obsidian.nvim config:
nvim-cmp config:
Environment