Giter VIP home page Giter VIP logo

maximize.nvim's Introduction

maximize.nvim

Maximize Neovim windows.

โœจ Features

  • Toggle maximizing the current window without any ugly borders.
  • Has builtin integration for the following plugins:
    • aerial.nvim
    • nvim-dap-ui
    • nvim-tree.lua

๐Ÿ› ๏ธ Requirements

  • Neovim >= 0.8.0 (use a tagged version for older Neovim versions)

๐Ÿ“ฆ Installation

Install with your favourite plugin manager and run the setup function.

Packer

use {
  'declancm/maximize.nvim',
  config = function() require('maximize').setup() end
}

Lazy

use {
  'declancm/maximize.nvim',
  config = true
}

โ„น๏ธ Usage

Vim Commands

  • Toggle maximizing the current window:

    :Maximize

Lua API

  • Toggle maximizing the current window:

    require('maximize').toggle()

  • Maximize the current window:

    require('maximize').maximize()

  • Restore windows:

    require('maximize').restore()

โš™๏ธ Configuration

A settings table can be passed into the setup function for custom options.

Default Options

{
  plugins = {
    aerial = { enable = true }, -- enable aerial.nvim integration
    dapui = { enable = true },  -- enable nvim-dap-ui integration
    tree = { enable = true },   -- enable nvim-tree.lua integration
  }
}

๐Ÿ“… User Events

The following user events are triggered:

  • WindowMaximizeStart: before maximizing
  • WindowRestoreEnd: after restoring

๐Ÿšฅ statusline & winbar

Use the variable vim.t.maximized to check whether the tab has a maximized window.

Lualine

local function maximize_status()
  return vim.t.maximized and ' ๏‹  ' or ''
end

require('lualine').setup {
  sections = {
    lualine_c = { maximize_status }
  }
}

winbar

-- ~/.config/nvim/lua/winbar.lua
local M = {}

M.maximize_status = function()
  return vim.t.maximized and ' ๏‹  ' or ''
end

return M

-- ~/.config/nvim/init.lua
vim.o.winbar = "%{%v:lua.require('winbar').maximize_status()%}"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.