How do I customize the on_move_async previewer? #757
-
I am trying to use the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The backend requires a valid file path string. Given that clap is unable to interpret each entry and extract the filepath on its own, if your custom provider has a different format for each entry, you need to firstly extract a valid file path by hand and then pass it via let g:clap_provider_quick_open = {
\ 'source': ['0:~/.vimrc', '1:~/.bashrc', '2:~/.zshrc'],
\ 'sink': 'e',
\ 'on_move_async': {->clap#client#call_preview_file({'fpath': split(g:clap.display.getcurline(), ':')[1]})},
\ } This commit 84cbe8d is required for passing the entries that contain |
Beta Was this translation helpful? Give feedback.
The backend requires a valid file path string. Given that clap is unable to interpret each entry and extract the filepath on its own, if your custom provider has a different format for each entry, you need to firstly extract a valid file path by hand and then pass it via
fpath
in theclap#client#call_preview_file(extra)
. For instance:This commit 84cbe8d is required for passing the entries that contain
~
, or you can convert it to an absolute path on Vim…