Skip to content

🐋 a lazydocker port for neovim | Even more lazier way to manage everything docker related

License

Notifications You must be signed in to change notification settings

mgierada/lazydocker.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lazydocker.nvim

🐋 A lazydocker port for neovim 🔌

Lua

License Status Neovim Default keymaps

Overview

lazydocker.nvim is a lazydocker plugin for neovim that allows you to manage your docker environment without leaving your workspace. lazydocker itself is a simple terminal UI for both docker and docker-compose, written in Go.

✨ Features

  • ✨ Toggle lazydocker in neovim without leaving your workspace. Just use Lazydocker command.
image

And a new floating terminal with lazydocker will pop up.

image

For a default keymaps bindings please refer to that wiki.

🔌 Available commands

  • Lazydocker

Default keymaps

Any default key map could be easily overwritten by modifying the keys property. See the Installation section

  • <leader>ld -- open lazydocker in floating window
  • q -- close the floating window with lazydocker

⚡️Requirements

It should work with any fairly modern neovim version. I tested that for the following:

  • neovim >= 0.9 and nightly 0.11-dev releases
  • lazydocker >= 0.21.1

💻 Installation

Make sure you have lazydocker up and running. The in-depth installing walkthrough is perfectly described in here.

For a quick start:

  1. Mac users can quickly install using homebrew
brew install jesseduffield/lazydocker/lazydocker
brew install lazydocker
  1. Windows users can use scoop or Chocolatey
scoop install lazydocker
choco install lazydocker
  1. Linux user can try with aur
yay -S lazydocker

Install the lazydocker.nvim neovim plugin with your favourite package manager:

Lazy

-- lazydocker.nvim
{
  "mgierada/lazydocker.nvim",
  dependencies = { "akinsho/toggleterm.nvim" },
  config = function()
    require("lazydocker").setup({
	    border = "curved", -- valid options are "single" | "double" | "shadow" | "curved"
	    width = 0.9, -- width of the floating window (0-1 for percentage, >1 for absolute columns)
	    height = 0.9, -- height of the floating window (0-1 for percentage, >1 for absolute rows)
    })
  end,
  event = "BufRead",
  keys = {
    {
      "<leader>ld",
      function()
        require("lazydocker").open()
      end,
      desc = "Open Lazydocker floating window",
    },
  },
},

If you want to make sure lazydocker.nvim starts whenever Neovim starts, you can set an event to event = "VeryLazy".

⚙️ Configuration

The plugin supports the following configuration options:

Option Type Default Description
border string "double" Border style for the floating window. Valid options: "single", "double", "shadow", "curved"
width number 0.9 Width of the floating window. Values between 0 and 1 represent a percentage of the editor width. Values greater than 1 represent absolute column count.
height number 0.9 Height of the floating window. Values between 0 and 1 represent a percentage of the editor height. Values greater than 1 represent absolute row count.

Configuration Examples

Default configuration (90% width and height):

require("lazydocker").setup({
  border = "double",
  width = 0.9,
  height = 0.9,
})

Full screen floating window:

require("lazydocker").setup({
  border = "curved",
  width = 1,
  height = 1,
})

Smaller floating window (70% width and height):

require("lazydocker").setup({
  border = "single",
  width = 0.7,
  height = 0.7,
})

Fixed size window (120 columns by 40 rows):

require("lazydocker").setup({
  border = "double",
  width = 120,
  height = 40,
})

Note: If you don't specify width or height, the plugin will use the default values (0.9), ensuring backward compatibility.

Star History

Star History Chart

About

🐋 a lazydocker port for neovim | Even more lazier way to manage everything docker related

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages