gfanto
fzf-lsp.nvim
Lua

Enable the power of fzf fuzzy search for the neovim built in lsp

Last updated May 11, 2026
240
Stars
15
Forks
15
Issues
0
Stars/day
Attention Score
30
Language breakdown
Lua 80.7%
Vim Script 16.5%
Shell 2.9%
โ–ธ Files click to expand
README

fzf-lsp.nvim

Show document symbols

Installation

Install using vim-plug. Put this in your init.vim.

Plug 'gfanto/fzf-lsp.nvim'
Plug 'nvim-lua/plenary.nvim'

Requirements

  • Neovim 0.5+
  • fzf installed in addition to use this plugin. See .
  • bat installed for the preview. See

Features

This is an extension for fzf that give you the ability to search for symbols using the neovim builtin lsp.

Commands and settings

If you have fzf.vim installed, this plugin will respect your g:fzfcommandprefix setting.

Settings:

In general fzf-lsp.vim will respect your fzf.vim settings, alternatively you can override a specific settings with the fzf-lsp.vim equivalent:

  • g:fzflspaction: the equivalent of g:fzf_action, it's a dictionary containing all the actions that fzf will do in case of specific input
  • g:fzflsplayout: the equivalent of g:fzflayout, dictionary with the fzfwindow layout
  • g:fzflspcolors: the equivalent of g:fzf_colors, it's a string that will be passed to fzf to set colors
  • g:fzflsppreviewwindow: the equivalent of g:fzfpreview_window, it's a list containing the preview windows position and key bindings
  • f:fzflspcommandprefix: the equivalent of g:fzfcommand_prefix, it's the prefix applied to all commands
fzf-lsp.vim only settings:
  • g:fzflsptimeout: integer value, number of milliseconds after command calls will go to timeout
  • g:fzflspwidth: integer value, max width per line, used to truncate the current line
  • g:fzflsppretty: boolean value, select the line format, default is false
(at the moment since the value is process by lua it cannot be used as a standard vim boolean value, but it must be either v:true or v:false)

Commands:

Commands accepts and respect the ! if given

  • Call :Definitions to show the definition for the symbols under the cursor
  • Call :Declarations to show the declaration for the symbols under the cursor\*
  • Call :TypeDefinitions to show the type definition for the symbols under the cursor\*
  • Call :Implementations to show the implementation for the symbols under the cursor\*
  • Call :References to show the references for the symbol under the cursor
  • Call :DocumentSymbols to show all the symbols in the current buffer
  • Call :WorkspaceSymbols to show all the symbols in the workspace, you can optionally pass the query as argument to the command
  • Call :IncomingCalls to show the incoming calls
  • Call :OutgoingCalls to show the outgoing calls
  • Call :CodeActions to show the list of available code actions
  • Call :RangeCodeActions to show the list of available code actions in the visual selection
  • Call :Diagnostics to show all the available diagnostic informations in the current buffer, you can optionally pass the desired severity level as first argument or the severity limit level as second argument
  • Call :DiagnosticsAll to show all the available diagnostic informations in all the opened buffers, you can optionally pass the desired severity level as first argument or the severity limit level as second argument
Note(\*): this methods may not be implemented in your language server, especially textDocument/declaration (Declarations) it's usually not implemented in favour of textDocument/definition (Definitions).

Functions

Commands are just wrappers to the following function, each function take one optional parameter: a dictionary containing the options.

  • require'fzflsp'.codeaction_call
  • require'fzflsp'.rangecodeactioncall
  • require'fzflsp'.definitioncall
  • require'fzflsp'.declarationcall
  • require'fzflsp'.typedefinition_call
  • require'fzflsp'.implementationcall
  • require'fzflsp'.referencescall
  • require'fzflsp'.documentsymbol_call
  • require'fzflsp'.workspacesymbol_call
* options: * query
  • require'fzflsp'.incomingcalls_call
  • require'fzflsp'.outgoingcalls_call
  • require'fzflsp'.diagnosticcall
* options: * bufnr: the buffer number, default on current buffer * severity: the minimum severity level * severity_limit: the maximum severity level

Handlers

Functions and commands are implemented using sync calls, if you want your calls to be async you can use the standard neovim calls setting his relative handler. To do that you can use the provided setup function, keeping in mind that this will replace all your handlers:

require'fzf_lsp'.setup()

or you can manually setup your handlers. The provided handlers are:

vim.lsp.handlers["textDocument/codeAction"] = require'fzflsp'.codeaction_handler vim.lsp.handlers["textDocument/definition"] = require'fzflsp'.definitionhandler vim.lsp.handlers["textDocument/declaration"] = require'fzflsp'.declarationhandler vim.lsp.handlers["textDocument/typeDefinition"] = require'fzflsp'.typedefinition_handler vim.lsp.handlers["textDocument/implementation"] = require'fzflsp'.implementationhandler vim.lsp.handlers["textDocument/references"] = require'fzflsp'.referenceshandler vim.lsp.handlers["textDocument/documentSymbol"] = require'fzflsp'.documentsymbol_handler vim.lsp.handlers["workspace/symbol"] = require'fzflsp'.workspacesymbol_handler vim.lsp.handlers["callHierarchy/incomingCalls"] = require'fzflsp'.incomingcalls_handler vim.lsp.handlers["callHierarchy/outgoingCalls"] = require'fzflsp'.outgoingcalls_handler

Setup options

The setup function optionally takes a table for configuration. Available options:

  • overrideuiselect: boolean option to override the vim.ui.select function (only for neovim 0.6+)

๐Ÿ”— More in this category

ยฉ 2026 GitRepoTrend ยท gfanto/fzf-lsp.nvim ยท Updated daily from GitHub