{"id":13600411,"url":"https://github.com/weilbith/nvim-floating-tag-preview","last_synced_at":"2026-01-18T00:55:00.829Z","repository":{"id":49086004,"uuid":"371523936","full_name":"weilbith/nvim-floating-tag-preview","owner":"weilbith","description":"Preview tags in a floating window","archived":false,"fork":false,"pushed_at":"2024-01-05T09:44:32.000Z","size":33,"stargazers_count":24,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-06T09:10:28.638Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/weilbith.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":"2021-05-27T23:00:55.000Z","updated_at":"2024-08-31T12:09:58.000Z","dependencies_parsed_at":"2024-11-07T03:33:09.325Z","dependency_job_id":"830af63b-eda5-44bd-b50e-0cce942241cf","html_url":"https://github.com/weilbith/nvim-floating-tag-preview","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/weilbith%2Fnvim-floating-tag-preview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weilbith%2Fnvim-floating-tag-preview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weilbith%2Fnvim-floating-tag-preview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weilbith%2Fnvim-floating-tag-preview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weilbith","download_url":"https://codeload.github.com/weilbith/nvim-floating-tag-preview/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248322259,"owners_count":21084334,"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-08-01T18:00:38.582Z","updated_at":"2026-01-18T00:55:00.772Z","avatar_url":"https://github.com/weilbith.png","language":"Lua","funding_links":[],"categories":["Lua","Other Standard Feature Enhancement"],"sub_categories":["Tags"],"readme":"# NeoVim Floating Tag Preview\n\nThis plugin allows to easily preview tags in a floating window close to the\ncursor. It aims to work as a mostly invisible extension to the native preview\nfunctionality. In fact it tries to fill the gap of a still [missing\n`previewwindowfunc` option](https://github.com/neovim/neovim/issues/12859). At\nits core, it just opens a floating window before the native tag command gets\nexecuted. Because the native commands search first for an already existing\npreview window, they just pick up this window.\n\nAdditionally it provides some minor additions to improve the preview\nfunctionality. Such include to automatically close the window on cursor\nmovement, open folds in the preview and apply highlight to the tag word. All\nfeatures are quite generic, so they can be disabled individually but also\ncan be also completely customized.\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [Customization](#customization)\n- [Language Server Protocol Integration](#language-server-protocol-integration)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/12543647/119907993-dc0c9380-bf51-11eb-8c1c-ae7793803a9b.GIF\" alt=\"Demo GIF\" width=\"500px\" /\u003e\n\u003c/p\u003e\n\n---\n\n\n## Installation\n\nUse your favorite plugin manager to install the plugin or use it as [plain\npackage](https://neovim.io/doc/user/repeat.html#packages). The following\nexample uses [packer.nvim](https://github.com/wbthomason/packer.nvim) with some\nlazy loading:\n\n```vim\nlua require('packer').use({\n      \\   'weilbith/nvim-floating-tag-preview',\n      \\   cmd = {'Ptag', 'Ptselect', 'Ptjump', 'Psearch', 'Pedit' },\n      \\ })\n```\n\n\n## Usage\n\nUnfortunately is is not possible to overwrite native commands. As a\ncompromise, this plugin clones all tag preview related commands with an upper\ncase `P` version (e.g. `Ptag`, `Ptnext`, `Psearch`, ...). Native mappings\n(e.g. `\u003cC-W\u003e}`) get automatically overwritten to use the floating versions\n(can be disabled). Commands or mappings to focus (`\u003cC-W\u003eP`) or close\n(`\u003cC-W\u003ez`) the preview window manually just work as always. When the cursor\nmoves, the window closes automatically again. While continue to preview\ndifferent tags (or just see the different locations), the same window gets\nre-used and remains the same.\n\nTo preview a simple tag just execute `:Ptag \u003ctag-name\u003e` or type `\u003cC-W\u003e}` to\npreview the word under the cursor. To cycle through the different definitions,\nuse `:Ptnext`, `Ptprevious` and friends. But also `:Psearch` might be an\ninteresting entrypoint.\n\nYou can run the plugin's health check to verify that NeoVim version supports\nall necessary features (`:checkhealth floating_tag_preview`). Mind that this\ndoes not work if you load the plugin in a lazy manner.\n\n\n## Customization\n\nCheckout [the\ndocs](https://github.com/weilbith/nvim-floating-tag-preview/blob/master/doc/floating_tag_preview.txt)\n(`:help floating_tag_preview.txt`) to get further details on how to customize\neach single part of the plugin.\n\n## Language Server Protocol Integration\n\nTags might be an ancient or event obsolete feature of Vim/NeoVim. If you prefer\nto use the data of a language server instead, consider to use\n[nvim-lsp-smag](https://github.com/weilbith/nvim-lsp-smag). It makes LSP\nlocations like definitions, declaration, implementation etc. just work as tags.\nUsing both plugins in combination you can easily preview the definition of a\ncode object (e.g. a function or class) under the cursor. Cycling through the\npreviews will show you the definition, implementation etc. (depending on the\nconfiguration). In fact, the demo GIF at the top is using this plugin in\nbackground.\n\nThereby this is a minimal plugin which follows a traditional Vim/NeoVim\napproach, but combine it with the most recent advanced features.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweilbith%2Fnvim-floating-tag-preview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweilbith%2Fnvim-floating-tag-preview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweilbith%2Fnvim-floating-tag-preview/lists"}