snacks.nvim icon indicating copy to clipboard operation
snacks.nvim copied to clipboard

feat(picker.git): allow passing extra args to other git pickers

Open pedropombeiro opened this issue 1 week ago • 0 comments

Description

This PR builds on https://github.com/folke/snacks.nvim/commit/7122a03fdf0b7bb9a5c6645b0e86f9e3a9f9290b to provide a way to pass custom args to git command invocations.

An alternative (probably cleaner) way of doing this could be to add an args field to picker.sources.git:

      picker = {
        ---@class snacks.picker.previewers.Config
        previewers = {
          git = {
            args = git_opts(),
          },
        },
        ---@class snacks.picker.sources.Config
        sources = {
          git = {
            args = git_opts(),
          },
        },

Related Issue(s)

Fixes #1184

Screenshots

pedropombeiro avatar Feb 15 '25 23:02 pedropombeiro