junegunn / fzf.vim

fzf :heart: vim
MIT License
9.59k stars 582 forks source link

How to configure VIM Code completion with ctags and fzf #1221

Open gypsyhut opened 3 years ago

gypsyhut commented 3 years ago

Not an issue, but a use case with tags for code completion.

It is possible to configure fzf in vim insert mode to do code completion? The tags are generated and setup to work with vim. In vim omni completion is working well. But omni completion doesn't have support for fuzzy search. So i am looking for a way to use fzf to do code completion using the tags.

cballam commented 3 years ago

There's a post on the vimwiki about using FZF to do insert mode completion with popup menus: https://vim.fandom.com/wiki/Fuzzy_insert_mode_completion_(using_FZF)

I've only used it in conjunction with CoC, but it is meant to work with any popup menu so the built in omni menu should be fine. If you're wanting to look through tags specifically maybe look at how the complete_info() function works in vim, since it's what is used to supply the input list for FZF in the link above