All Projects → monkoose → fzf-hoogle.vim

monkoose / fzf-hoogle.vim

Licence: MIT license
(neo)vim plugin that uses fzf for previewing hoogle search results

Programming Languages

Vim Script
2826 projects
shell
77523 projects

Projects that are alternatives of or similar to fzf-hoogle.vim

fzf-folds.vim
Vim plugin that lets you fuzzy search for folds in a file
Stars: ✭ 15 (-59.46%)
Mutual labels:  vim-plugin, fzf
fzf-preview.vim
fzf ❤️ preview
Stars: ✭ 49 (+32.43%)
Mutual labels:  vim-plugin, fzf
Fzf Mru.vim
Vim plugin that is using fzf.vim to display your most recently used files.
Stars: ✭ 79 (+113.51%)
Mutual labels:  vim-plugin, fzf
fzf-checkout.vim
Manage branches and tags with fzf
Stars: ✭ 187 (+405.41%)
Mutual labels:  vim-plugin, fzf
Notational Fzf Vim
Notational velocity for vim.
Stars: ✭ 975 (+2535.14%)
Mutual labels:  vim-plugin, fzf
Fzf Filemru
File MRU with fzf.vim
Stars: ✭ 76 (+105.41%)
Mutual labels:  vim-plugin, fzf
nvim-contabs
contextual tabs for vim/neovim
Stars: ✭ 20 (-45.95%)
Mutual labels:  vim-plugin, fzf
vim-tips-wiki
1500+ tips downloaded from Vim Tips Wiki, parsed and formatted to look and work like native Vim help files
Stars: ✭ 56 (+51.35%)
Mutual labels:  vim-plugin
filestyle
filestyle is a Vim plugin that highlights unwanted whitespace and characters.
Stars: ✭ 30 (-18.92%)
Mutual labels:  vim-plugin
vim-swap
Easy swapping of text in Vim
Stars: ✭ 18 (-51.35%)
Mutual labels:  vim-plugin
dotfiles
shell, git, vim, tmux .etc dotfiles, managed via gnu stow
Stars: ✭ 20 (-45.95%)
Mutual labels:  fzf
Inkuire
Hoogle-like searches for Scala 3 and Kotlin
Stars: ✭ 70 (+89.19%)
Mutual labels:  hoogle
denops-gh.vim
Vim/Neovim plugin for GitHub
Stars: ✭ 27 (-27.03%)
Mutual labels:  vim-plugin
denops-docker.vim
Manage Docker in Vim/Neovim
Stars: ✭ 48 (+29.73%)
Mutual labels:  vim-plugin
vim-gnote
make your mailbox as a note place
Stars: ✭ 16 (-56.76%)
Mutual labels:  vim-plugin
vim-counterpoint
Cycle between file counterparts in vim or neovim.
Stars: ✭ 12 (-67.57%)
Mutual labels:  vim-plugin
vim-agriculture
🚜 Vim plugin to improve project searching with tools like ag and rg
Stars: ✭ 119 (+221.62%)
Mutual labels:  fzf
todo-vim
Simple todo plugin for vim
Stars: ✭ 24 (-35.14%)
Mutual labels:  vim-plugin
pmy
🚀 General purpose context-aware zsh completion engine powered by fuzzy finder.
Stars: ✭ 119 (+221.62%)
Mutual labels:  fzf
fzfx
fzfX delivers the power of finding, previewing, editing and managing any file in few key strokes.
Stars: ✭ 71 (+91.89%)
Mutual labels:  fzf

fzf-hoogle.vim (works only on Linux and macOS)

(neo)vim plugin that uses fzf for previewing hoogle search results preview image fzf-hoogle.vim

Requirements

  • vim 8.1 or neovim 0.4
  • fzf
  • hoogle
  • jq - for processing json
  • awk, tee - should be in any Linux distro

Since v1.2 requires hoogle 5.0.17.13 and above to properly restrict number of the items from hoogle search results.

Tested only on Linux.

Installation

Using vim-plug

Plug 'junegunn/fzf', {'dir': '~/.fzf', 'do': './install --all'}

Plug 'monkoose/fzf-hoogle.vim'

Or use any other plugin manager. I bet you know it better than I'm.

Usage

:Hoogle or append it with initial search like :Hoogle >>=.

To open fzf window in a new fullscreen tab just append command with exclamation mark :Hoogle!

If you don't know how to properly search with hoogle, then look at the hoogle documentation.

Inside fzf window

enter to start new search with the current query.

alt-s to open default browser with documentation. If it doesn't work (perhaps if you are on macOS), then change g:hoogle_open_link option to open links with the CLI tool.

alt-x to copy type annotation into default register. Paste it just with p.

alt-c to copy import statement into default register.

Esc or ctrl-c to close fzf window.

You can open :Hoogle appended with a word under the cursor with this command. Use a key combination that suitable for you. In my config it is <space>hh:

augroup HoogleMaps
  autocmd!
  autocmd FileType haskell nnoremap <buffer> <space>hh :Hoogle <C-r><C-w><CR>
augroup END

Or you can set it as keywordprg and open fzf-hoogle window with K:

augroup HoogleMaps
  autocmd!
  autocmd FileType haskell setlocal keywordprg=:Hoogle
augroup END

Options

Variable Description Default
g:loaded_hoogle Any value deactivates the plugin.
g:hoogle_path Path to hoogle executable. 'hoogle'
g:hoogle_fzf_window Change fzf window.1 neovim - {"window": "call hoogle#floatwindow(32, 132)"}. vim - {'down': '50%'}
g:hoogle_fzf_header Change fzf window header. 'enter - restart with the query alt-s - open in a browser alt-x - copy type annotation alt-c - copy import statement'
g:hoogle_fzf_preview Change fzf preview split. 'right:60%:wrap'
g:hoogle_fzf_open_browser Shortcut for opening documentation in a browser. 'alt-s'
g:hoogle_fzf_copy_type Shortcut for copying type annotation. 'alt-x'
g:hoogle_fzf_copy_import Shortcut for copying import statement. 'alt-c'
g:hoogle_count Maximum number of results by hoogle search. 500
g:hoogle_open_link CLI tool to open a link in the default browser. On macOS change it to 'open' 'xdg-open' if it is executable, else ''
g:hoogle_enable_messages Activates/deactivates echoing of the fzf-hoogle messages. 1
g:hoogle_fzf_cache_file Path to the internal fzf-hoogle cache file.2 '{plugin_directory}/hoogle_cache.json'

1 - for neovim you can change floating window size by changing parameters of hoogle#floatwindow(rows, columns)

2 - Required to configure if fzf preview window just shows sed errors.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].