{"id":49117312,"url":"https://github.com/someoneonsmile/pack-config.nvim","last_synced_at":"2026-04-21T08:10:09.659Z","repository":{"id":37011962,"uuid":"501780987","full_name":"someoneonsmile/pack-config.nvim","owner":"someoneonsmile","description":"Modular package, package installation and configuration in same file, decoupling package manager","archived":false,"fork":false,"pushed_at":"2026-04-02T14:19:30.000Z","size":246,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-03T02:58:58.886Z","etag":null,"topics":["nvim","nvim-plugin","plugin-manager"],"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/someoneonsmile.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2022-06-09T19:18:54.000Z","updated_at":"2026-04-02T14:19:40.000Z","dependencies_parsed_at":"2024-05-28T11:04:53.561Z","dependency_job_id":"236b0ce3-6289-420d-b211-93ed96d9a075","html_url":"https://github.com/someoneonsmile/pack-config.nvim","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/someoneonsmile/pack-config.nvim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/someoneonsmile%2Fpack-config.nvim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/someoneonsmile%2Fpack-config.nvim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/someoneonsmile%2Fpack-config.nvim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/someoneonsmile%2Fpack-config.nvim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/someoneonsmile","download_url":"https://codeload.github.com/someoneonsmile/pack-config.nvim/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/someoneonsmile%2Fpack-config.nvim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32082835,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T06:27:27.065Z","status":"ssl_error","status_checked_at":"2026-04-21T06:27:21.250Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["nvim","nvim-plugin","plugin-manager"],"created_at":"2026-04-21T08:10:08.841Z","updated_at":"2026-04-21T08:10:09.652Z","avatar_url":"https://github.com/someoneonsmile.png","language":"Lua","readme":"# pack-config.nvim\n\nModular package, package's installation and configuration in same file, decoupling package manager\n\n## Setup\n\n```lua\n\nrequire('pack-config').setup {\n  -- must\n  scan_paths = { '/path/pre', '/path/subpath', '/path/after' },\n\n  -- optional\n  -- default to select from the order list [packer.nvim, lazy.nvim, paq-nvim, vim.pack] if exists\n  loader = require('pack-config.loader.packer'),\n  -- optional\n  loader_opts = {},\n  -- optional\n  -- default to select from the order list [uv, fd] if exists\n  -- uv: which use vim.uv.fs_scandir\n  -- fd: which use the cli fd\n  scanner = require('pack-config.scanner.uv'),\n  -- optional\n  -- default for uv: https://github.com/someoneonsmile/pack-config.nvim/blob/main/lua/pack-config/scanner/uv.lua#L3C1-L8C2\n  scanner_opts = {},\n  -- optional, default\n  parser = require('pack-config.parser.lua'),\n  -- optional\n  parser_opts = {},\n\n  -- optional, env for all pack file\n  env = {\n    -- default, for get other pack\n    pack = function(pack_name)\n      ...\n    end\n  },\n\n  -- optional, provide convenience for debug, bisect\n  block_list = {\n    '[pack_name_a]',\n    '[pack_name_b]',\n    -- '[pack_name_c]',\n  },\n}\n```\n\n## Default Pack File Format\n\n\u003cdetails open\u003e\n\n\u003csummary\u003e detail \u003c/summary\u003e\n\n```lua\n-- pack config\nlocal M = {}\n\n-- must\nM.name = '[pack_name]'\n\n-- optional\n-- subs will eventually be merged into the main pack,\n-- similar to the conf.d directory.\n-- subs support multi-level nesting.\nM.subs = {\n  require('somepath'),\n  {\n    resources = {\n      -- resource\n      {\n        '[resource_url]',\n        as = '',\n        branch = '',\n        tag = '',\n        commit = '',\n        -- lock, skip updating this plugin\n        pin = false,\n        -- manually marks a plugin as optional\n        opt = true,\n        -- update / install hook\n        run = function() end,\n        rely = {\n          -- nested resource\n          {'[other_resource_url]', rely = {}}\n        },\n      }\n    }\n    setup = function() end,\n    config = function() end,\n    -- lazy = true\n    -- lazy also support function that return boolean\n    lazy = function()\n      return true\n    end\n    -- subs = ...\n  },\n}\n\n-- optional\n-- format: string, table or function\nM.resources = function()\n  return {\n    -- resource\n    {\n      '[resource_url]',\n      as = '',\n      branch = '',\n      tag = '',\n      commit = '',\n      -- lock, skip updating this plugin\n      pin = false,\n      -- manually marks a plugin as optional\n      opt = true,\n      -- update / install hook\n      run = function() end,\n      rely = {\n        -- nested resource\n        {'[other_resource_url]', rely = {}}\n      },\n    },\n    -- optional, placing deprecated resources\n    -- when 'deprecated_resource' use by other pack, will log the deprecated and replace_with tip\n    deprecated = {\n      { '[deprecated_resource]', replace_with = '[new_resource]'}\n    }\n  }\nend\n\n-- optional\n-- format: string, table or function\nM.after = { '[other_pack_name]' }\n\n-- optional\n-- pack setup\nM.setup = function()\n  -- use pack the env fn to load other pack\n  local other_pack = pack('other_pack_name')\n  ...\nend\n\n-- optional\n-- config run after all pack's setup\n-- and run with vim.schedule\nM.config = function()\n  -- use pack fn to load other pack\n  local other_pack = pack('other_pack_name')\n  ...\nend\n\n-- lazy = true\n-- lazy also support function that return boolean\nlazy = function()\n  return true\nend\n\nreturn M\n```\n\n### `resources` variants\n\n\u003cdetails\u003e\n\n\u003csummary\u003e variants \u003c/summary\u003e\n\n- string\n\n```lua\nM.resources = 'resource_url'\n```\n\n- table\n\n```lua\nM.resources = { 'resource_url_a',  'resource_url_b'}\n```\n\n- full table\n\n```lua\nM.resources = {\n  {\n    '[resource_url_a]',\n    as = '',\n    branch = '',\n    tag = '',\n    commit = '',\n    pin = false,\n    opt = false,\n    run = function() end,\n    rely = {\n      -- nested resource\n      {'[other_resource_url]', rely = {}}\n    },\n  },\n  {\n    '[resource_url_b]',\n    as = '',\n    branch = '',\n    tag = '',\n    commit = '',\n    pin = false,\n    opt = true,\n    run = function() end,\n    rely = {\n      -- nested resource\n      {'[other_resource_url]', rely = {}}\n    },\n  },\n  -- optional, placing deprecated resources\n  -- when use by other pack, will log the deprecated tip\n  deprecated = {\n    { '[deprecated_resource_a]', replace_with = '[new_resource_a]'}\n    { '[deprecated_resource_b]', replace_with = '[new_resource_b]'}\n  }\n}\n\n```\n\n- function\n\n```lua\nM.resources = function()\n  return 'all_kind_above'\nend\n```\n\n\u003c/details\u003e\n\n### `after` variants\n\n\u003cdetails\u003e\n\n\u003csummary\u003e variants \u003c/summary\u003e\n\n- string\n\n```lua\nM.after = 'other_pack_name'\n```\n\n- table\n\n```lua\nM.after = { 'other_pack_name_a', 'other_pack_name_b' }\n```\n\n- function\n\n```lua\nM.after = function()\n  return 'all_kind_above'\nend\n\n```\n\n\u003c/details\u003e\n\n\u003c/details\u003e\n\n## Download Package Location\n\n`vim.fn.stdpath('data') .. '/site/pack/init/start'`: predownload pack loader location\n\n`vim.fn.stdpath('data') .. '/site/pack/packer/start'`: pack loader download location\n\n## Profile\n\n`:lua require('pack-config.profile').report()`\n\n[commands](#Commands)\n\n## Custom scanner, parser and loader\n\n\u003cdetails\u003e\n\n\u003csummary\u003e detail \u003c/summary\u003e\n\n### Scanner\n\nto get the pack file\n\n\u003cdetails\u003e\n\n\u003csummary\u003e Format \u003c/summary\u003e\n\n```lua\nlocal M = {}\n\nM.exist = bool or function return bool\n\n-- optional\nM.init = function(opts) end\n\n-- scan the paths return the pack_files\nM.scan = function(paths)\n\nend\n```\n\n\u003c/details\u003e\n\n### Parser\n\nto parse the pack file\n\n\u003cdetails\u003e\n\n\u003csummary\u003e Format \u003c/summary\u003e\n\n```lua\nlocal M = {}\n\nM.exist = bool or function return bool\n\n-- optional\nM.init = function(opts) end\n\nM.is_pack = function(pack) return true end\n\n-- parse the pack file to the format\nM.parse = function(pack)\nreturn {\n  name = '',\n  resources = string, table or function,\n  after = string, table or function,\n  setup = function() end\n  config = function() end\n}\nend\n```\n\n\u003c/details\u003e\n\n### Loader\n\nuse package manager to load the pack\n\n\u003cdetails\u003e\n\n\u003csummary\u003e Format \u003c/summary\u003e\n\n```lua\nlocal M = {}\n\nM.exist = bool or function return bool\n\n-- optional\nM.init = function(opts) end\n\n-- parse the pack file to the format\nM.load = function(packs)\n\nend\n```\n\n\u003c/details\u003e\n\n\u003c/details\u003e\n\n## Commands\n\n`PackProfileReport`: report the pack profile data\n\n\u003cdetails\u003e\n\n\u003csummary\u003e example \u003c/summary\u003e\n\n| index | group        | item              | time  |\n| ----- | ------------ | ----------------- | ----- |\n| 1     | setup-config | lsp::setup        | 13.42 |\n| 2     | setup-config | telescope::setup  | 12.60 |\n| 3     | setup-config | theme::config     | 11.64 |\n| 4     | setup-config | complete::setup   | 11.23 |\n| 5     | setup-config | statusline::setup | 10.15 |\n\n\u003c/details\u003e\n\n## TODO\n\n- [x] lua check and style\n- [x] pack loader add init function\n- [x] deprecate tip\n- [x] context muti instance\n- [x] external lua file support\n- [x] topologic sort\n  - [x] circle check\n- [x] pack name repeat error\n- [x] refact log file (level with endpoin)\n- [x] log use vim.notify\n- [x] setfenv with setup and config\n- [x] split parser\n- [x] profile\n- [x] error handler\n- [ ] parallel\n- [ ] self update\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsomeoneonsmile%2Fpack-config.nvim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsomeoneonsmile%2Fpack-config.nvim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsomeoneonsmile%2Fpack-config.nvim/lists"}