• Stars
    star
    387
  • Rank 110,416 (Top 3 %)
  • Language
    Lua
  • Created over 2 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Revolutionize Your Neovim Tab Workflow: Introducing Enhanced Tab Scoping!

Scope.nvim

πŸ”– About

Revolutionize Your Neovim Tab Workflow: Introducing Enhanced Tab Scoping!

Elevate your Neovim tab game with our cutting-edge plugin. Bye-bye cluttered tabs, hello streamlined efficiency!

This plugin revolutionizes tab management by introducing scoped buffers. Seamlessly navigate through buffers within each tab using commands like :bnext and :bprev. No more buffer chaos!

Experience the power of scoped buffers, boost productivity, and reclaim your editing flow.

scope

πŸ“¦ Installation

Upgrade your Neovim tabs now with your favorite package manager!

Lazy

{ "tiagovla/scope.nvim" }

packer

use("tiagovla/scope.nvim")

vim-plug

Plug "tiagovla/scope.nvim"

βš™οΈ Configuration

-- init.lua
require("scope").setup({})

πŸš€ Extensions

πŸ”­ Telescope

Extension to show all buffers from all tabs.

πŸ”Œ Setup

-- init.lua
    require("telescope").load_extension("scope")

πŸ“’ Commands

:Telescope scope buffers

πŸ’Ύ Session Support (Experimental)

Extension to allow the usage of the plugin with session managers.

πŸ”Œ Setup

-- init.lua
vim.opt.sessionoptions = { -- required
    "buffers",
    "tabpages",
    "globals",
}
require("scope").setup({})

βš™ Session Manager Configurations

πŸ“Œ Nvim-Possession

{
    "gennaro-tedesco/nvim-possession",
    lazy = false,
    dependencies = {
        {
            "tiagovla/scope.nvim",
            lazy = false,
            config = true,
        },
    },
    config = function()
        require("nvim-possession").setup({
            autoload = true,
            autoswitch = {
                enable = true,
            },
            save_hook = function()
                vim.cmd([[ScopeSaveState]]) -- Scope.nvim saving
            end,
            post_hook = function()
                vim.cmd([[ScopeLoadState]]) -- Scope.nvim loading
            end,
        })
    end,
},

πŸ“’ Commands

Commands Description
:ScopeLoadState load the plugin's state as a global variable from a session file
:ScopeSaveState save the plugin's state as a global variable in a session file

Additionally, the API endpoints require("scope.session").serialize_state() and require("scope.session").deserialize_state(state) are available in case the user prefers to handle the state manually.

πŸ”₯ Contributing

Pull requests from contributors are warmly welcome. To ensure the highest quality, please remember to carefully review the formatting using stylua.