Pickers: Disable telescope for now. Trying fzf-lua instead

This commit is contained in:
t0xa 2025-12-23 14:46:24 +03:00
parent 36d522bef7
commit 26ec30ca9e
2 changed files with 25 additions and 15 deletions

View file

@ -91,24 +91,33 @@ local function live_grep_in_quick_fix_list_files()
end end
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, {}) vim.api.nvim_create_user_command('FzfLuaGrepGlob', live_grep_with_glob, {})
local keymap = vim.keymap.set local keymap = vim.keymap.set
keymap("n", "<leader>lf", function() fzf_lua.files() end, { desc = "FZF: find files in cwd" }) keymap("n", "<leader>ff", function() fzf_lua.files() end, { desc = "FZF: find files in cwd" })
keymap("n", "<leader>lg", function() fzf_lua.live_grep() end, { desc = "FZF: find string in cwd" }) keymap("n", "<leader>fg", function() fzf_lua.live_grep() end, { desc = "FZF: find string in cwd" })
keymap("n", "<leader>ls", function() fzf_lua.grep_cword() end, { desc = "FZF: find string under cursor" }) keymap("n", "<leader>fs", function() fzf_lua.grep_cword() end, { desc = "FZF: find string under cursor" })
keymap("n", "<leader>lb", function() fzf_lua.buffers() end, { desc = "FZF: display opened buffers" }) keymap("n", "<leader>fb", function() fzf_lua.buffers() end, { desc = "FZF: display opened buffers" })
keymap("n", "<leader>lh", function() fzf_lua.help_tags() end, { desc = "FZF: display help tags" }) keymap("n", "<leader>fh", function() fzf_lua.help_tags() end, { desc = "FZF: display help tags" })
-- Your custom commands -- Your custom commands
keymap('n', '<leader>lp', live_grep_with_glob, { desc = 'Live grep with glob pattern' }) keymap("n", "<leader>fa", find_all_files_including_hidden, { desc = "FZF: Find all files" })
keymap('n', '<leader>lcp', live_grep_in_current_dir, { desc = 'Live grep in current directory' }) keymap('n', '<leader>fp', live_grep_with_glob, { desc = 'Live grep with glob pattern' })
-- keymap('n', '<leader>ccp', copy_file_path_and_position, { desc = "Copy cursor position" }) keymap('n', '<leader>fcp', live_grep_in_current_dir, { desc = 'Live grep in current directory' })
-- keymap('n', '<leader>ccd', copy_current_file_path, { desc = 'Copy current file path' }) keymap('n', '<leader>ccp', copy_file_path_and_position, { desc = "Copy cursor position" })
keymap('n', '<leader>lq', live_grep_in_quick_fix_list_files, { desc = "Live grep in quickfix files" }) keymap('n', '<leader>ccd', copy_current_file_path, { desc = 'Copy current file path' })
keymap('n', '<leader>fq', live_grep_in_quick_fix_list_files, { desc = "Live grep in quickfix files" })
keymap('n', '<leader>lcf', function() keymap('n', '<leader>fcf', function()
fzf_lua.live_grep({ fzf_lua.live_grep({
cwd = vim.fn.expand('%:p:h'), cwd = vim.fn.expand('%:p:h'),
search = '', search = '',
@ -116,11 +125,11 @@ keymap('n', '<leader>lcf', function()
}) })
end, { desc = "Live grep in current file" }) end, { desc = "Live grep in current file" })
keymap("n", "<leader>lml", function() fzf_lua.marks() end, { desc = "FZF: find marks list" }) keymap("n", "<leader>fml", function() fzf_lua.marks() end, { desc = "FZF: find marks list" })
keymap("n", "<leader>lmp", function() fzf_lua.man_pages() end, { desc = "FZF: find available man pages" }) keymap("n", "<leader>fmp", function() fzf_lua.man_pages() end, { desc = "FZF: find available man pages" })
keymap("n", "<leader>lds", function() fzf_lua.lsp_document_symbols() end, { desc = "Grep: Document symbols" }) keymap("n", "<leader>fds", function() fzf_lua.lsp_document_symbols() end, { desc = "Grep: Document symbols" })
keymap("n", "<leader>lt", function() keymap("n", "<leader>ft", function()
fzf_lua.grep({ fzf_lua.grep({
prompt = 'Todo ', prompt = 'Todo ',
search = 'TODO|FIXME|XXX|HACK|BUG|NOTE|PERF|OPTIMIZE', search = 'TODO|FIXME|XXX|HACK|BUG|NOTE|PERF|OPTIMIZE',

View file

@ -1,5 +1,6 @@
return { return {
"nvim-telescope/telescope.nvim", "nvim-telescope/telescope.nvim",
enabled = false,
dependencies = { dependencies = {
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" }, { "nvim-telescope/telescope-fzf-native.nvim", build = "make" },
"nvim-lua/plenary.nvim", "nvim-lua/plenary.nvim",