From 26ec30ca9e6dbf7a87c64d54f660fff914e42efa Mon Sep 17 00:00:00 2001 From: t0xa Date: Tue, 23 Dec 2025 14:46:24 +0300 Subject: [PATCH] Pickers: Disable telescope for now. Trying fzf-lua instead --- lua/custom/fzf_lua.lua | 39 ++++++++++++++++++++------------ lua/custom/plugins/telescope.lua | 1 + 2 files changed, 25 insertions(+), 15 deletions(-) diff --git a/lua/custom/fzf_lua.lua b/lua/custom/fzf_lua.lua index 9bbfc0a..b520536 100644 --- a/lua/custom/fzf_lua.lua +++ b/lua/custom/fzf_lua.lua @@ -91,24 +91,33 @@ local function live_grep_in_quick_fix_list_files() end end +local function find_all_files_including_hidden() + fzf_lua.files( + { + fd_opts = "--type f --hidden --no-ignore" + } + ) +end + vim.api.nvim_create_user_command('FzfLuaGrepGlob', live_grep_with_glob, {}) local keymap = vim.keymap.set -keymap("n", "lf", function() fzf_lua.files() end, { desc = "FZF: find files in cwd" }) -keymap("n", "lg", function() fzf_lua.live_grep() end, { desc = "FZF: find string in cwd" }) -keymap("n", "ls", function() fzf_lua.grep_cword() end, { desc = "FZF: find string under cursor" }) -keymap("n", "lb", function() fzf_lua.buffers() end, { desc = "FZF: display opened buffers" }) -keymap("n", "lh", function() fzf_lua.help_tags() end, { desc = "FZF: display help tags" }) +keymap("n", "ff", function() fzf_lua.files() end, { desc = "FZF: find files in cwd" }) +keymap("n", "fg", function() fzf_lua.live_grep() end, { desc = "FZF: find string in cwd" }) +keymap("n", "fs", function() fzf_lua.grep_cword() end, { desc = "FZF: find string under cursor" }) +keymap("n", "fb", function() fzf_lua.buffers() end, { desc = "FZF: display opened buffers" }) +keymap("n", "fh", function() fzf_lua.help_tags() end, { desc = "FZF: display help tags" }) -- Your custom commands -keymap('n', 'lp', live_grep_with_glob, { desc = 'Live grep with glob pattern' }) -keymap('n', 'lcp', live_grep_in_current_dir, { desc = 'Live grep in current directory' }) --- keymap('n', 'ccp', copy_file_path_and_position, { desc = "Copy cursor position" }) --- keymap('n', 'ccd', copy_current_file_path, { desc = 'Copy current file path' }) -keymap('n', 'lq', live_grep_in_quick_fix_list_files, { desc = "Live grep in quickfix files" }) +keymap("n", "fa", find_all_files_including_hidden, { desc = "FZF: Find all files" }) +keymap('n', 'fp', live_grep_with_glob, { desc = 'Live grep with glob pattern' }) +keymap('n', 'fcp', live_grep_in_current_dir, { desc = 'Live grep in current directory' }) +keymap('n', 'ccp', copy_file_path_and_position, { desc = "Copy cursor position" }) +keymap('n', 'ccd', copy_current_file_path, { desc = 'Copy current file path' }) +keymap('n', 'fq', live_grep_in_quick_fix_list_files, { desc = "Live grep in quickfix files" }) -keymap('n', 'lcf', function() +keymap('n', 'fcf', function() fzf_lua.live_grep({ cwd = vim.fn.expand('%:p:h'), search = '', @@ -116,11 +125,11 @@ keymap('n', 'lcf', function() }) end, { desc = "Live grep in current file" }) -keymap("n", "lml", function() fzf_lua.marks() end, { desc = "FZF: find marks list" }) -keymap("n", "lmp", function() fzf_lua.man_pages() end, { desc = "FZF: find available man pages" }) -keymap("n", "lds", function() fzf_lua.lsp_document_symbols() end, { desc = "Grep: Document symbols" }) +keymap("n", "fml", function() fzf_lua.marks() end, { desc = "FZF: find marks list" }) +keymap("n", "fmp", function() fzf_lua.man_pages() end, { desc = "FZF: find available man pages" }) +keymap("n", "fds", function() fzf_lua.lsp_document_symbols() end, { desc = "Grep: Document symbols" }) -keymap("n", "lt", function() +keymap("n", "ft", function() fzf_lua.grep({ prompt = 'Todo❯ ', search = 'TODO|FIXME|XXX|HACK|BUG|NOTE|PERF|OPTIMIZE', diff --git a/lua/custom/plugins/telescope.lua b/lua/custom/plugins/telescope.lua index 2575d64..68acb53 100644 --- a/lua/custom/plugins/telescope.lua +++ b/lua/custom/plugins/telescope.lua @@ -1,5 +1,6 @@ return { "nvim-telescope/telescope.nvim", + enabled = false, dependencies = { { "nvim-telescope/telescope-fzf-native.nvim", build = "make" }, "nvim-lua/plenary.nvim",