From ca8ea75e5a1d838635fd2fcc5c3467a5bb33c4ec Mon Sep 17 00:00:00 2001 From: Dheepak Krishnamurthy Date: Sun, 6 Mar 2022 13:53:25 -0700 Subject: [PATCH] docs: Update README.md --- README.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ec2f5e9..939bfea 100644 --- a/README.md +++ b/README.md @@ -121,7 +121,21 @@ Instead, you can open it with telescope. **How to use** -To load the telescope extension you have to add this line to your configuration: +Install the plugin using: + +``` +use({ + "nvim-telescope/telescope.nvim", + requires = { { "nvim-lua/plenary.nvim" }, { "kdheepak/lazygit.nvim" } }, + config = function() + require("telescope").load_extension("lazygit") + end, +}) +``` + +Lazy loading `lazygit.nvim` for telescope functionality is not supported. Open an issue if you wish to have this feature. + +If you are not using Packer, to load the telescope extension, you have to add this line to your configuration: ```lua require('telescope').load_extension('lazygit') @@ -131,7 +145,7 @@ By default the paths of each repo is stored only when lazygit is triggered. Though, this may not be convenient, so it possible to do something like this: ```vim - autocmd BufEnter * :lua require('lazygit.utils').project_root_dir() +autocmd BufEnter * :lua require('lazygit.utils').project_root_dir() ``` That makes sure that any opened buffer which is contained in a git repo will be tracked.