{"id":13895720,"url":"https://github.com/ziontee113/query-secretary","last_synced_at":"2025-03-18T16:30:37.776Z","repository":{"id":63635087,"uuid":"556430101","full_name":"ziontee113/query-secretary","owner":"ziontee113","description":"Neovim Plugin that assists you in writing Treesitter Queries ","archived":true,"fork":false,"pushed_at":"2022-12-02T12:16:31.000Z","size":55,"stargazers_count":66,"open_issues_count":2,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-29T16:43:55.642Z","etag":null,"topics":["lua","neovim","queries","query","scheme","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ziontee113.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}},"created_at":"2022-10-23T20:42:24.000Z","updated_at":"2024-11-13T18:36:30.000Z","dependencies_parsed_at":"2023-01-22T22:16:09.662Z","dependency_job_id":null,"html_url":"https://github.com/ziontee113/query-secretary","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/ziontee113%2Fquery-secretary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ziontee113%2Fquery-secretary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ziontee113%2Fquery-secretary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ziontee113%2Fquery-secretary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ziontee113","download_url":"https://codeload.github.com/ziontee113/query-secretary/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244259817,"owners_count":20424619,"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":["lua","neovim","queries","query","scheme","tree-sitter"],"created_at":"2024-08-06T18:02:25.315Z","updated_at":"2025-03-18T16:30:37.439Z","avatar_url":"https://github.com/ziontee113.png","language":"Lua","funding_links":[],"categories":["Lua"],"sub_categories":[],"readme":"## 📓 Query Secretary 🖊️\n#### Neovim Plugin that *assists* you in writing Treesitter Queries 🌳\n#### This plugin exists because *we don't want to manually write them queries ourselves* 🤓\n\n![query-secretary](https://user-images.githubusercontent.com/102876811/198027185-0af9abff-830d-464b-8016-bc7a5474b756.png)\n\n## Demo 🎥\n\nhttps://user-images.githubusercontent.com/102876811/198029879-dbb552de-05f5-41c0-baa4-eca3d718db98.mp4\n\n## Developer's Message ✉️\nThis plugin is still in *Prototype Phase!* With features hasn't been developed yet!\nSuch as:\n- End-user customizations (window location, highlight groups, etc...)\n- Add / Manage **Children** and **Siblings** nodes\n\u003cbr\u003e\n\nAt this current state, this plugin is **useful** for ***simple queries that doesn't deal with\nmulti-layered children / sibling nodes***. These features will be gradually developed as\nthe demand of more complex queries increases.\n\u003cbr\u003e\n\n## Installation 💽\nPacker:\n```lua\nuse(\"ziontee113/query-secretary\")\n```\n\n## Setup 💻\nBy default, Query Window at the center of the editor.\n\u003cbr\u003e\nIf you want to change how the query window options:\n\u003cbr\u003e\n```lua\nrequire('query-secretary').setup({\n    open_win_opts = {\n        row = 0,\n        col = 9999,\n        width = 50,\n        height = 15,\n    },\n\n    -- other options you can customize\n    buf_set_opts = {\n        tabstop = 2,\n        softtabstop = 2,\n        shiftwidth = 2,\n    }\n\n    capture_group_names = { \"cap\", \"second\", \"third\" } -- when press \"c\"\n    predicates = { \"eq\", \"any-of\", \"contains\", \"match\", \"lua-match\" } -- when press \"p\"\n    visual_hl_group = \"Visual\" -- when moving cursor around\n\n    -- here are the default keymaps\n    keymaps = {\n        close = { \"q\", \"Esc\" },\n        next_predicate = { \"p\" },\n        previous_predicate = { \"P\" },\n        remove_predicate = { \"d\" },\n        toggle_field_name = { \"f\" },\n        yank_query = { \"y\" },\n        next_capture_group = { \"c\" },\n        previous_capture_group = { \"C\" },\n    }\n})\n```\n\u003cbr\u003e\n\nThe following `setup` will open Query Window at your cursor\nwith `width = 50` and `height = 15`\n```lua\nrequire('query-secretary').setup({\n    open_win_opts = {\n        relative = \"cursor\",\n        width = 50,\n        height = 15,\n    },\n})\n```\n\nDefine your keymap:\n```lua\nvim.keymap.set(\"n\", \"your_keymap_here\", function()\n    require(\"query-secretary\").query_window_initiate()\nend, {})\n```\n\n## Usage \u0026 Keybindings ⌨️\n\nAfter putting your cursor where you want your query to end, press `your_keymap`\nto bring up the Query Window.\n\u003cbr\u003e\n\nHere are the default keymaps when you're in the Query Window (customizable with setup function):\n- `q` / `Esc` close the Query Window\n-  `f` toggle current node's `field_name`\n-  `p` / `P` toggle current node's `predicate`\n- `d` remove current node's `predicate`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fziontee113%2Fquery-secretary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fziontee113%2Fquery-secretary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fziontee113%2Fquery-secretary/lists"}