tpope/vim-projectionist

Invalid number of arguments

Closed this issue · 4 comments

Hi,

Thanks for the wonderful plugin. When I built the below projectionist file all commands worked fine. But now it throws "Invalid number of arguments". From this error message I can't figure out what's wrong. Here is the projectionist file for my project

{
    "force-app/main/default/aura/*.cmp" : {
        "alternate" : "force-app/main/default/aura/{}.css",
        "type" : "cmp"
    }
    ,"force-app/main/default/aura/*Controller.js" : {
        "alternate" : "force-app/main/default/aura/{}Helper.js",
        "type" : "controller"
    }
    ,"force-app/main/default/aura/*Helper.js" : {
        "alternate" : "force-app/main/default/aura/{}Controller.js",
        "type" : "helper"
    }
    ,"force-app/main/default/aura/*.css" : {
        "alternate" : "force-app/main/default/aura/{}.cmp",
        "type" : "css"
    }
}

If i'm on file ending with .cmp and I execute Ecss command then it works fine, but Econtroller doesn't work. Strangely, Econtroller worked when I setup before.

Please let me know, how can I troubleshoot this? thank you.

tpope commented

When is it throwing the error. I see Invalid number of arguments when I call :Econtroller with no arguments, but that error makes sense. Other than that it appears to work.

Ecss works without arguments, is there a reason why Econtroller expect arguments?

    ,"force-app/main/default/aura/*Controller.js" : {
        "alternate" : "force-app/main/default/aura/{}Helper.js",
        "type" : "controller"
    }

If I change above to the below then all commands are working fine. This sounds like a bug

    ,"force-app/main/default/aura/*Controller.js" : {
        "alternate" : "force-app/main/default/aura/{}.cmp",
        "type" : "controller"
    }
tpope commented

See :help projectionist-related.