{"id":15144312,"url":"https://github.com/skissue/meow-tree-sitter","last_synced_at":"2025-06-20T16:34:23.570Z","repository":{"id":242276287,"uuid":"809137616","full_name":"skissue/meow-tree-sitter","owner":"skissue","description":"Tree-sitter powered :deciduous_tree: motions for Meow :cat:","archived":false,"fork":false,"pushed_at":"2024-07-01T14:22:49.000Z","size":113,"stargazers_count":21,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-09-27T10:41:12.281Z","etag":null,"topics":["emacs","emacs-lisp","emacs-package","keybindings","modal-editing","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":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/skissue.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-06-01T19:52:44.000Z","updated_at":"2024-09-18T00:10:57.000Z","dependencies_parsed_at":"2024-06-11T14:44:10.390Z","dependency_job_id":"6ad400a4-ea2e-4091-b361-716edda35533","html_url":"https://github.com/skissue/meow-tree-sitter","commit_stats":null,"previous_names":["skissue/meow-tree-sitter"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skissue%2Fmeow-tree-sitter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skissue%2Fmeow-tree-sitter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skissue%2Fmeow-tree-sitter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skissue%2Fmeow-tree-sitter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skissue","download_url":"https://codeload.github.com/skissue/meow-tree-sitter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219867845,"owners_count":16555812,"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":["emacs","emacs-lisp","emacs-package","keybindings","modal-editing","tree-sitter"],"created_at":"2024-09-26T10:40:27.292Z","updated_at":"2025-02-08T23:33:36.953Z","avatar_url":"https://github.com/skissue.png","language":"Scheme","funding_links":[],"categories":[],"sub_categories":[],"readme":"#+title: meow-tree-sitter\n#+author: skissue\n\n[[https://melpa.org/#/meow-tree-sitter][file:https://melpa.org/packages/meow-tree-sitter-badge.svg]]\n[[https://stable.melpa.org/#/meow-tree-sitter][file:https://stable.melpa.org/packages/meow-tree-sitter-badge.svg]]\n\n=meow-tree-sitter= is a package that integrates the ~treesit~ library in Emacs 29+ 🌳 with [[https://github.com/meow-edit/meow][Meow]]'s motions 🐱. Lots of functionality is ported from [[https://github.com/meain/evil-textobj-tree-sitter][evil-textobj-tree-sitter]].\n\n* Contents\n:PROPERTIES:\n:TOC:      :include all :depth 3 :force (nothing) :ignore (this) :local (nothing)\n:END:\n:CONTENTS:\n- [[#status-][Status 📆]]\n- [[#requirements-️][Requirements ⚠️]]\n- [[#installation-][Installation 💾]]\n- [[#quickstart-][Quickstart 💨]]\n- [[#configuration-][Configuration 🔧]]\n  - [[#options-️][Options ⚙️]]\n  - [[#custom-keybinds-️][Custom Keybinds ⌨️]]\n  - [[#custom-queries-][Custom Queries ❓]]\n- [[#license-][License 📜]]\n:END:\n\n* Status 📆\nThis project is in a pretty stable state, and, for the foreseeable future, is feature-complete. As always, issues and pull requests are appreciated ❤️.\n\n* Requirements ⚠️\n+ Emacs 29+ ✍️ with ~treesit~ support 🌳\n+ [[https://github.com/meow-edit/meow][Meow]] 🐱\n\nCurrently, the package only supports the native ~treesit~ library in Emacs 29+. Personally, I have no interest in supporting [[https://github.com/emacs-tree-sitter/elisp-tree-sitter][elisp-tree-sitter]] since I don't use it, but pull requests are welcome 🙃.\n\n* Installation 💾\nThis package is [[https://melpa.org/#/meow-tree-sitter][now on MELPA]] 🎉. Installation should be as simple as any other package if MELPA is configured and set up. See [[https://melpa.org/#/getting-started][MELPA's \"Getting started\"]] if you do not have MELPA installed.\n\nAlternatively, you can install the package manually as usual: clone the repository, add the location to ~load-path~, and then ~(require 'meow-tree-sitter)~. If you have trouble with the =queries/= directory (or want to use a custom queries folder), then customize the value of ~meow-tree-sitter-queries-dir~.\n\n* Quickstart 💨\n#+begin_src elisp\n(add-to-list 'load-path \"/path/to/meow-tree-sitter\")\n(require 'meow-tree-sitter)\n(meow-tree-sitter-register-defaults)\n#+end_src\n\nTree-sitter powered motions should now be accessible through Meow's \"thing\" functionality, namely ~meow-bounds-of-thing~ and ~meow-inner-of-thing~ (bound to period and comma by default).\n\n* Configuration 🔧\n~meow-tree-sitter-register-defaults~ is the easiest way to get started, and will set up the default keybinds. Currently, this adds the following keys to Meow's \"things\":\n+ a :: class\n+ f :: function\n+ t :: test\n+ y :: entry\n+ , :: parameter\n+ / :: comment\n\nNote that if any of these keys are currently being used, they will be *overridden*.\n\n** Options ⚙️\nEvaluate ~(customize-group 'meow-tree-sitter)~ in Emacs to see these options in the Customize interface.\n+ ~meow-tree-sitter-can-expand~ ::\n  Whether repeating a motion will expand an existing selection. Mainly useful for queries for multiple types of nodes. Defaults to ~t~.\n+ ~meow-tree-sitter-can-jump-forward~ ::\n  Whether to jump forward if there is no matching node within the current point/region. Can also be an integer to only jump forward if the next node is that many characters away. Defaults to ~t~.\n+ ~meow-tree-sitter-extra-queries~ ::\n  An alist of extra queries to use by default. Entries in this list override the default set of queries. Useful to support languages that don't have queries by default. Defaults to ~nil~.\n+ ~meow-tree-sitter-major-mode-language-alist~ ::\n  An alist mapping major mode name (sans =-ts-mode= and =-mode= suffix) to tree-sitter language names. Only needed for languages that don't match up by default.\n+ ~meow-tree-sitter-queries-dir~ ::\n  The directory to look for the default set of queries that come with this package. Defaults to the =queries/= subdirectory where the package file is located.\n\n** Custom Keybinds ⌨️\nTo register custom keybinds, use ~meow-tree-sitter-register-thing~. The second argument should be the \"type\" of object to select, which is the first part of the name of a capture; see the [[file:queries/][queries]] for the default capture names.\n#+begin_src elisp\n(meow-tree-sitter-register-thing ?F \"function\")\n(meow-tree-sitter-register-thing ?P \"parameter\")\n#+end_src\n\nPass a list to query for multiple different types of objects.\n#+begin_src elisp\n(meow-tree-sitter-register-thing ?B '(\"function\" \"class\"))\n#+end_src\n\n** Custom Queries ❓\nCustom queries must use the ~treesit~ query syntax, which is described [[https://www.gnu.org/software/emacs/manual/html_node/elisp/Pattern-Matching.html][here]] or within Emacs by evaluating ~(info \"(elisp)Pattern Matching\")~. To support both \"outer\" and \"inner\" bounds of things in Meow, each query should have two captures: =TYPE.inside= and =TYPE.around= where =TYPE= is the \"name\" of the thing (the second parameter to ~meow-tree-sitter-register-thing~).\n\nTo register a custom query, pass an alist to ~meow-tree-sitter-register-thing~ that maps language strings to queries. The query can be of any form that ~treesit-query-capture~ accepts.\n#+begin_src elisp\n(meow-tree-sitter-register-thing\n ?f \"function\"\n '((\"python\" . ((function_definition\n                 body: (block) :? @function.inside) @function.around))\n   (\"rust\" . \"(function_item\n                body: (_) @function.inside) @function.around\")))\n#+end_src\n\n* License 📜\nCode in this repository is licensed under the GPLv3. The queries are taken from the [[https://github.com/helix-editor/helix/tree/master/runtime/queries][helix]] project, which is licensed under the Mozilla Public License 2.0.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskissue%2Fmeow-tree-sitter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskissue%2Fmeow-tree-sitter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskissue%2Fmeow-tree-sitter/lists"}