{"id":20887960,"url":"https://github.com/canop/nvim-bacon","last_synced_at":"2025-05-12T02:59:47.766Z","repository":{"id":43421645,"uuid":"472467536","full_name":"Canop/nvim-bacon","owner":"Canop","description":"bacon's companion for neovim","archived":false,"fork":false,"pushed_at":"2025-01-20T11:20:34.000Z","size":401,"stargazers_count":59,"open_issues_count":4,"forks_count":6,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-05-12T02:59:41.700Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Canop.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}},"created_at":"2022-03-21T18:41:22.000Z","updated_at":"2025-04-10T02:43:45.000Z","dependencies_parsed_at":"2025-01-20T12:24:21.667Z","dependency_job_id":"3553b810-cde4-4744-9f00-e89b0d80df43","html_url":"https://github.com/Canop/nvim-bacon","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Canop%2Fnvim-bacon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Canop%2Fnvim-bacon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Canop%2Fnvim-bacon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Canop%2Fnvim-bacon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Canop","download_url":"https://codeload.github.com/Canop/nvim-bacon/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253666065,"owners_count":21944620,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-18T08:23:32.655Z","updated_at":"2025-05-12T02:59:47.726Z","avatar_url":"https://github.com/Canop.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nvim-bacon\n\nThis plugin enables viewing the locations found in a `.bacon-locations` file, and jumping to them.\n\n## Installation in Neovim\n\nThis extension may be imported with a standard plugin system.\n\n### [vim-plug](https://github.com/junegunn/vim-plug):\n\n```vim\nPlug 'Canop/nvim-bacon'\n```\n\n### [lazyvim](https://www.lazyvim.org/):\n\nIn eg `lua/config/plugins/bacon.lua`:\n\n```vim\nreturn {\n    -- other plugins\n    {\n        \"Canop/nvim-bacon\",\n        config = function()\n            require(\"bacon\").setup({\n                quickfix = {\n                    enabled = true, -- Enable Quickfix integration\n                    event_trigger = true, -- Trigger QuickFixCmdPost after populating Quickfix list\n                },\n            })\n        end,\n    },\n}\n```\n\n## Bacon configuration\n\nYou must [enable locations export in bacon](https://dystroy.org/bacon/config/#exports).\n\nChange/uncomment the exports part of your prefs.toml file:\n\n```toml\n[exports.locations]\nauto = true\npath = \".bacon-locations\"\nline_format = \"{kind} {path}:{line}:{column} {message}\"\n```\n\n## Usage\n\nYou'll use this plugin in nvim while a bacon instance is running in another panel, probably side to it.\n\nTo navigate among errors and warnings, you'll use either the standard Quickfix feature of your editor or nvim-bacon dedicated commands and view.\n\n### Specialized Commands and View\n\nThe following functions are exposed by the plugin:\n\n| Function         | Usage                                                      |\n| ---------------- | ---------------------------------------------------------- |\n| `:BaconLoad`     | Silently load the locations of the `.bacon-locations` file |\n| `:BaconShow`     | Display the locations in a floating window                 |\n| `:BaconList`     | Does `:BaconLoad` then `:BaconShow`                        |\n| `:BaconPrevious` | Jump to the previous location in the current list          |\n| `:BaconNext`     | Jump to the next location in the current list              |\n\nYou should define at least two shortcuts, for example like this:\n\n```vimscript\nnnoremap ! :BaconLoad\u003cCR\u003e:w\u003cCR\u003e:BaconNext\u003cCR\u003e\nnnoremap , :BaconList\u003cCR\u003e\n```\n\nor, if using lazyVim, in lua/config/keymaps.lua:\n\n```vim\nlocal map = LazyVim.safe_keymap_set\nmap(\"n\", \"!\", \":BaconLoad\u003cCR\u003e:w\u003cCR\u003e:BaconNext\u003cCR\u003e\", { desc = \"Navigate to next bacon location\" })\nmap(\"n\", \",\", \":BaconList\u003cCR\u003e\", { desc = \"Open bacon locations list\" })\n```\n\nThe first shortcut navigates from location to location, without opening the window.\nThis is probably the one you'll use all the time.\nYou may notice it loads the list (`:BaconLoad`) then saves the current document (`:w`), to prevent both race conditions and having a bunch of unsaved buffers.\n\nThe second shortcut, which is mapped to the \u003ckbd\u003e,\u003c/kbd\u003e key, opens the list of all bacon locations:\n\n![list-and-bacon](doc/list-and-bacon.png)\n\nWhen the list is open, you can select a line and hit \u003ckbd\u003eenter\u003c/kbd\u003e or just hit the number of the location if it's in 1-9.\nAs there's no need to wait for the window to appear, you may just type \u003ckbd\u003e,\u003c/kbd\u003e\u003ckbd\u003e3\u003c/kbd\u003e to go to location 3 without opening the window.\n\nYou may define other shortcuts using the various API functions.\n\n### Quickfix Integration\n\nErrors and warnings also populate the [Quicklist](http://neovim.io/doc/user/quickfix.html) list by default.\n\nYou can disable this feature with this configuration:\n\n```lua\nrequire(\"bacon\").setup({\n    quickfix  = {\n         enabled = false, -- true to populate the quickfix list with bacon errors and warnings\n         event_trigger = true, -- triggers the QuickFixCmdPost event after populating the quickfix list\n    }\n)}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcanop%2Fnvim-bacon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcanop%2Fnvim-bacon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcanop%2Fnvim-bacon/lists"}