{"id":42608299,"url":"https://github.com/zaucy/multibuffer.nvim","last_synced_at":"2026-01-29T02:17:12.684Z","repository":{"id":294140540,"uuid":"986023751","full_name":"zaucy/multibuffer.nvim","owner":"zaucy","description":"Multibuffer API for Neovim","archived":false,"fork":false,"pushed_at":"2025-11-29T20:35:51.000Z","size":51,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-02T01:29:35.096Z","etag":null,"topics":["multibuffer","neovim-plugin"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zaucy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-05-19T01:51:57.000Z","updated_at":"2025-08-29T21:44:06.000Z","dependencies_parsed_at":"2025-08-24T23:03:32.447Z","dependency_job_id":"fe640ff5-c62b-4937-a427-a49a23761b02","html_url":"https://github.com/zaucy/multibuffer.nvim","commit_stats":null,"previous_names":["zaucy/multibuffer.nvim"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zaucy/multibuffer.nvim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaucy%2Fmultibuffer.nvim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaucy%2Fmultibuffer.nvim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaucy%2Fmultibuffer.nvim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaucy%2Fmultibuffer.nvim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zaucy","download_url":"https://codeload.github.com/zaucy/multibuffer.nvim/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zaucy%2Fmultibuffer.nvim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28860683,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T22:56:21.783Z","status":"online","status_checked_at":"2026-01-29T02:00:06.714Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["multibuffer","neovim-plugin"],"created_at":"2026-01-29T02:17:11.247Z","updated_at":"2026-01-29T02:17:12.671Z","avatar_url":"https://github.com/zaucy.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Multibuffers in Neovim\n\nExperimental multibuffers API for neovim. Expect breaking changes and some instability. This repository aims to be strictly an API for creating and managing multibuffers. What is a multibuffer? A multibuffer is a single buffer that contains editable regions of other buffers.\n\nStrategy:\n\n* `multibuffer://` schema for buffer name\n* reads and writes handled through `BufReadCmd` and `BufWriteCmd`\n* customizable virtual text above each section in multibuffer to denote what buffer region is below\n* line numbers of each region through signcolumn\n\nAPI:\n\n* creating a multibuffer\n* adding regular buffer(s) to a multibuffer\n* customizing virtual text above regions\n* getting real buffer and real row/column from line number in multibuffer\n\n## Get Started\n\nThis plugin comes with **no defaults** you will need to use another plugin or write your own integrations to use `multibuffer.nvim`.\n\nUsing lazy\n\n```lua\n{\n\t\"zaucy/multibuffer.nvim\",\n\topts = {\n\t\t-- optional list of keymaps for all multibuffers\n\t\tkeymaps = {},\n\t},\n}\n```\n\n## Multibuffer Plugins\n\n... TODO ...\n\n## Some recommendations\n\n`\u003ccr\u003e` to go to source line in multibuffer\n\n```lua\nkeymaps = {\n\t-- ...\n\t{ \"n\", \"\u003ccr\u003e\", function()\n\t\tlocal multibuffer = require('multibuffer')\n\t\tlocal multibuf = vim.api.nvim_get_current_buf()\n\t\tlocal cursor = vim.api.nvim_win_get_cursor(0)\n\t\tlocal buf, line = multibuffer.multibuf_get_buf_at_line(multibuf, cursor[1])\n\t\tif buf then\n\t\t\tvim.api.nvim_set_current_buf(buf)\n\t\t\tvim.api.nvim_win_set_cursor(0, { line, cursor[2] })\n\t\tend\n\tend },\n}\n```\n\nTurn off line numbers in multibufs. Mulibuffers use the signcolumn to show the source line numbers and showing both line numbers can look confusing.\n\n```lua\nvim.api.nvim_create_autocmd(\"BufWinEnter\", {\n\tpattern = \"multibuffer://*\",\n\tcallback = function(args)\n\t\tlocal winid = vim.api.nvim_get_current_win()\n\t\t-- no multibuffer line numbers\n\t\tvim.api.nvim_set_option_value(\"number\", false, { scope = \"local\", win = winid })\n\t\tvim.api.nvim_set_option_value(\"relativenumber\", false, { scope = \"local\", win = winid })\n\n\t\t-- leave some room for multibuf line number signcolumn\n\t\tvim.api.nvim_set_option_value(\"signcolumn\", \"yes:3\", { scope = \"local\", win = winid })\n\tend,\n})\n```\n\n`\u003cC-a\u003e` in [telescope](https://github.com/nvim-telescope/telescope.nvim) to open multibuf of results\n\n```lua\nmappings = {\n\ti = {\n\t\t[\"\u003cC-a\u003e\"] = function(prompt_bufnr)\n\t\t\tlocal actions = require(\"telescope.actions\")\n\t\t\tlocal action_state = require(\"telescope.actions.state\")\n\t\t\tlocal multibuffer = require(\"multibuffer\")\n\t\t\tlocal picker = action_state.get_current_picker(prompt_bufnr)\n\t\t\tlocal selections = {}\n\t\t\tfor entry in picker.manager:iter() do\n\t\t\t\tlocal bufnr = entry.bufnr\n\t\t\t\tif bufnr == nil then\n\t\t\t\t\tbufnr = vim.fn.bufadd(entry.filename)\n\t\t\t\t\tvim.fn.bufload(bufnr)\n\t\t\t\tend\n\t\t\t\ttable.insert(selections, {\n\t\t\t\t\tfilename = entry.filename,\n\t\t\t\t\tbufnr = bufnr,\n\t\t\t\t\tstart_row = (entry.lnum or 1) - 1,\n\t\t\t\t})\n\t\t\tend\n\t\t\tactions.close(prompt_bufnr)\n\n\t\t\tlocal multibuf = multibuffer.create_multibuf()\n\t\t\t--- @type table\u003cnumber, MultibufAddBufOptions\u003e\n\t\t\tlocal add_opts_by_buf = {}\n\t\t\tfor _, selection in ipairs(selections) do\n\t\t\t\tif add_opts_by_buf[selection.bufnr] == nil then\n\t\t\t\t\tadd_opts_by_buf[selection.bufnr] = {\n\t\t\t\t\t\tbuf = selection.bufnr,\n\t\t\t\t\t\tregions = {},\n\t\t\t\t\t}\n\t\t\t\tend\n\t\t\t\ttable.insert(add_opts_by_buf[selection.bufnr].regions, {\n\t\t\t\t\tstart_row = selection.start_row - telescope_multibuffer_expand,\n\t\t\t\t\tend_row = selection.start_row + telescope_multibuffer_expand,\n\t\t\t\t})\n\t\t\tend\n\t\t\t--- @type MultibufAddBufOptions[]\n\t\t\tlocal add_buf_opts = {}\n\t\t\tfor _, add_opts in pairs(add_opts_by_buf) do\n\t\t\t\ttable.insert(add_buf_opts, add_opts)\n\t\t\tend\n\t\t\tmultibuffer.multibuf_add_bufs(multibuf, add_buf_opts)\n\t\t\tmultibuffer.win_set_multibuf(0, multibuf)\n\t\tend,\n\t}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzaucy%2Fmultibuffer.nvim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzaucy%2Fmultibuffer.nvim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzaucy%2Fmultibuffer.nvim/lists"}