fzf-lua
This commit is contained in:
@@ -1,55 +0,0 @@
|
||||
dofile(vim.g.base46_cache .. "telescope")
|
||||
|
||||
local open_with_trouble = require("trouble.sources.telescope").open
|
||||
|
||||
local options = {
|
||||
pickers = {
|
||||
colorscheme = { enable_preview = true },
|
||||
find_files = {
|
||||
find_command = { "rg", "--files", "--hidden", "--glob", "!**/.git/*" },
|
||||
},
|
||||
defaults = {
|
||||
vimgrep_arguments = {
|
||||
"rg",
|
||||
"--no-heading",
|
||||
"--with-filename",
|
||||
"--line-number",
|
||||
"--column",
|
||||
"--smart-case",
|
||||
"--hidden",
|
||||
},
|
||||
sort_mru = true,
|
||||
},
|
||||
},
|
||||
defaults = {
|
||||
prompt_prefix = " ",
|
||||
selection_caret = " ",
|
||||
entry_prefix = " ",
|
||||
sorting_strategy = "ascending",
|
||||
layout_config = {
|
||||
horizontal = {
|
||||
prompt_position = "top",
|
||||
preview_width = 0.55,
|
||||
},
|
||||
width = 0.87,
|
||||
height = 0.80,
|
||||
},
|
||||
mappings = {
|
||||
n = { ["<C-q>"] = open_with_trouble, ["<C-t>"] = open_with_trouble },
|
||||
i = { ["<C-q>"] = open_with_trouble, ["<C-t>"] = open_with_trouble },
|
||||
},
|
||||
},
|
||||
|
||||
extensions_list = { "themes", "terms" },
|
||||
extensions = {
|
||||
repo = {
|
||||
list = {
|
||||
fd_opts = { "--max-depth", "3", "--exclude", "lib", "--exclude", "cargo", "--exclude", "node_modules", "-j2" },
|
||||
search_dirs = { "~/projects", "~/subvisual", "~/ethui" },
|
||||
},
|
||||
settings = { auto_lcd = true },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
return options
|
||||
@@ -0,0 +1,39 @@
|
||||
return {
|
||||
{
|
||||
"ibhagwan/fzf-lua",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
opts = {
|
||||
files = {
|
||||
prompt = "Fzf files>",
|
||||
git_icons = true,
|
||||
previewer = "bat",
|
||||
path_shorten = true,
|
||||
cmd = "rg --files",
|
||||
},
|
||||
},
|
||||
cmd = "FzfLua",
|
||||
keys = {
|
||||
{
|
||||
"<C-p>",
|
||||
function()
|
||||
require("fzf-lua").files()
|
||||
end,
|
||||
desc = "Files",
|
||||
},
|
||||
{
|
||||
"<C-f>",
|
||||
function()
|
||||
require("fzf-lua").live_grep()
|
||||
end,
|
||||
desc = "Grep string",
|
||||
},
|
||||
{
|
||||
"<leader>b",
|
||||
function()
|
||||
require("fzf-lua").buffers()
|
||||
end,
|
||||
desc = "Buffers",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
+1
-1
@@ -9,7 +9,7 @@ return {
|
||||
-- Only one of these is needed.
|
||||
"nvim-telescope/telescope.nvim", -- optional
|
||||
"ibhagwan/fzf-lua", -- optional
|
||||
"echasnovski/mini.pick", -- optional
|
||||
-- "echasnovski/mini.pick", -- optional
|
||||
},
|
||||
config = true,
|
||||
keys = {
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
return {
|
||||
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
dependencies = { "nvim-treesitter/nvim-treesitter", "cljoly/telescope-repo.nvim" },
|
||||
cmd = "Telescope",
|
||||
config = function()
|
||||
---@diagnostic disable-next-line: different-requires
|
||||
require("telescope").setup(require "configs.telescope")
|
||||
require("telescope").load_extension "repo"
|
||||
end,
|
||||
keys = {
|
||||
{
|
||||
"<C-p>",
|
||||
function()
|
||||
require("telescope.builtin").find_files()
|
||||
end,
|
||||
desc = "File files",
|
||||
},
|
||||
{
|
||||
"<C-S-f>",
|
||||
function()
|
||||
require("telescope.builtin").grep_string { search = "" }
|
||||
end,
|
||||
desc = "Fuzzy search",
|
||||
},
|
||||
{
|
||||
"<C-f>",
|
||||
function()
|
||||
require("telescope.builtin").live_grep()
|
||||
end,
|
||||
desc = "Grep string",
|
||||
},
|
||||
{
|
||||
"<leader>b",
|
||||
function()
|
||||
require("telescope.builtin").buffers()
|
||||
end,
|
||||
desc = "Buffers",
|
||||
},
|
||||
{
|
||||
"<leader>p",
|
||||
function()
|
||||
require("telescope").extensions.repo.list {}
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user