🪴 my neovim config:)
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat(fzf): reconfigure ivy style

robin 1bd8a469 0e239dff

+102 -62
+102 -62
config/lua/ivy/plugins/fzf.lua
··· 3 3 "fzf-lua", 4 4 event = "DeferredUIEnter", 5 5 after = function() 6 - vim.api.nvim_set_hl(0, "FzfLuaBorder", { link = "FloatBorder" }) 6 + local theme = { 7 + { "default-title" }, 8 + winopts = { 9 + row = 1, 10 + col = 0, 11 + width = 1, 12 + height = 0.4, 13 + backdrop = 100, 14 + title_pos = "left", 15 + border = { "", "─", "", "", "", "", "", "" }, 16 + preview = { 17 + layout = "horizontal", 18 + title_pos = "right", 19 + border = function(_, m) 20 + if m.type == "fzf" then 21 + return "single" 22 + else 23 + assert(m.type == "nvim" and m.name == "prev" and type(m.layout) == "string", "no border set") 24 + local b = { "┌", "─", "┐", "│", "┘", "─", "└", "│" } 25 + if m.layout == "down" then 26 + b[1] = "├" --top right 27 + b[3] = "┤" -- top left 28 + elseif m.layout == "up" then 29 + b[7] = "├" -- bottom left 30 + b[6] = "" -- remove bottom 31 + b[5] = "┤" -- bottom right 32 + elseif m.layout == "left" then 33 + b[3] = "┬" -- top right 34 + b[5] = "┴" -- bottom right 35 + b[6] = "" -- remove bottom 36 + else -- right 37 + b[1] = "┬" -- top left 38 + b[7] = "┴" -- bottom left 39 + b[6] = "" -- remove bottom 40 + end 41 + return b 42 + end 43 + end, 44 + }, 45 + }, 46 + } 7 47 8 - require("fzf-lua").setup({ 9 - winopts = function(opts) 10 - opts = opts or {} 11 - local size = 30 12 - local preview_size = size / 2 13 - if opts.previewer == false then 14 - size = size / 2 15 - end 16 - local bottom_border = { vim.g.bc.horiz, vim.g.bc.horiz, vim.g.bc.horiz, "", "", "", "", "" } 17 - return { 18 - height = size, 19 - width = 1.0, 20 - col = 0, 21 - row = vim.o.lines - size - 1 - vim.o.cmdheight, -- offset to avoid covering statusline 22 - preview = { 23 - winopts = { 24 - cursorline = false, 25 - }, 26 - layout = "vertical", 27 - vertical = "up:" .. preview_size, 28 - title_pos = "left", 29 - }, 30 - backdrop = 100, 31 - border = bottom_border, 32 - } 33 - end, 48 + local up = { 49 + row = 1, 50 + col = 0, 51 + width = 1, 52 + height = 1, 53 + preview = { 54 + layout = "vertical", 55 + vertical = "up:50%", 56 + border = "none", 57 + }, 58 + } 59 + 60 + theme.blines = { winopts = up, previewer = { toggle_behavior = "extend" } } 61 + theme.lines = theme.blines 62 + theme.grep = theme.blines 63 + theme.grep_curbuf = theme.blines 64 + theme.git = { blame = { winopts = up } } 65 + 66 + local opts = { 34 67 fzf_opts = { 35 68 ["--layout"] = "reverse-list", 36 69 ["--info"] = "inline-right", 37 70 ["--no-separator"] = "", 71 + ["--padding"] = "0", 38 72 }, 73 + fzf_colors = true, 39 74 file_icon_padding = " ", 40 75 prompt = " ", 41 76 previewer = "builtin", ··· 49 84 treesitter = true, 50 85 }, 51 86 }, 87 + keymaps = { 88 + previewer = false, 89 + }, 52 90 file_ignore_patterns = { 53 - "%.npz", 54 - "%.pyc", 55 - "%.luac", 56 - "%.ipynb", 57 - "vendor/*", 58 - "%.lock", 59 - "__pycache__/*", 60 - "%.sqlite3", 61 - "%.ipynb", 62 - "node_modules/*", 63 - "%.min.js", 64 - "%.jpg", 65 - "%.jpeg", 66 - "%.png", 67 91 "%.age", 68 - "%.svg", 69 - "%.otf", 70 - "%.ttf", 71 - "%.git/", 72 - "%.webp", 92 + "%.cache", 93 + "%.class", 73 94 "%.dart_tool/", 95 + "%.dll", 96 + "%.docx", 97 + "%.dylib", 98 + "%.exe", 99 + "%.git/", 74 100 "%.gradle/", 101 + "%.ico", 75 102 "%.idea/", 103 + "%.ipynb", 104 + "%.jar", 105 + "%.jpeg", 106 + "%.jpg", 107 + "%.lock", 108 + "%.luac", 109 + "%.met", 110 + "%.min.js", 111 + "%.npz", 112 + "%.otf", 113 + "%.pdb", 114 + "%.pdf", 115 + "%.png", 116 + "%.pyc", 76 117 "%.settings/", 118 + "%.so", 119 + "%.sqlite3", 120 + "%.ttf", 121 + "%.vale/", 77 122 "%.vscode/", 123 + "%.webp", 124 + ".direnv/", 125 + ".direnv/*", 78 126 "__pycache__/", 127 + "__pycache__/*", 128 + "_sources/", 79 129 "build/", 80 130 "env/", 81 131 "gradle/", 82 132 "node_modules/", 133 + "node_modules/*", 134 + "smalljre_*/*", 83 135 "target/", 84 - "%.pdb", 85 - "%.dll", 86 - "%.class", 87 - "%.exe", 88 - "%.so", 89 - "%.cache", 90 - "%.ico", 91 - "%.pdf", 92 - "%.dylib", 93 - "%.jar", 94 - "%.docx", 95 - "%.met", 96 - "smalljre_*/*", 97 - "%.vale/", 98 - "_sources/", 99 136 "tmp/", 137 + "vendor/*", 100 138 }, 101 - }) 139 + } 140 + 141 + require("fzf-lua").setup(vim.tbl_deep_extend("force", theme, opts)) 102 142 103 143 require("fzf-lua").register_ui_select() 104 144