summaryrefslogtreecommitdiffstats
path: root/nvim/lua/plugins/fzf.lua
blob: 394a9892d2b6a6edcbb804ed0eea62749af8d911 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
local fzf = require("fzf-lua")

local inline = {
    split = "belowright 15new",
    width = 1.0,
    row = 1.0,
    border = "none",
    preview = { hidden = true },
}

fzf.setup({
    multiprocess = true,

    fzf_opts = {
        ["--layout"] = "reverse",
        ["--sync"] = "",
        ["--no-scrollbar"] = "",
        ["--info"] = "hidden",
        ["--keep-right"] = "",
    },

    winopts = inline,

    files = {
        formatter = "path.filename_first",
        fd_opts = "--type f --hidden --exclude .git --exclude node_modules --exclude .cache --exclude tags --exclude TAGS",
        winopts = inline,
        prompt = "files :: ",
        hidden =  true,
        cwd_prompt  = false,
    },

    buffers = {
        ignore_current_buffer = true,
        sort_mru = true,
    },

    grep = {
        prompt      = "found ::  ", 
        input_prompt = "grep ::  ",
        lgrep        = true,
        rg_opts      = "--column --line-number --no-heading --color=always --smart-case --max-columns=4096 -e",
        winopts      = inline,
    },

    lsp = {
        winopts = inline,
    },

    commands = {
        winopts = inline,
    },

    ui_select = {
        winopts = {
            relative = "cursor",
            height = 0.4,
            width = 0.6,
        },
    },
})