Skip to content

Commit 20d2014

Browse files
committed
feat(map): mappings to toggle dropbar menus
1 parent 270a1c4 commit 20d2014

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

lua/mappings.lua

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ end
88

99
local M = {}
1010

11+
-- Expose the map function
12+
M.map = map
13+
1114
M.general = function()
1215
map("i", "<C-h>", "<Left>")
1316
map("i", "<C-j>", "<Down>")

lua/plugins/init.lua

+5
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,11 @@ local plugins = {
146146
{
147147
"Bekaboo/dropbar.nvim",
148148
name = "dropbar",
149+
keys = {
150+
require("mappings").map({ "n" }, "<leader>p", function()
151+
require("dropbar.api").pick(vim.v.count ~= 0 and vim.v.count)
152+
end, "Toggle dropbar menu"),
153+
},
149154
event = { "BufReadPost", "BufNewFile" },
150155
config = function()
151156
require("dropbar").setup()

0 commit comments

Comments
 (0)