Conversation
|
So the problem we're facing with a nicer visual range support is that it seems that Telescope does not support ranges. This means we can't allow a range mapping like it is done with If Telescope allowed a visual range, the same mapping could be used and we would be able to work on this range without the need for Another solution would be to provide a separate command that we control the setup for because then we could add |
|
I haven't checked out the fzf part. |
|
https://github.com/gbprod/yanky.nvim is possible to work around this limitation by using Telescope just as a picker so it has it's own command set up with a range and then accesses Telescope after it exited visual mode, see gbprod/yanky.nvim#136 (if I understood it correctly). |
0e5d03c to
18b96ac
Compare
Closes AckslD#128
18b96ac to
fe02b72
Compare
|
|
||
| ```vim | ||
| <ESC>:Telescope neoclip<CR> | ||
| ``` |
There was a problem hiding this comment.
Explanation for fzf-lua needed
AckslD
left a comment
There was a problem hiding this comment.
@peterfication sorry for the very late reply! I think this looks nice and works from what I can see when testing. It would be ideal if telescope worked in visual mode but this seems fine to me and is not breaking anything for anyone not wanting it.
|
|
||
| -- TODO can this be done without setting the register? | ||
| M.paste = function(entry, op) | ||
| if op == "v" then |
There was a problem hiding this comment.
[nit] should this be done inside the function passed to temporary_reg_usage below in order to call this function at two places? Eg
temporary_reg_usage(entry, function(register_name)
if op == 'v' then
vim.api.nvim_feedkeys('gv"'..register_name..'p', "n", false)
else
vim.cmd(string.format('normal! "%s%s', register_name, op))
end
end)also is nvim_feedkeys required here or could it also use vim.cmd, I guess the visual part maybe breaks this?
Closes #128