{"id":15144281,"url":"https://github.com/dmille56/treesit-jump","last_synced_at":"2025-10-23T20:32:14.862Z","repository":{"id":224157355,"uuid":"762582605","full_name":"dmille56/treesit-jump","owner":"dmille56","description":"Jump around your source code in emacs using treesit and avy","archived":false,"fork":false,"pushed_at":"2024-04-29T09:52:15.000Z","size":80,"stargazers_count":39,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-30T21:04:22.031Z","etag":null,"topics":["avy","emacs","gptel","tree-sitter"],"latest_commit_sha":null,"homepage":"","language":"Scheme","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dmille56.png","metadata":{"files":{"readme":"README.org","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":"2024-02-24T05:36:30.000Z","updated_at":"2025-01-11T16:29:46.000Z","dependencies_parsed_at":"2024-03-27T23:31:32.872Z","dependency_job_id":"7cd65273-eebe-4971-b0e5-f1464b1416a9","html_url":"https://github.com/dmille56/treesit-jump","commit_stats":null,"previous_names":["dmille56/treesit-jump"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmille56%2Ftreesit-jump","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmille56%2Ftreesit-jump/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmille56%2Ftreesit-jump/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmille56%2Ftreesit-jump/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmille56","download_url":"https://codeload.github.com/dmille56/treesit-jump/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237886844,"owners_count":19381910,"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":["avy","emacs","gptel","tree-sitter"],"created_at":"2024-09-26T10:40:16.542Z","updated_at":"2025-10-23T20:32:09.509Z","avatar_url":"https://github.com/dmille56.png","language":"Scheme","funding_links":[],"categories":[],"sub_categories":[],"readme":"[[https://github.com/dmille56/treesit-jump/actions/workflows/main.yml/badge.svg]]\n* About\n:PROPERTIES:\n:CUSTOM_ID: about\n:END:\nJump around your source code in emacs using treesit and avy.\n\n* Demos\n:PROPERTIES:\n:CUSTOM_ID: demos\n:END:\n\ntreesit-jump-jump (used to jump to match)\n[[https://i.imgur.com/bYeCHwd.gif]]\n\ntreesit-jump-select (used to select the region of a match)\n[[https://i.imgur.com/Ge5g7pb.gif]]\n\ntreesit-jump-delete (used to delete the region of a match)\n[[https://i.imgur.com/ofIUGTj.gif]]\n\ntreesit-jump-parent-jump (used to jump to a parent of the current node under the cursor)\n[[https://i.imgur.com/2222Jun.gif]]\n\ntreesit-jump-gptel-describe (used to describe the selected region using gptel (chatgpt/ollama/etc.))\n\n* Table of Contents\n:PROPERTIES:\n:TOC:      :include all :ignore (this)\n:END:\n:CONTENTS:\n- [[#about][About]]\n- [[#demos][Demos]]\n- [[#installation][Installation]]\n  - [[#dependencies][Dependencies]]\n  - [[#config][Config]]\n  - [[#extra-config-options][Extra config options]]\n- [[#queries][Queries]]\n- [[#notes][Notes]]\n- [[#special-thanks][Special Thanks]]\n:END:\n\n* Installation\n:PROPERTIES:\n:CUSTOM_ID: installation\n:END:\n** Dependencies\n:PROPERTIES:\n:CUSTOM_ID: dependencies\n:END:\n1. Emacs compiled with treesit support (version 29+)\n2. Installed treesitter grammar (for the language you want to use)\n   - You can use [[https://github.com/renzmann/treesit-auto][treesit-auto]] to install grammars and auto load treesitter language modes.\n3. [[https://github.com/abo-abo/avy][Avy]]\n4. [[https://github.com/magit/transient][Transient]]\n5. [[https://github.com/karthink/gptel][Gptel]] \n \n** Config\n:PROPERTIES:\n:CUSTOM_ID: config\n:END:\n#+BEGIN_SRC emacs-lisp\n(use-package treesit-jump\n  :straight (:host github :repo \"dmille56/treesit-jump\" :files (\"*.el\" \"treesit-queries\"))\n  :config\n  ;; Optional: add some queries to filter out of results (since they can be too cluttered sometimes)\n  (setq treesit-jump-queries-filter-list '(\"inner\" \"test\" \"param\")))\n#+END_SRC\n\n** Extra config options\n:PROPERTIES:\n:CUSTOM_ID: extra-config-options\n:END:\n- Transient for all the functions: treesit-jump-transient\n\n- How to add extra treesit queries per mode:\n#+BEGIN_SRC emacs-lisp\n(add-to-list 'treesit-jump-queries-extra-alist (cons 'powershell-ts-mode '(\"(flow_control_statement (_)) @flow\")))\n(add-to-list 'treesit-jump-queries-extra-alist (cons 'python-ts-mode '(\"(return_statement (_)) @return\")))\n#+END_SRC\n\n- How to add queries to filter out of results per mode:\n#+BEGIN_SRC emacs-lisp\n(add-to-list 'treesit-jump-queries-filter-mode-alist (cons 'python-ts-mode '(\"class\")))\n#+END_SRC\n\n- Function to clear cache (useful if you've added to treesit-queries per node after running treesit-jump functions):\n#+BEGIN_SRC emacs-lisp\ntreesit-jump-queries-clear-cache\n#+END_SRC\n\n- See [[https://github.com/karthink/gptel]] for help configuring gptel queries (in order to configure backend between chatgpt/ollama/etc.)\n\n* Queries\n:PROPERTIES:\n:CUSTOM_ID: queries\n:END:\n\nQueries are defined in treesit-queries directory.  Queries must be defined separately for each language.  List of the query capture types are defined here: [[https://github.com/nvim-treesitter/nvim-treesitter-textobjects?tab=readme-ov-file#built-in-textobjects]].\n\nFor help defining your own queries refer to: [[https://github.com/emacs-mirror/emacs/blob/master/admin/notes/tree-sitter/starter-guide#query-syntax]].  Also recommend the following package for debugging your queries: https://git.sr.ht/~meow_king/ts-query-highlight.\n\n* Notes\n:PROPERTIES:\n:CUSTOM_ID: notes\n:END:\nI've tested that the queries compile for the following languages: Python, C, C++, Java, C#, JavaScript, TypeScript, Go, Rust.\n\n* Special Thanks\n:PROPERTIES:\n:CUSTOM_ID: special-thanks\n:END:\nThis package takes inspiration from [[https://github.com/abo-abo/avy][avy]], and [[https://github.com/meain/evil-textobj-tree-sitter][evil-textobj-tree-sitter]].  Queries (and a bit of code to process them) were taken originally from evil-textobj-tree-sitter.  The code here is licensed under the same license (Apache-2.0). \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmille56%2Ftreesit-jump","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmille56%2Ftreesit-jump","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmille56%2Ftreesit-jump/lists"}