{"id":50731395,"url":"https://github.com/beixiyo/vv-expand.nvim","last_synced_at":"2026-06-10T09:01:17.316Z","repository":{"id":355205494,"uuid":"1220667457","full_name":"beixiyo/vv-expand.nvim","owner":"beixiyo","description":"Smart incremental selection: pair → LSP → treesitter → line. 智能增量选区（成对字符 → LSP → treesitter → 行）","archived":false,"fork":false,"pushed_at":"2026-05-23T08:47:50.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-29T12:41:57.879Z","etag":null,"topics":["lua","neovim","neovim-plugin","nvim","nvim-plugin","selection","treesitter","wildfire"],"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/beixiyo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-25T07:06:07.000Z","updated_at":"2026-05-23T08:47:54.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/beixiyo/vv-expand.nvim","commit_stats":null,"previous_names":["beixiyo/vv-expand.nvim"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/beixiyo/vv-expand.nvim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beixiyo%2Fvv-expand.nvim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beixiyo%2Fvv-expand.nvim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beixiyo%2Fvv-expand.nvim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beixiyo%2Fvv-expand.nvim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beixiyo","download_url":"https://codeload.github.com/beixiyo/vv-expand.nvim/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beixiyo%2Fvv-expand.nvim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34144680,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","neovim-plugin","nvim","nvim-plugin","selection","treesitter","wildfire"],"created_at":"2026-06-10T09:01:16.096Z","updated_at":"2026-06-10T09:01:17.290Z","avatar_url":"https://github.com/beixiyo.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003evv-expand.nvim\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cem\u003e智能增量选区 — 按 pair → LSP → treesitter → line 四层级联扩张\u003c/em\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Neovim-0.10+-57A143?style=flat-square\u0026logo=neovim\u0026logoColor=white\" alt=\"Requires Neovim 0.10+\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Lua-2C2D72?style=flat-square\u0026logo=lua\u0026logoColor=white\" alt=\"Lua\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/zero_deps-✓-2ea44f?style=flat-square\" alt=\"Zero Dependencies\" /\u003e\n\u003c/p\u003e\n\n---\n\n## 为什么要这个插件\n\n[wildfire.nvim](https://github.com/SUSTech-data/wildfire.nvim) 只基于 treesitter 父节点扩张，**不理解行内视觉分隔符**：\n\n- Markdown 里光标在 `` `user-picks.lua` `` 的 `user` 上 → 直接跳到整段 paragraph，不会先选 `` `user-picks.lua` ``\n- `[pack/init.lua]` 内部光标 → 跳到整个 `inline_link` 节点，不会先选 `pack/init.lua`\n\nvv-expand 先用**行内成对字符扫描**（括号 / 引号 / emphasis）做细粒度扩张，treesitter 只作为字符对失败后的补充层；LSP `selectionRange` 按语义结构扩张（标识符 → 表达式 → 语句 → 块），比纯 TS 粒度更贴近直觉。零运行时依赖，LSP / treesitter 缺失时自动降级\n\n## 安装\n\n```lua\n{\n  'beixiyo/vv-expand.nvim',\n  event = { 'BufReadPost', 'BufNewFile' },\n  ---@type ExpandConfig\n  opts = {\n    pairs = {\n      same = { '\"', \"'\", '`', '*', '_', '-' },       -- 同字符配对\n      nested = {                                       -- 嵌套括号对\n        { '(', ')' }, { '[', ']' }, { '{', '}' }, { '\u003c', '\u003e' },\n      },\n    },\n    layers = { 'word', 'pair', 'lsp', 'treesitter', 'line' }, -- 扩张策略优先级\n    keymaps = {\n      init = '\u003cCR\u003e',     -- normal 模式起手\n      expand = '\u003cCR\u003e',   -- visual 模式扩张\n      shrink = '\u003cBS\u003e',   -- visual 模式回缩\n    },\n    subword_delimiters = '-=+/:;|,.?\\\\!@#$%^\u0026*~', -- 逐段扩张分隔符；nil 则禁用\n    filetype_exclude = { 'qf', 'help', 'dashboard', 'vv-explorer', 'vv-task-panel' },\n    lsp_timeout = 400,   -- LSP selectionRange 超时（ms）\n  },\n}\n```\n\n## 配置\n\n| 选项 | 类型 | 默认值 | 说明 |\n|------|------|--------|------|\n| `pairs.same` | `string[]` | `'\"', \"'\", '`', '*', '_', '-'` | 同字符配对列表（两侧同为字母数字时视为词内，不配对） |\n| `pairs.nested` | `string[][]` | `() [] {} \u003c\u003e` | 嵌套括号对，基于栈匹配 |\n| `layers` | `string[]` | `{ 'word', 'pair', 'lsp', 'treesitter', 'line' }` | 扩张策略优先级；想关掉某层从列表删除即可 |\n| `keymaps.init` | `string` | `'\u003cCR\u003e'` | normal 模式开始选区 |\n| `keymaps.expand` | `string` | `'\u003cCR\u003e'` | visual 模式向外扩一级 |\n| `keymaps.shrink` | `string` | `'\u003cBS\u003e'` | visual 模式向内缩一级 |\n| `filetype_exclude` | `string[]` | `{ 'qf', 'help', ... }` | 排除的 filetype，不绑定按键 |\n| `subword_delimiters` | `string?` | `'-=+/:;\\|,.?\\\\!@#$%^\u0026*~'` | 逐段扩张的分隔符字符集；`nil` 则禁用逐段扩张，直接 iw → iW |\n| `lsp_timeout` | `integer` | `400` | LSP `selectionRange` 请求超时 ms |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeixiyo%2Fvv-expand.nvim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeixiyo%2Fvv-expand.nvim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeixiyo%2Fvv-expand.nvim/lists"}