Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(lazydocker): replace keybindings table by function instead #1204

Merged
merged 2 commits into from
Sep 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions lua/astrocommunity/docker/lazydocker/init.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---@type LazySpec
return {
{
"mgierada/lazydocker.nvim",
Expand All @@ -6,18 +7,18 @@ return {
"akinsho/toggleterm.nvim",
{
"AstroNvim/astrocore",
opts = {
mappings = {
n = {
["<Leader>t" .. "d"] = {
function() require("lazydocker").open() end,
desc = "ToggleTerm LazyDocker",
},
},
},
},
opts = function(_, opts)
local maps = opts.mappings

-- INFO: Default prefix of toggleterm-related actions
local prefix = "<Leader>t"

maps.n[prefix .. "d"] = {
function() require("lazydocker").open() end,
desc = "ToggleTerm LazyDocker",
}
end,
},
},
opts = {},
mehalter marked this conversation as resolved.
Show resolved Hide resolved
},
}
Loading