{"id":13412789,"url":"https://github.com/mfussenegger/nvim-treehopper","last_synced_at":"2025-04-08T10:17:47.405Z","repository":{"id":38028978,"uuid":"376516312","full_name":"mfussenegger/nvim-treehopper","owner":"mfussenegger","description":"Region selection with hints on the AST nodes of a document powered by treesitter","archived":false,"fork":false,"pushed_at":"2024-10-03T14:40:11.000Z","size":22,"stargazers_count":435,"open_issues_count":7,"forks_count":17,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-11-16T19:02:35.385Z","etag":null,"topics":["neovim","neovim-plugin","nvim-treesitter","tree-sitter"],"latest_commit_sha":null,"homepage":"","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/mfussenegger.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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-06-13T10:53:53.000Z","updated_at":"2024-11-07T06:58:52.000Z","dependencies_parsed_at":"2024-01-03T03:31:09.610Z","dependency_job_id":"fa7fc8a9-f9ff-4e62-99dd-21b8ea599057","html_url":"https://github.com/mfussenegger/nvim-treehopper","commit_stats":{"total_commits":21,"total_committers":9,"mean_commits":"2.3333333333333335","dds":0.5238095238095238,"last_synced_commit":"13559079e33665a310d9ccf0e43f4e9bb9f337e2"},"previous_names":["mfussenegger/nvim-ts-hint-textobject"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfussenegger%2Fnvim-treehopper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfussenegger%2Fnvim-treehopper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfussenegger%2Fnvim-treehopper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfussenegger%2Fnvim-treehopper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mfussenegger","download_url":"https://codeload.github.com/mfussenegger/nvim-treehopper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247819940,"owners_count":21001394,"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-plugin","nvim-treesitter","tree-sitter"],"created_at":"2024-07-30T20:01:29.227Z","updated_at":"2025-04-08T10:17:47.380Z","avatar_url":"https://github.com/mfussenegger.png","language":"Lua","readme":"# Treehopper 🐇\n\nSyntax trees + hop = Treehopper\n\nA Plugin that provides region selection using hints on the abstract syntax tree of a document.\n\n![Demo](https://user-images.githubusercontent.com/38700/121786551-b5d92b80-cbc0-11eb-81f4-180e6d4c71e3.gif)\n\n\n## Requirements\n\n- Neovim 0.7.2+\n\nTreehopper operates on syntax trees. It uses tree-sitter to retrieve the tree\nif a parser is available, otherwise it tries to use the built-in LSP client in\nNeovim (using the `selectionRange` functionality).\n\nYou can install tree-sitter parsers either via:\n\n- [nvim-treesitter][4] `TSInstall`\n- Manually: You need to download and compile the language specific parsers\n  using `gcc` and place the object files into `~/.config/nvim/parser`. See\n  http://tree-sitter.github.io/tree-sitter/\n\n\n## Installation\n\n- Install it like any other neovim plugin:\n  - If using [vim-plug][2]: `Plug mfussenegger/nvim-treehopper`\n  - If using [packer.nvim][3]: `use mfussenegger/nvim-treehopper`\n\n\n## Usage\n\n\n### Selecting a region\n\nDefine two mappings:\n\n```\nomap     \u003csilent\u003e m :\u003cC-U\u003elua require('tsht').nodes()\u003cCR\u003e\nxnoremap \u003csilent\u003e m :lua require('tsht').nodes()\u003cCR\u003e\n```\n\nYou can configure which keys are used for hint labels, the first N characters will be taken from the `hint_keys` and then after that it will restart from `a-zA-Z`\n\n```\nrequire(\"tsht\").config.hint_keys = { \"h\", \"j\", \"f\", \"d\", \"n\", \"v\", \"s\", \"l\", \"a\" }\n```\n\n### Moving\n\nMoving depends on [hop.nvim][5]\n\nIf you want to move to the start or end of a syntax node you can use\n`require('tsht').move({ side = \"start\" })`.\n\nThe parameter is optional and defaults to `start`. Use `side = \"end\"` if you\nwant to move to the end of a node.\n\n\n## Credits\n\n- [hop.nvim][5]\n\n\n[1]: https://github.com/neovim/neovim/releases/tag/nightly\n[2]: https://github.com/junegunn/vim-plug\n[3]: https://github.com/wbthomason/packer.nvim\n[4]: https://github.com/nvim-treesitter/nvim-treesitter\n[5]: https://github.com/phaazon/hop.nvim\n","funding_links":[],"categories":["Motion","Lua"],"sub_categories":["Treesitter Based","Tree-sitter Based"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmfussenegger%2Fnvim-treehopper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmfussenegger%2Fnvim-treehopper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmfussenegger%2Fnvim-treehopper/lists"}