diff options
-rw-r--r-- | init.lua | 1 | ||||
-rw-r--r-- | lua/maps/find.lua | 28 | ||||
-rw-r--r-- | lua/plugins.lua | 21 | ||||
-rw-r--r-- | lua/telescope_config.lua | 2 |
4 files changed, 43 insertions, 9 deletions
@@ -1,5 +1,6 @@ require("config") require("plugins") +require("telescope_config") require("style") require("formatting") require("functions") diff --git a/lua/maps/find.lua b/lua/maps/find.lua index 5d4bfbe..aad0e46 100644 --- a/lua/maps/find.lua +++ b/lua/maps/find.lua @@ -1,8 +1,28 @@ -vim.api.nvim_set_keymap("n", "<leader>p", ":Files<CR>", { silent = true, noremap = true }) +vim.api.nvim_set_keymap( + "n", + "<leader>p", + ":Telescope find_files<CR>", + { silent = true, noremap = true } +) -vim.api.nvim_set_keymap("n", "<leader>b", ":Buffers<CR>", { silent = true, noremap = true }) +vim.api.nvim_set_keymap( + "n", + "<leader>b", + ":Telescope buffers<CR>", + { silent = true, noremap = true } +) -vim.api.nvim_set_keymap("n", "<leader>c", ":Commits<CR>", { silent = true, noremap = true }) +vim.api.nvim_set_keymap( + "n", + "<leader>c", + ":Telescope git_commits<CR>", + { silent = true, noremap = true } +) -vim.api.nvim_set_keymap("n", "<leader>f", ":Ag ", { noremap = true }) +vim.api.nvim_set_keymap( + "n", + "<leader>f", + ":Telescope live_grep<CR>", + { silent = true, noremap = true } +) diff --git a/lua/plugins.lua b/lua/plugins.lua index 3cbda43..82801e1 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -85,14 +85,25 @@ return require("packer").startup(function(use) } -- Navigation end - -- Fzf - use { "junegunn/fzf", tag = "0.52.1" } + -- Telescope + use { + "nvim-telescope/telescope.nvim", tag = "0.1.8", + requires = { + { + "nvim-lua/plenary.nvim", + commit = "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" + } + } + } use { - "junegunn/fzf.vim", - commit = "0a80e43f9027ec64213d602dbb0b22d65a072ca8" + "nvim-telescope/telescope-fzf-native.nvim", + commit = "9ef21b2e6bb6ebeaf349a0781745549bbb870d27", + run = "cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && \ + cmake --build build --config Release && \ + cmake --install build --prefix build" } - -- Fzf end + -- Telescope end -- Markdown use { diff --git a/lua/telescope_config.lua b/lua/telescope_config.lua new file mode 100644 index 0000000..391c38d --- /dev/null +++ b/lua/telescope_config.lua @@ -0,0 +1,2 @@ +require('telescope').setup({}) +require('telescope').load_extension('fzf') |