Skip to content
Michael Härtl edited this page Aug 10, 2023 · 4 revisions

Provider Options

The below applies to buffer type providers, files, grep, etc

The below applies to buffer type providers, tabs, buffers, lines and blines

Option Type Default Description
color_icons bool true Use color for icons.
cwd_only bool false Only include buffers from the current working directory.
cwd string | nil nil Only include buffers from the specified working directory.
current_tab_only bool false Only include buffers from the current tab.
file_icons bool true Show file icons.
file_name_only bool false Only show the filename without the path.
fzf_opts table { ["--tiebreak"] = "index" } Options to pass to fzf
ignore_current_buffer bool false Exclude the currently active buffer.
no_term_buffers bool false Exclude terminal buffers.
path_shorten bool | number false Shorten the directory names in the file path
show_quickfix bool false Include the quickfix buffer.
show_unlisted bool false Include unlisted buffers (e.g. 'help' buffers).
show_unloaded bool true Include unloaded buffers.
sort_lastused bool true Sort the buffers by their last use.

Below is an example usage of some of the above:

require'fzf-lua'.setup {
    files = {
        cwd = '~/.config',    -- Show files from this directory
        ...
    },
    buffers = {
        ignore_current_buffer    = true,         -- Don't show the active buffer
        show_unloaded            = true,         -- show unloaded buffers
        cwd_only                 = false,        -- buffers for the cwd only
        cwd                      = nil,          -- buffers list for a given dir
        ...
    },
    blines = {
        no_term_buffers   = false,    -- include 'term' buffers
        ...
    },
    tabs = {
        show_unlisted     = true,     -- Show unlisted buffers
        current_tab_only  = true,     -- Only show buffers from current tab
        ...
    },
}
Clone this wiki locally