Skip to content

Commit

Permalink
feat(plugin): scretch (#34)
Browse files Browse the repository at this point in the history
i found this plugin on
[reddit](https://www.reddit.com/r/neovim/comments/1346sl5/plugin_scretch_easily_manage_scratch_files/?utm_source=share&utm_medium=web2x&context=3)
and thought it looked useful.

however, i couldn't use it as it depended on telescope, which i just
migrated away from

fixed in [#3](0xJohnnyboy/scretch.nvim#3)
  • Loading branch information
snelling-a authored May 5, 2023
2 parents c2a7d2e + 1105903 commit 7038bac
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lua/plugins/scretch.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
local M = { "Sonicfury/scretch.nvim" }

M.dependencies = { "ibhagwan/fzf-lua" }

M.opts = { backend = "fzf-lua", scretch_dir = vim.fn.stdpath("cache") .. "/scretch/" }

M.keys = {
{ "<leader>sn", function() require("scretch").new() end, desc = "[N]ew [s]cretch" },
{ "<leader>snn", function() require("scretch").new_named() end, desc = "[N]ew [s]cretch [n]amed" },
{ "<leader>sl", function() require("scretch").last() end, desc = "[L]ast [s]cretch" },
{ "<leader>ss", function() require("scretch").search() end, desc = "[S]cretch [S]earch" },
{ "<leader>sg", function() require("scretch").grep() end, desc = "[G]rep [S]cretch" },
{ "<leader>sv", function() require("scretch").explore() end, desc = "Open [S]cretch dir in file Explorer" },
}

return M

0 comments on commit 7038bac

Please sign in to comment.