diff options
author | Christian Segundo | 2025-01-17 22:01:13 +0100 |
---|---|---|
committer | Christian Segundo | 2025-01-17 22:01:13 +0100 |
commit | 853db83669c6f870d39efa5996a5fce158bb7e9c (patch) | |
tree | 467cfafe0e83c00bbfb86452b7710861b1b9ffb2 | |
parent | 4f02b24b6e8509897d9e3caf227309e936565656 (diff) | |
download | config-853db83669c6f870d39efa5996a5fce158bb7e9c.tar.gz |
simplify telescope mappings
-rw-r--r-- | lua/plugins/core/telescope.lua | 34 |
1 files changed, 11 insertions, 23 deletions
diff --git a/lua/plugins/core/telescope.lua b/lua/plugins/core/telescope.lua index 1560442..fd64959 100644 --- a/lua/plugins/core/telescope.lua +++ b/lua/plugins/core/telescope.lua @@ -3,32 +3,20 @@ return { "nvim-telescope/telescope.nvim", config = function() require("telescope").load_extension("file_browser") + local builtin = require('telescope.builtin') + vim.keymap.set('n', '<leader>ff', builtin.find_files, { desc = 'Telescope find files' }) + vim.keymap.set('n', '<leader>fg', + function () + require("telescope.builtin").live_grep({ + additional_args = { "--hidden" }, + }) + end, + { desc = 'Telescope live grep' } + ) end, dependencies = { "nvim-lua/plenary.nvim", "nvim-telescope/telescope-file-browser.nvim", }, - }, - - { - "folke/which-key.nvim", - opts = function(_, opts) - if type(opts) == "table" then - opts.b = opts.b or {} - opts.f = opts.f or {} - - opts.b["b"] = { "<cmd>Telescope buffers<cr>", "All" } - opts.f["f"] = { "<cmd>Telescope find_files<cr>", "Find" } - opts.f["g"] = { - function() - require("telescope.builtin").live_grep({ - additional_args = { "--hidden" }, - }) - end, - "Grep", - } - opts.f["b"] = { "<cmd>Telescope file_browser<cr>", "Browse" } - end - end, - }, + } } |