summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2024-06-08 22:01:29 +0200
committerHampusM <hampus@hampusmat.com>2024-06-08 22:01:33 +0200
commit3945397198a611347a89cb8635d0a9551a8e98a9 (patch)
treecb7ccd081245c394577cddfe00da33d265cc6ec4 /lua
parent4a61ce3e2a7b11e5d94fc047ffdd7351623df199 (diff)
use Telescope instead of fzf.vim
Diffstat (limited to 'lua')
-rw-r--r--lua/maps/find.lua28
-rw-r--r--lua/plugins.lua21
-rw-r--r--lua/telescope_config.lua2
3 files changed, 42 insertions, 9 deletions
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')