tpope / vim-projectionist

projectionist.vim: Granular project configuration
https://www.vim.org/scripts/script.php?script_id=4989
1.06k stars 67 forks source link

Projectionist is not working as expected #192

Open jiz4oh opened 3 months ago

jiz4oh commented 3 months ago

image Hi @tpope, I have a project built by node and it has many microapps, and each apps has the same structure like app-demo with node_modules and package.json

node_modules/
packages/
    apps/
        app-case/
        app-root/
        app-freight/
        app-demo/
              node_modules/
              package.json

I would like to set something on package.json under each app and exclude anything in node_modules, but it's not working even if I set .projections.json as below

{
  "packages/apps/*/package.json": {
    "type": "lib",
    "alternate": [
      "pnpm-lock.yaml"
    ]
  },
  "package.json": {
    "type": "lib",
    "alternate": [
      "pnpm-lock.yaml"
    ]
  }
}

and this will scan all the node_modules, it's too slow for me

{
  "!packages/apps/*/node_modules&packages/apps/*/package.json": {
    "type": "lib",
    "alternate": [
      "pnpm-lock.yaml"
    ]
  },
  "package.json": {
    "type": "lib",
    "alternate": [
      "pnpm-lock.yaml"
    ]
  }
}

could you help resolve this issue or is there any other way to ignore the node_modules?