{"id":13895597,"url":"https://github.com/kensyo/nvim-scrlbkun","last_synced_at":"2025-07-17T11:31:46.523Z","repository":{"id":43199542,"uuid":"508922657","full_name":"kensyo/nvim-scrlbkun","owner":"kensyo","description":"A scrollbar plugin for Neovim which can show cursor, search results, githunks, and diagnostics.","archived":false,"fork":false,"pushed_at":"2025-03-08T09:40:51.000Z","size":91,"stargazers_count":21,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-08T10:27:02.526Z","etag":null,"topics":["neovim","neovim-lua-plugin","neovim-plugin","scrollbar"],"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/kensyo.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}},"created_at":"2022-06-30T03:39:02.000Z","updated_at":"2025-03-08T09:40:37.000Z","dependencies_parsed_at":"2023-01-21T10:15:12.172Z","dependency_job_id":null,"html_url":"https://github.com/kensyo/nvim-scrlbkun","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/kensyo/nvim-scrlbkun","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kensyo%2Fnvim-scrlbkun","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kensyo%2Fnvim-scrlbkun/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kensyo%2Fnvim-scrlbkun/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kensyo%2Fnvim-scrlbkun/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kensyo","download_url":"https://codeload.github.com/kensyo/nvim-scrlbkun/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kensyo%2Fnvim-scrlbkun/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265600596,"owners_count":23795722,"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":["neovim","neovim-lua-plugin","neovim-plugin","scrollbar"],"created_at":"2024-08-06T18:02:19.930Z","updated_at":"2025-07-17T11:31:46.510Z","avatar_url":"https://github.com/kensyo.png","language":"Lua","funding_links":[],"categories":["Lua"],"sub_categories":[],"readme":"# scrlbkun\n\nA scrollbar plugin for Neovim.\n\n## Overview\n\nscrlbkun enables Neovim to display the following components\nat the right edge of windows.\n\n* Scrollbar\n* Scrollbar for folded parts\n* Cursor position\n* Positions of matched terms in the search mode\n(the `'hlsearch'` option must be on)\n* Positions of diagnostics results\n* Positions of git hunks (requires [gitsigns](https://github.com/lewis6991/gitsigns.nvim))\n\nOther features are\n\n* A scrollbar will automatically hide after several seconds\n(with the default setting, after two seconds).\n* Display areas of components can be\ndistributed across multiple columns.\n\nVim is not supported. It is available only to Neovim.\n\n## Preview\n\n![scrlbkun_preview1](https://user-images.githubusercontent.com/9912146/177551550-b4f8c112-1dc5-4fa5-b9eb-1b6fcfd8bf51.gif)\n\nMulti columns\n![multirows_preview](https://user-images.githubusercontent.com/9912146/179189284-ec10603e-a863-49c2-88db-2b2171f30d56.png)\n\n## Requirements\n\nscrlbkun requires Neovim \u003e= 0.7.0\n\nSwitch `'hlsearch'` on to display search results\n\n```vim\n:set hlsearch\n```\n\nInstall and set up [gitsigns](https://github.com/lewis6991/gitsigns.nvim) to\ndisplay githunks.\n\n## Installation\n\nYou can install the plugin in any way you like, just like any other plugin.\n\nFor example, if you use [vim-plug](https://github.com/junegunn/vim-plug),\n\n```vim\nPlug 'kensyo/nvim-scrlbkun'\n```\n\n## Setup\n\nInvoke a setup function.\n\n```lua\n-- use the default configuration\nrequire('scrlbkun').setup()\n```  \n\nIf you use your own configuration,\npass a configuration table to the setup funciton\n like\n\n```lua\nrequire('scrlbkun').setup({\n    single_window = false,\n    cursor = {\n        enable = false\n    }\n})\n```\n\n## Configuration\n\nThe default configuration is as follows.\n\n```lua\n{\n    -- If you want to display scrollbars on multiple windows, set to false.\n    -- If set to true, a display area comes out only on the current window.\n    single_window = true,\n\n    -- zindex of display areas.\n    zindex = 10,\n\n    -- winblend of display areas.\n    winblend = 40,\n\n    -- On these filetypes, scrollbars don't come out.\n    excluded_filetypes = {\"NvimTree\"},\n\n    -- On these buftypes, scrollbars don't come out.\n    excluded_buftypes = {\"prompt\"},\n\n    -- Time until a display area is hidden. Specify in milliseconds.\n    -- If set to 0, a display area isn't hidden over time.\n    fadeout_time = 2000,\n\n    -- The number of columns for display areas of components\n    width = 3,\n\n    -- bar component\n    bar = {\n        -- If set to true, the bar component is enabled.\n        enable = true,\n\n        -- The component is drawn at these events.\n        -- The specification {event_name, patterns} can also be used.\n        -- For example { \"CmdlineLeave\", {\"/\", \"\\\\?\", \":\"} } is ok.\n        draw_events = {\"WinScrolled\", \"BufEnter\", \"FocusGained\"},\n\n        -- The component is drawn on all the windows in the current tabpage\n        -- at these events. But if single_window is set to true, draw_events_tab\n        -- is treated exactly the same as draw_events.\n        -- As with draw_events, the specification {event_name, patterns}\n        -- can also be used.\n        draw_events_tab = {\"VimResized\", \"TabEnter\"},\n\n        -- When components overlap, the one with the higher priority is drawn.\n        -- Specify by positive integer.\n        priority = 100,\n\n        -- What number, counting from the left, of the columns allocated\n        -- by the `width` field should be used to display the component.\n        -- Specify in an array between 1 and `width`.\n        draw_columns = {1, 2, 3},\n\n        -- A sign for a scrollbar. It is recommended not to change it from\n        -- the default empty symbol.\n        sign = \" \",\n\n    },\n\n    -- bar component for folded parts\n    bar_fold = {\n        -- The same as those of the bar component\n        enable = true,\n        draw_events = {\"WinScrolled\", \"BufEnter\", \"FocusGained\"},\n        draw_events_tab = {\"VimResized\", \"TabEnter\"},\n        priority = 150,\n        draw_columns = {1, 2, 3},\n        sign = \" \",\n\n    },\n\n    -- cursor component\n    cursor = {\n        -- The same as those of the bar component\n        enable = true,\n        draw_events = {\"BufEnter\", \"FocusGained\", \"CursorMoved\"},\n        draw_events_tab = {\"VimResized\", \"TabEnter\"},\n        priority = 200,\n        draw_columns = {1, 2, 3},\n\n        -- Signs for a cursor. Specify in array. If you specify an array of n-elements,\n        -- then the sign to be used is determined in n more levels depending on the\n        -- cursor position.\n        signs = {\n            \"▔\",\n            \"━\",\n            \"▁\",\n        },\n\n        -- How to determin the sign to be used. \"skip_first\" or \"normal\"\n        sign_arrangement = \"skip_first\"\n    },\n\n    -- search component\n    search = {\n        -- The same as those of the bar component\n        enable = true,\n        draw_events = {},\n        draw_events_tab = {\n            \"TextChanged\",\n            \"TextChangedI\",\n            \"TextChangedP\",\n            \"TabEnter\",\n            {\n                \"CmdlineLeave\",\n                {\"/\", \"\\\\?\", \":\"}\n            },\n            {\n                \"CmdlineChanged\",\n                {\"/\", \"\\\\?\"}\n            },\n        },\n        priority = 500\n        draw_columns = {1},\n\n        -- Signs for search results.\n        -- If you specify an array of n-elements,\n        -- then the sign to be used is determined in n more levels depending\n        -- on the number of matched terms\n        signs = {\n            \".\",\n            \":\",\n        },\n\n        -- If set to true, the 'signs' field is ignored and the plugin uses\n        -- symbols and an algorithm that allow for just a little more detailed\n        -- drawing.\n        use_built_in_signs = true,\n    },\n\n    -- diagnostics component\n    diagnostics = {\n        -- The same as those of the bar component\n        enable = true,\n        draw_events = {},\n        draw_events_tab = {\"BufEnter\", \"DiagnosticChanged\", \"TabEnter\"},\n        priority = 400,\n        draw_columns = {2},\n\n        -- Signs for diagnostics. \n        signs = {\n            -- If you specify an array of n-elements,\n            -- then the sign to be used is determined in n more levels depending\n            -- on the number of errors {warns, infos, hints}.\n            ERROR = {\".\", \":\"},\n            WARN = {\".\", \":\"},\n            INFO = {\".\", \":\"},\n            HINT = {\".\", \":\"},\n        },\n\n        -- The same as that of the search component\n        use_built_in_signs = true,\n    }\n\n    -- githunks component\n    githunks = {\n        -- The same as those of the bar component\n        enable = true,\n        draw_events = {},\n        draw_events_tab = {\n            {\n                \"User\",\n                \"GitSignsUpdate\"\n            }\n        },\n        priority = 300,\n        draw_columns = {3},\n\n        -- Signs for githunks. \n        signs = {\n            -- If you specify an array of n-elements,\n            -- then the sign to be used is determined in n more levels depending\n            -- on add {delete, change}-hunks length\n            add = {\"│\"},\n            delete = {\"▸\"},\n            change = {\"│\"},\n        },\n\n        -- The same as that of the search component\n        use_built_in_signs = true,\n    },\n}\n```\n\n## Highlighting\n\nYou can configure the following highlights.\n\n* `ScrlbkunBar`\n* `ScrlbkunBarFold`\n* `ScrlbkunCursor`\n* `ScrlbkunSearch`\n* `ScrlbkunDiagnosticsError`\n* `ScrlbkunDiagnosticsWarn`\n* `ScrlbkunDiagnosticsInfo`\n* `ScrlbkunDiagnosticsHint`\n* `ScrlbkunGithunksAdd`\n* `ScrlbkunGithunksDelete`\n* `ScrlbkunGithunksChange`\n\n## Functions\n\nLua functions to switch between enable and disable are provided.\n\n```lua\n-- For enabling\nrequire('scrlbkun.components').enable_all()\n\nrequire('scrlbkun.components.bar'):enable()\nrequire('scrlbkun.components.bar_fold'):enable()\nrequire('scrlbkun.components.cursor'):enable()\nrequire('scrlbkun.components.search'):enable()\nrequire('scrlbkun.components.diagnostics'):enable()\nrequire('scrlbkun.components.githunks'):enable()\n\n-- For disabling\nrequire('scrlbkun.components').disable_all()\n\nrequire('scrlbkun.components.bar'):disable()\nrequire('scrlbkun.components.bar_fold'):disable()\nrequire('scrlbkun.components.cursor'):disable()\nrequire('scrlbkun.components.search'):disable()\nrequire('scrlbkun.components.diagnostics'):disable()\nrequire('scrlbkun.components.githunks'):disable()\n```\n\n## Similar Plugins\n\n* [satellite.nvim](https://github.com/lewis6991/satellite.nvim)\n* [scrollbar.nvim](https://github.com/Xuyuanp/scrollbar.nvim)\n* [nvim-scrollbar](https://github.com/petertriho/nvim-scrollbar)\n\nThey are helpful for implementing this plugin, too.\n\n## LICENSE\n\nThe MIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkensyo%2Fnvim-scrlbkun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkensyo%2Fnvim-scrlbkun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkensyo%2Fnvim-scrlbkun/lists"}