From 812fc50a6bbb593f79aa3728ef5970ea62f65508 Mon Sep 17 00:00:00 2001 From: LordMZTE Date: Sat, 11 Sep 2021 18:13:25 +0200 Subject: [PATCH] switch to telescope.nvim --- .config/nvim/lua/maps.lua | 5 ++++- .config/nvim/lua/pluginconf/telescope.lua | 13 +++++++++++++ .config/nvim/lua/plugins.lua | 8 +++++++- 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 .config/nvim/lua/pluginconf/telescope.lua diff --git a/.config/nvim/lua/maps.lua b/.config/nvim/lua/maps.lua index c31e686..d6a9287 100644 --- a/.config/nvim/lua/maps.lua +++ b/.config/nvim/lua/maps.lua @@ -39,7 +39,10 @@ end -- Getting stuck in ~~vim~~ terminal map("t", "", "", {}) -map("n", "fzf", ":FZF", { silent = true }) + +-- telescope +map("n", "ff", "Telescope find_files", { silent = true }) +map("n", "fg", "Telescope live_grep", { silent = true }) -- Quick cursor movement map("n", "", "5j", { noremap = true }) diff --git a/.config/nvim/lua/pluginconf/telescope.lua b/.config/nvim/lua/pluginconf/telescope.lua new file mode 100644 index 0000000..b7790bd --- /dev/null +++ b/.config/nvim/lua/pluginconf/telescope.lua @@ -0,0 +1,13 @@ +require("telescope").setup { + defaults = { + vimgrep_arguments = { + 'rg', + '--color=never', + '--no-heading', + '--with-filename', + '--line-number', + '--column', + '--smart-case' + } + } +} diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua index 08c2a0e..173b547 100644 --- a/.config/nvim/lua/plugins.lua +++ b/.config/nvim/lua/plugins.lua @@ -14,7 +14,6 @@ return require("packer").startup(function(use) } use "ryanoasis/vim-devicons" use "cespare/vim-toml" - use "junegunn/fzf" use { "dracula/vim", as = "dracula" @@ -59,4 +58,11 @@ return require("packer").startup(function(use) requires = "nvim-lua/plenary.nvim" } use "ron-rs/ron.vim" + + use { + "nvim-telescope/telescope.nvim", + requires = "nvim-lua/plenary.nvim", + config = pconf("telescope") + } end) +