{"id":13682272,"url":"https://github.com/s1n7ax/nvim-window-picker","last_synced_at":"2025-09-28T20:32:09.556Z","repository":{"id":39631647,"uuid":"410375704","full_name":"s1n7ax/nvim-window-picker","owner":"s1n7ax","description":"This plugins prompts the user to pick a window and returns the window id of the picked window","archived":false,"fork":false,"pushed_at":"2024-04-22T01:58:23.000Z","size":108,"stargazers_count":303,"open_issues_count":9,"forks_count":25,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-08-02T13:33:53.839Z","etag":null,"topics":["neovim","neovim-lua","neovim-lua-plugin","neovim-plugin","neovim-plugins"],"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/s1n7ax.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2021-09-25T20:30:24.000Z","updated_at":"2024-07-31T02:33:50.000Z","dependencies_parsed_at":"2024-08-02T13:21:54.588Z","dependency_job_id":"0fb1ae15-6eae-4159-855a-4dadcca49a75","html_url":"https://github.com/s1n7ax/nvim-window-picker","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s1n7ax%2Fnvim-window-picker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s1n7ax%2Fnvim-window-picker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s1n7ax%2Fnvim-window-picker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s1n7ax%2Fnvim-window-picker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/s1n7ax","download_url":"https://codeload.github.com/s1n7ax/nvim-window-picker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224201920,"owners_count":17272666,"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","neovim-lua-plugin","neovim-plugin","neovim-plugins"],"created_at":"2024-08-02T13:01:43.291Z","updated_at":"2025-09-28T20:32:04.507Z","avatar_url":"https://github.com/s1n7ax.png","language":"Lua","funding_links":[],"categories":["Lua"],"sub_categories":[],"readme":"# nvim-window-picker\n\n`hint = 'floating-big-letter'`\n\nhttps://github.com/s1n7ax/nvim-window-picker/assets/18459807/8a6a57e2-8be0-4385-88a9-f49c6a088627\n\n`hint = 'statusline-winbar'`\n\nhttps://github.com/s1n7ax/nvim-window-picker/assets/18459807/8d9a790b-cbcb-455d-8d74-97c55b3cc9b0\n\nThis plugins prompts the user to pick a window and returns the window id of the\npicked window.\n\n## Install\n\n### lazy\n\n```lua\n{\n    's1n7ax/nvim-window-picker',\n    name = 'window-picker',\n    event = 'VeryLazy',\n    version = '2.*',\n    config = function()\n        require'window-picker'.setup()\n    end,\n}\n```\n\n### packer\n\n```lua\nuse {\n    's1n7ax/nvim-window-picker',\n    tag = 'v2.*',\n    config = function()\n        require'window-picker'.setup()\n    end,\n}\n```\n\n## How to use\n\n```lua\nlocal picked_window_id = require('window-picker').pick_window()\n```\n\nYou can put the picked window id to good use\n\n## Configuration\n\nIf you want to have custom properties just for one time, you can pass any of\nfollowing directly to `pick_window()` function itself to override the default\nbehaviour.\n\n```lua\nrequire 'window-picker'.setup({\n    -- type of hints you want to get\n    -- following types are supported\n    -- 'statusline-winbar' | 'floating-big-letter' | 'floating-letter'\n    -- 'statusline-winbar' draw on 'statusline' if possible, if not 'winbar' will be\n    -- 'floating-big-letter' draw big letter on a floating window\n    -- 'floating-letter' draw letter on a floating window\n    -- used\n    hint = 'statusline-winbar',\n\n    -- when you go to window selection mode, status bar will show one of\n    -- following letters on them so you can use that letter to select the window\n    selection_chars = 'FJDKSLA;CMRUEIWOQP',\n\n    -- This section contains picker specific configurations\n    picker_config = {\n        -- whether should select window by clicking left mouse button on it\n        handle_mouse_click = false,\n        statusline_winbar_picker = {\n            -- You can change the display string in status bar.\n            -- It supports '%' printf style. Such as `return char .. ': %f'` to display\n            -- buffer file path. See :h 'stl' for details.\n            selection_display = function(char, windowid)\n                return '%=' .. char .. '%='\n            end,\n\n            -- whether you want to use winbar instead of the statusline\n            -- \"always\" means to always use winbar,\n            -- \"never\" means to never use winbar\n            -- \"smart\" means to use winbar if cmdheight=0 and statusline if cmdheight \u003e 0\n            use_winbar = 'never', -- \"always\" | \"never\" | \"smart\"\n        },\n\n        floating_big_letter = {\n            -- window picker plugin provides bunch of big letter fonts\n            -- fonts will be lazy loaded as they are being requested\n            -- additionally, user can pass in a table of fonts in to font\n            -- property to use instead\n\n            font = 'ansi-shadow', -- ansi-shadow |\n        },\n    },\n\n    -- whether to show 'Pick window:' prompt\n    show_prompt = true,\n\n    -- prompt message to show to get the user input\n    prompt_message = 'Pick window: ',\n\n    -- if you want to manually filter out the windows, pass in a function that\n    -- takes two parameters. You should return window ids that should be\n    -- included in the selection\n    -- EX:-\n    -- function(window_ids, filters)\n    --    -- folder the window_ids\n    --    -- return only the ones you want to include\n    --    return {1000, 1001}\n    -- end\n    filter_func = nil,\n\n    -- following filters are only applied when you are using the default filter\n    -- defined by this plugin. If you pass in a function to \"filter_func\"\n    -- property, you are on your own\n    filter_rules = {\n        -- when there is only one window available to pick from, use that window\n        -- without prompting the user to select\n        autoselect_one = true,\n\n        -- whether you want to include the window you are currently on to window\n        -- selection or not\n        include_current_win = false,\n\n        -- whether to include windows marked as unfocusable\n        include_unfocusable_windows = false,\n\n        -- filter using buffer options\n        bo = {\n            -- if the file type is one of following, the window will be ignored\n            filetype = { 'NvimTree', 'neo-tree', 'notify', 'snacks_notif' },\n\n            -- if the file type is one of following, the window will be ignored\n            buftype = { 'terminal' },\n        },\n\n        -- filter using window options\n        wo = {},\n\n        -- if the file path contains one of following names, the window\n        -- will be ignored\n        file_path_contains = {},\n\n        -- if the file name contains one of following names, the window will be\n        -- ignored\n        file_name_contains = {},\n    },\n\n    -- You can pass in the highlight name or a table of content to set as\n    -- highlight\n    highlights = {\n        enabled = true,\n        statusline = {\n            focused = {\n                fg = '#ededed',\n                bg = '#e35e4f',\n                bold = true,\n            },\n            unfocused = {\n                fg = '#ededed',\n                bg = '#44cc41',\n                bold = true,\n            },\n        },\n        winbar = {\n            focused = {\n                fg = '#ededed',\n                bg = '#e35e4f',\n                bold = true,\n            },\n            unfocused = {\n                fg = '#ededed',\n                bg = '#44cc41',\n                bold = true,\n            },\n        },\n    },\n})\n```\n\n```lua\nrequire('window-picker').pick_window({\n    hint = 'floating-big-letter'\n})\n```\n\n## Theming\n\nIf you just want to define the colors using Neovim Highlights, then it's totally\npossible. You can set following highlights manually.\n\n- `WindowPickerStatusLine` (currently focused window statusline highlights)\n- `WindowPickerStatusLineNC` (currently unfocused window statusline highlights)\n- `WindowPickerWinBar` (currently focused window winbar highlights)\n- `WindowPickerWinBarNC` (currently unfocused window winbar highlights)\n\n## Breaking changes in v2.0.0\n\n_Before_: return value from `selection_display` will be wrapped by `'%='` and\n`'%='` to fill the empty space of status line or winbar.\n\n_After_: return value of `selection_display` will be passed directly to the\nstatus line or winbar. This allows all the customizations available from\nstatusline syntax. You can check `:help statusline` for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs1n7ax%2Fnvim-window-picker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fs1n7ax%2Fnvim-window-picker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs1n7ax%2Fnvim-window-picker/lists"}