ctaylo21 / jarvis

Dotfiles for a powerful, web development-focused environment powered by Neovim, iTerm2, tmux, and zsh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Idea: using floating-preview for Denite

casperstorm opened this issue · comments

So, yeah this is technically not a issue but I just saw that Shogun added support for having a floating preview: https://github.com/Shougo/denite.nvim/blob/master/doc/denite.txt#L697.

It could be cool to create something similar to fzf, however just in Denite.
image

Do you have any idea how to do it, and how do you feel about it?

You can just add

\ 'floating_preview' : 1

to the s:denite_options block and then add a mapping like:

  nnoremap <silent><buffer><expr> p
  \ denite#do_map('do_action', 'preview')

This will let you see a preview of a file by pressing p in the denite context.

It looks something like this in my current setup without any tweaking:
image

I personally don't think I would use it much, and if I did I would have to tinker with the layout of the Denite popup window to figure out how to make it the most consistent. The current one is wide and doesn't leave much room for the preview window.

As for the preview window border, I would love that feature. I think most plugins are waiting on neovim to support it.