Closed lars-vc closed 1 year ago
Hi @lars-vc! Is this the case only for the neoclip
extension only or for all of Telescope
?
Also, when you say the binding broke, does it just not do anything or is there an error?
This is probably related to the fact that telescope starts asynchronously. I had a similar issue when writing the tests where I had to but a small sleep between starting telescope and performing any key-presses. See for example: https://github.com/AckslD/nvim-neoclip.lua/blob/5520ad7b24b0c4bc0b5371eef2492e787aa59a3a/tests/plenary/neoclip_spec.lua#L317
Possibly related https://github.com/nvim-telescope/telescope.nvim/issues/1939
Hi, thanks for the quick reply! It appears this is indeed the case for all of telescopes pickers (this is the only one I needed normal mode for) and ye there is no error, the escape just doesn't get executed in the picker. Ill look at the resources you provided and report back!
Mmmh, so it seems this can't be solved using what telescope provides, since the default settings don't apply to extensions. For example, setting a different layout_strategy for neoclip is also impossible. So using the on_complete
is impossible. Telescope now also has an option called initial_mode
to set the initial mode, but once again this only works for the default pickers. So I think something will need to be implemented in neoclip for this setting to work?
Bit unfortunate that those settings don't get inherited automatically.
Hmm I see, I'm not really an expert on telescope extensions so maybe I implemented something wrong :)
I love this plugin and would definitely like seeing an option to start it in normal mode.
I think I found a good solution!
:Telescope neoclip initial_mode=normal
Added in this issue: https://github.com/nvim-telescope/telescope.nvim/issues/409
I think I found a good solution!
:Telescope neoclip initial_mode=normal
Added in this issue: nvim-telescope/telescope.nvim#409
Have you found a way to get it working using this? I experimented with this when I created the issue and couldn't get it to work (can't get it to work rn either) Because the command you suggested just throws errors for me.
I think I found a good solution!
:Telescope neoclip initial_mode=normal
Added in this issue: nvim-telescope/telescope.nvim#409
Have you found a way to get it working using this? I experimented with this when I created the issue and couldn't get it to work (can't get it to work rn either) Because the command you suggested just throws errors for me.
I binded this command with another flag theme=dropdown
to a key and everything works as intended - neoclip opens in normal mode. Maybe try updating?
Could you share the whole command? Because I get this
And everything is updated
Could you share the whole command? Because I get this
![]()
And everything is updated
Here: :Telescope neoclip plus theme=dropdown initial_mode=normal
Does :Telescope neoclip
work at all for you? The error would suggest that you didn't install neoclip or didn't add it as telescope extension.
I swear to god it just magically works now????? Im just gonna accept it ig
Glad I could help :)
Thanks both and happy to see that it is working :)
I had this binding and this used to start neoclip in normal mode, I don't really have a usecase for insert mode for neoclip since I never want to search in my clipboard history. But a bit ago this binding broke and it always starts in insert mode now. Is there any way to fix this?
nnoremap <leader>fn <cmd>Telescope neoclip plus<cr><Esc>