diff options
author | HampusM <hampus@hampusmat.com> | 2024-11-10 19:31:54 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2024-11-10 19:31:54 +0100 |
commit | 8d34de9e2ab66d506bc117a9dbfe05ea158d7cd0 (patch) | |
tree | 91dfa8aa4a08f7d985eb4f0cc0ad80bb56259c0c /lua/maps/find.lua | |
parent | d8a0eaca728ef5bf8485a2a321988f05dd79cb7b (diff) |
use lua functions for telescope keymaps
Diffstat (limited to 'lua/maps/find.lua')
-rw-r--r-- | lua/maps/find.lua | 64 |
1 files changed, 21 insertions, 43 deletions
diff --git a/lua/maps/find.lua b/lua/maps/find.lua index d886d8a..5c1b244 100644 --- a/lua/maps/find.lua +++ b/lua/maps/find.lua @@ -1,49 +1,27 @@ -vim.api.nvim_set_keymap( - "n", - "<leader>p", - ":Telescope find_files<CR>", - { silent = true, noremap = true } -) +vim.keymap.set("n", "<leader>p", function() + require("telescope.builtin").find_files() +end) -vim.api.nvim_set_keymap( - "n", - "<leader>b", - ":Telescope buffers<CR>", - { silent = true, noremap = true } -) +vim.keymap.set("n", "<leader>b", function () + require("telescope.builtin").buffers() +end) -vim.api.nvim_set_keymap( - "n", - "<leader>gc", - ":Telescope git_commits<CR>", - { silent = true, noremap = true } -) +vim.keymap.set("n", "<leader>gc", function () + require("telescope.builtin").git_commits() +end) -vim.api.nvim_set_keymap( - "n", - "<leader>gb", - ":Telescope git_branches<CR>", - { silent = true, noremap = true } -) +vim.keymap.set("n", "<leader>gb", function() + require("telescope.builtin").git_branches() +end) -vim.api.nvim_set_keymap( - "n", - "<leader>gcl", - ":Telescope conflicts<CR>", - { silent = true, noremap = true } -) +vim.keymap.set("n", "<leader>gcl", function() + require("telescope.builtin").conflicts() +end) -vim.api.nvim_set_keymap( - "n", - "<leader>f", - ":Telescope live_grep<CR>", - { silent = true, noremap = true } -) - -vim.api.nvim_set_keymap( - "n", - "<leader>e", - ":Telescope file_browser<CR>", - { silent = true, noremap = true } -) +vim.keymap.set("n", "<leader>f", function() + require("telescope.builtin").live_grep() +end) +vim.keymap.set("n", "<leader>e", function() + require("telescope").extensions.file_browser.file_browser() +end) |