From cbf304d45ca5c10348b512daca6f59eddc202b59 Mon Sep 17 00:00:00 2001 From: iGor milhit Date: Sat, 1 Jul 2023 21:44:56 +0200 Subject: [PATCH] telescope: add a plugin to use Ag - Adds a plugin to use Ag The Silversearcher with Telescope. - Improves some comments. Co-Authored-by: iGor milhit --- init.lua | 12 ++++++++++-- lua/custom/plugins/zen-mode.lua | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index 62693dc..79f41f0 100644 --- a/init.lua +++ b/init.lua @@ -105,7 +105,7 @@ require('lazy').setup({ -- Adds LSP completion capabilities 'hrsh7th/cmp-nvim-lsp', - + -- Adds completion capabilities for text in buffers 'hrsh7th/cmp-buffer', @@ -198,8 +198,13 @@ require('lazy').setup({ end, }, + -- Extension to telescope to use Ag (or ripgrep) to filter results + { + 'kelly-lin/telescope-ag' + }, + + -- Allow to search for snippets { - -- Allow to search for snippets 'benfowler/telescope-luasnip.nvim' }, @@ -328,7 +333,10 @@ require('telescope').setup { -- Enable telescope fzf native, if installed pcall(require('telescope').load_extension, 'fzf') +-- Enable telescope luasnip extension, if installed pcall(require('telescope').load_extension, 'luasnip') +-- Enable telescope-ag extension, if installed +pcall(require('telescope').load_extension, 'ag') -- See `:help telescope.builtin` vim.keymap.set('n', '?', require('telescope.builtin').oldfiles, { desc = '[?] Find recently opened files' }) diff --git a/lua/custom/plugins/zen-mode.lua b/lua/custom/plugins/zen-mode.lua index 93da391..8c11d88 100644 --- a/lua/custom/plugins/zen-mode.lua +++ b/lua/custom/plugins/zen-mode.lua @@ -23,7 +23,7 @@ return { width = 85, height = .8, options = { - -- Disable line numbering. + -- Disable line numbering, signcolumn and colorcolumn. number = false, signcolumn = "no", colorcolumn = "0"