From 0c1360f87e64b20a5eb075c872b1a4cd0fca563f Mon Sep 17 00:00:00 2001 From: Benjamin Chausse Date: Wed, 2 Apr 2025 16:18:50 -0400 Subject: Batman --- README.md | 86 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 README.md (limited to 'README.md') diff --git a/README.md b/README.md new file mode 100644 index 0000000..8270295 --- /dev/null +++ b/README.md @@ -0,0 +1,86 @@ +
+ +A parachute dropping a crate + +# dropship.nvim + +Your neovim tabs, dropshipped into your projects + +
+ + +# How it works + +1. Configure the plugin with either a table containing drop location + or a path to a lua file that returns that. +2. Setup keybinds you might want to use dropship with +3. Profit! + +**Using a pre-baked list of drop-locations**: + +```lua +{ + "ChausseBenjamin/dropship.nvim", + dependencies = "nvim-telescope/telescope.nvim", + opts = { + drop_locations = { + { "Projects", "~/Workspace" }, + { "Neovim Config", "~/.config/nvim" }, + { "University", "~/Documents/school/university/current_semester" }, + }, + }, + keys = { + { + "dt", + function() + require("dropship").dropship_newtab() + end, + mode = "n", + desc = "[D]ropship in a new [T]ab", + }, + { + "dh", + function() + require("dropship").dropship_current() + end, + mode = "n", + desc = "[D]ropship right [H]ere", + }, + }, + cmd = { + "Dropship", + "DropshipNewTab", + } +} +``` + + +**Using a lua file for drop-locations**: + +In order to have a single source of truth for my shortcuts, I have a script +that generates shortcuts for most of my apps [in my dotfiles][1]. This type of +solution makes sense for me to keep all my shortcuts in sync. + +```lua +{ + "ChausseBenjamin/dropship.nvim", + dependencies = "nvim-telescope/telescope.nvim", + opts = { + drop_locations = "~/.cache/droplist.lua" + }, + -- Same as above for the rest... +} +``` + +And the `droplist.lua` would then look like the following: + +```lua +return { + { "Projects", "~/Workspace" }, + { "Neovim Config", "~/.config/nvim" }, + { "University", "~/Documents/school/university/current_semester" }, +} +``` + + +[1]: https://github.com/ChausseBenjamin/dotfiles/blob/master/.local/bin/shortcutgen -- cgit v1.2.3