Skip to content

sand4rt/zen.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🧘🏼‍♂️ zen.nvim

Note While the plugin generally works, the code is still a work in progress, somewhat rough and may contain bugs. It will take time to fully iron out all edge cases.

zen mode by https://github.com/alex35mil/dotfiles

Capabilities

  • Simple plugin that centers the main buffer.
  • Compatible with side buffer plugins (like neo-tree.nvim).
  • Automatically toggles side buffers whenever a side buffer is opened/closed without flickering.
  • Responsive during resizing.
  • Supports tabs, horizontal and vertical splits.
  • Layout and positioning options.
  • Removes the need for a visual guide showing the maximum line width (ColorColumn).
  • Reduces neck strain and improves focus.

Usage

Using Lazy.nvim

return {
  "sand4rt/zen.nvim",
  lazy = false,
  opts = {
    main = {
      width = 148, -- or vim.wo.colorcolumn
    },
    -- TIP: find a buffer's filetype with :lua print(vim.bo.filetype)
    top = {
      { filetype = "man" },
      { filetype = "help" },
      { filetype = "fugitive" },
    },
    right = {
      min_width = 46,
      { filetype = "copilot-chat" },
      { filetype = "neotest-summary" },
      { filetype = { "dapui_watches", "dapui_scopes", "dapui_stacks", "dapui_breakpoints" } },
    },
    bottom = {
      { filetype = "dap-repl" },
      { filetype = "qf" },
      { filetype = "trouble" },
      { filetype = "noice" }, -- noice opens large notifications in a buffer
    },
    left = {
      min_width = 46,
      { filetype = "fugitiveblame" },
      { filetype = "fyler" },
      { filetype = "neotree" },
      { filetype = "dbui" },
      { filetype = { "undotree", "diff" } },
    },
  },
}

Credits to other plugins for inspiration

About

Centers the main buffer to reduce neck strain and improve focus.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages