xzbdmw / bookmarks-cycle-through.nvim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bookmarks-cycle-through.nvim

This plugin adds a feature to move across buffers to MattesGroeger/vim-bookmarks.

Installation

lazy.nvim

{
  "kdnk/bookmarks-cycle-through.nvim",
  dependencies = {
      "MattesGroeger/vim-bookmarks",
  },
}

Configuration

vim.keymap.set("n", "mm", function()
    require("bookmarks-cycle-through").bookmark_toggle()
end)
vim.keymap.set("n", "]b", function()
    require("bookmarks-cycle-through").cycle_through({ reverse = false })
end)
vim.keymap.set("n", "[b", function()
    require("bookmarks-cycle-through").cycle_through({ reverse = true })
end)

Integration

lualine

local function bookmark_count_or_index()
    return string.format([[📘 %s]], require("bookmarks-cycle-through").bookmark_count_or_index())

    require("lualine").setup({
        sections = {
            lualine_c = {
                { bookmark_count_or_index },
            },
        },
    })
end

About


Languages

Language:Lua 100.0%