{"id":50731375,"url":"https://github.com/beixiyo/vv-task-panel.nvim","last_synced_at":"2026-06-10T09:01:16.368Z","repository":{"id":359526525,"uuid":"1220667584","full_name":"beixiyo/vv-task-panel.nvim","owner":"beixiyo","description":"Extensible task panel (npm scripts in monorepos, etc). 可扩展任务面板（支持 monorepo npm scripts 等）","archived":false,"fork":false,"pushed_at":"2026-05-31T15:27:00.000Z","size":40,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-31T17:16:08.949Z","etag":null,"topics":["lua","neovim","neovim-plugin","npm","nvim","nvim-plugin","task-runner","tasks"],"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:20.000Z","updated_at":"2026-05-31T15:27:04.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/beixiyo/vv-task-panel.nvim","commit_stats":null,"previous_names":["beixiyo/vv-task-panel.nvim"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/beixiyo/vv-task-panel.nvim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beixiyo%2Fvv-task-panel.nvim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beixiyo%2Fvv-task-panel.nvim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beixiyo%2Fvv-task-panel.nvim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beixiyo%2Fvv-task-panel.nvim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beixiyo","download_url":"https://codeload.github.com/beixiyo/vv-task-panel.nvim/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beixiyo%2Fvv-task-panel.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","npm","nvim","nvim-plugin","task-runner","tasks"],"created_at":"2026-06-10T09:01:14.919Z","updated_at":"2026-06-10T09:01:16.362Z","avatar_url":"https://github.com/beixiyo.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003evv-task-panel.nvim\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cem\u003e可扩展的任务面板 — 自动发现项目脚本、终端运行、monorepo 支持\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\u003c/p\u003e\n\n---\n\n## 安装\n\n```lua\n{\n  'beixiyo/vv-task-panel.nvim',\n  dependencies = {\n    'beixiyo/vv-utils.nvim',\n    { 'beixiyo/vv-statuscol.nvim', optional = true },  -- 鼠标点击 sign 运行任务需要此插件\n  },\n  cmd = { 'VVTaskPanel', 'VVTaskPanelOpen' },\n  ---@type VVTaskPanelConfig\n  opts = {\n    width = 44,                     -- 面板宽度\n    position = 'right',             -- 'left' | 'right'\n    exclude_dirs = {                -- 扫描时跳过的目录\n      'node_modules', '.git', 'dist', 'build', '.next',\n      '.turbo', '.cache', 'coverage', '.nuxt', 'out',\n    },\n    scan_strategy = 'workspace',    -- 'workspace'（读 workspace 定义）| 'walk'（递归遍历）\n    max_depth = 8,                  -- walk 策略的最大递归深度\n    term_position = 'bottom',       -- 任务终端位置：'bottom' | 'right' | 'float'\n    term_height = 15,               -- bottom 模式下终端高度\n    term_width = 80,                -- right 模式下终端宽度\n    providers = nil,                -- Provider 白名单（nil = 启用所有已注册的）\n    icons = {\n      pkg_open   = '',\n      pkg_closed = '',\n      package    = '󰏖',\n      running    = '●',\n      success    = '',\n      failed     = '',\n      stopped    = '●',\n      pending    = '',\n      header     = '󰆍',\n      arrow      = '→',\n      run        = '',  -- statuscolumn idle 状态图标\n    },\n    sign = {                          -- statuscolumn 脚本行标记（按状态配置）\n      idle    = { hl = 'VVTaskSignIdle' },\n      running = { hl = 'VVTaskSignRunning' },\n      success = { hl = 'VVTaskSignSuccess' },\n      failed  = { hl = 'VVTaskSignFailed' },\n      stopped = { hl = 'VVTaskSignStopped' },\n    },\n  },\n}\n```\n\n## 配置\n\n| 选项 | 类型 | 默认值 | 说明 |\n|------|------|--------|------|\n| `width` | `integer` | `44` | 面板宽度 |\n| `position` | `'left' \\| 'right'` | `'right'` | 面板位置 |\n| `exclude_dirs` | `string[]` | `{ 'node_modules', '.git', ... }` | 扫描时跳过的目录 |\n| `scan_strategy` | `'workspace' \\| 'walk'` | `'workspace'` | `workspace`：读 `pnpm-workspace.yaml` / `package.json` workspaces；`walk`：递归遍历 |\n| `max_depth` | `integer` | `8` | `walk` 策略最大递归深度 |\n| `term_position` | `'bottom' \\| 'right' \\| 'float'` | `'bottom'` | 任务终端窗口位置 |\n| `term_height` | `integer` | `15` | `bottom` 模式下终端高度 |\n| `term_width` | `integer` | `80` | `right` 模式下终端宽度 |\n| `providers` | `string[]?` | `nil` | Provider 白名单；`nil` 启用所有已注册 |\n| `icons` | `table\u003cstring, string\u003e` | *见上方* | 图标配置，可逐项覆盖 |\n| `sign` | `table\u003cstring, VVTaskSignState\u003e` | *见上方* | Statuscolumn 标记按状态配置 icon / hl |\n\n## Statuscolumn Signs\n\n打开 `package.json` / `deno.json` 时，脚本行的 statuscolumn 自动显示可运行标记，标记随任务状态实时变化：\n\n| 状态 | 图标 | 颜色 | 说明 |\n|------|------|------|------|\n| idle | `icons.run` | 蓝 (`DiagnosticInfo`) | 未运行，可点击执行 |\n| running | `icons.running` | 绿 (`DiagnosticOk`) | 运行中，点击聚焦终端 |\n| success | `icons.success` | 绿 (`DiagnosticOk`) | 运行成功 |\n| failed | `icons.failed` | 红 (`DiagnosticError`) | 运行失败 |\n| stopped | `icons.stopped` | 红 (`DiagnosticError`) | 手动终止 |\n\n**运行方式**：\n\n- 鼠标点击 gutter 区域的标记图标（需安装 [vv-statuscol.nvim](https://github.com/beixiyo/vv-statuscol.nvim)，未安装时点击无效）\n- 光标移到脚本行，按 `gx` 或执行 `:VVTaskPanelRunLine`\n\n**覆盖单个状态的图标 / 高亮**：\n\n```lua\nopts = {\n  sign = {\n    running = { icon = '⟳', hl = 'MyCustomRunning' },\n  },\n}\n```\n\n未设置 `icon` 的状态自动复用 `icons` 表同名项。\n\n### 自定义 Sign Parser\n\n为新文件类型注册脚本行解析器，即可在 statuscolumn 显示运行标记：\n\n```lua\nrequire('vv-task-panel').register_sign_parser('Cargo.toml', function(buf)\n  local lines = vim.api.nvim_buf_get_lines(buf, 0, -1, false)\n  local dir = vim.fn.fnamemodify(vim.api.nvim_buf_get_name(buf), ':h')\n  local result = {}\n  for i, line in ipairs(lines) do\n    local name = line:match('^name%s*=%s*\"([^\"]+)\"')\n    if name then\n      result[#result + 1] = {\n        lnum = i,\n        name = name,\n        argv = { 'cargo', 'run', '--bin', name },\n        cwd = dir,\n        badge = 'cargo',\n      }\n    end\n  end\n  return result\nend)\n```\n\n---\n\n### 内置 npm Provider\n\n自动扫描 `package.json`，按 lockfile 选择包管理器（pnpm / bun / yarn / npm）。`workspace` 策略读取 `pnpm-workspace.yaml` 或 `package.json` 的 `workspaces` 字段展开子包。\n\n### 自定义 Provider\n\n```lua\nrequire('vv-task-panel').register_provider({\n  name = 'deno',\n  detect = function(root, cfg)\n    return vim.fs.find('deno.json', { path = root, type = 'file', limit = math.huge })\n  end,\n  parse = function(path, cfg)\n    local ok, data = pcall(vim.json.decode, table.concat(vim.fn.readfile(path), '\\n'))\n    if not ok or type(data.tasks) ~= 'table' then return nil end\n    local dir = vim.fn.fnamemodify(path, ':h')\n    local tasks = {}\n    for name, cmd in pairs(data.tasks) do\n      tasks[#tasks + 1] = { name = name, argv = { 'deno', 'task', name }, cmd = cmd }\n    end\n    return {\n      id = path, name = data.name or vim.fn.fnamemodify(dir, ':.'),\n      dir = dir, rel_dir = vim.fn.fnamemodify(dir, ':.'),\n      badge = 'deno', tasks = tasks,\n    }\n  end,\n})\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeixiyo%2Fvv-task-panel.nvim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeixiyo%2Fvv-task-panel.nvim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeixiyo%2Fvv-task-panel.nvim/lists"}