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

Allow changing the number of gists fetched

Open sudish opened this issue 3 months ago • 1 comments

gh defaults to fetching the 10 most recent gists, would be good to be able to edit even older ones. This requires passing -L <limit> to gh gist list. A configurable limit would be very useful.

sudish avatar Oct 04 '25 15:10 sudish

Hey nice idea i'm going to work on this soon

rawnly avatar Nov 03 '25 12:11 rawnly

Hey @sudish lmk if with the latest release it works as expected!

rawnly avatar Nov 25 '25 20:11 rawnly

Hi @rawnly, thanks for adding this!

I'm still seeing the default 10 gists with this config in lazyvim where the popup shows 10/10. I've confirmed that the plugin is at v0.1.2. Hope I'm not overlooking something obvious!

return {
  {
    "Rawnly/gist.nvim",
    cmd = { "GistCreate", "GistCreateFromFile", "GistsList" },
    -- config = true,
    opts = {
      list = {
        limit = 300
      }
    }
  },
  -- `GistsList` opens the selected gist in a terminal buffer,
  -- nvim-unception uses neovim remote rpc functionality to open the gist in an actual buffer
  -- and prevents neovim buffer inception
  {
    "samjwill/nvim-unception",
    lazy = false,
    init = function() vim.g.unception_block_while_host_edits = true end
  }
}

sudish avatar Nov 26 '25 16:11 sudish

Hey @sudish you have the wrong configuration, take a look at https://github.com/rawnly/gist.nvim#configuration, you have to put the limit option under platforms.github.list

rawnly avatar Nov 26 '25 21:11 rawnly

return {
  {
    "Rawnly/gist.nvim",
    cmd = { "GistCreate", "GistCreateFromFile", "GistsList" },
    -- config = true,
    opts = {
      platforms = {
        github = {
          list = {
            limit = 300
          }
        }
      }
    }
  },
  -- `GistsList` opens the selected gist in a terminal buffer,
  -- nvim-unception uses neovim remote rpc functionality to open the gist in an actual buffer
  -- and prevents neovim buffer inception
  {
    "samjwill/nvim-unception",
    lazy = false,
    init = function() vim.g.unception_block_while_host_edits = true end
  }
}

rawnly avatar Nov 26 '25 21:11 rawnly

I was overlooking something obvious! Thanks and sorry for the noise. Working very well now, thanks for adding this. It's great to be able to filter quickly across all my years of gists and quickly find old notes to myself.

Cheers!

sudish avatar Nov 27 '25 15:11 sudish