Provides a picker to view all hunks in the current buffer. Two actions are provided to
either reset
or stage
a hunk (?
to view all available mappings).
The extension may be installed manually or with a plugin manager of choice.
An example using Lazy.nvim:
require("lazy").setup({
"radyz/telescope-gitsigns",
dependencies = {
"lewis6991/gitsigns.nvim",
"nvim-telescope/telescope.nvim",
}
})
require("gitsigns").setup({
-- This isn't required, but goes to show that selection list signs are being grabbed
-- from `gitsigns` opts table to get a uniform experience.
signs = {
add = { text = "| "}
...
}
})
require("telescope").setup({})
-- To get telescope-gitsigns loaded and working with telescope, you need to call
-- load_extension, somewhere after setup function:
require("telescope").load_extension("git_signs")
:Telescope git_signs