From ce0dfec2ead58601517b54cb2064fa200c54b2d4 Mon Sep 17 00:00:00 2001 From: Martin Larsson Date: Sat, 14 Sep 2024 20:35:09 +0200 Subject: [PATCH] Test out fzf over telescope for switching files, might migrate all functionality to fzf over telescope if I like it --- home/.config/nvim/lua/plugs/fzf.lua | 19 +++++++++++++++++++ home/.config/nvim/lua/plugs/telescope.lua | 19 ++++++++++--------- 2 files changed, 29 insertions(+), 9 deletions(-) create mode 100644 home/.config/nvim/lua/plugs/fzf.lua diff --git a/home/.config/nvim/lua/plugs/fzf.lua b/home/.config/nvim/lua/plugs/fzf.lua new file mode 100644 index 0000000..198f305 --- /dev/null +++ b/home/.config/nvim/lua/plugs/fzf.lua @@ -0,0 +1,19 @@ +return { + "ibhagwan/fzf-lua", + dependencies = { "nvim-tree/nvim-web-devicons" }, + opts = {}, + config = function() + local fzf = require("fzf-lua") + require("utils").add_keymaps({ + n = { + ["to"] = { + cmd = function() + fzf.files({ + git_icons = false, + }) + end + } + } + }) + end +} diff --git a/home/.config/nvim/lua/plugs/telescope.lua b/home/.config/nvim/lua/plugs/telescope.lua index a4d9b24..720b4f8 100644 --- a/home/.config/nvim/lua/plugs/telescope.lua +++ b/home/.config/nvim/lua/plugs/telescope.lua @@ -29,19 +29,20 @@ return { preview = { "─", "│", "─", "│", "┌", "┐", "┘", "└" }, }, prompt_title = "", - winblend = 20 + winblend = 20, + width = 0.75 }) local builtin = require("telescope.builtin") local pickers = { - { - fn = builtin.find_files, - key = "o", - picker_opts = { - prompt_prefix = "Files> ", - previewer = false, - }, - }, + -- { + -- fn = builtin.find_files, + -- key = "o", + -- picker_opts = { + -- prompt_prefix = "Files> ", + -- previewer = false, + -- }, + -- }, { fn = builtin.current_buffer_fuzzy_find, key = "f",