padawan-php / padawan.vim

A vim plugin for padawan.php completion server
MIT License
79 stars 6 forks source link

does this plugin is only support composer project? #11

Open nevernet opened 8 years ago

nevernet commented 8 years ago

my project is not composer project.
it's plan php project, can i use this plugin?

mkusher commented 8 years ago

Yes, with a latest version of padawan.php you can use it with plain php. But you'll need to put empty composer.json to the project root

nevernet commented 8 years ago

i have installed padawan.php yestoday, i think it's latest version.

my compose.json file as below:

{
    "name": "project name",
    "description": "project description",
    "authors": [
        {
            "name": "Daniel",
            "email": "xx@xx.com"
        }
    ],
    "require": {}
}

i when i run command : PadawanGenerateIndex, i still got error code: 255. please let me now how to investigate ?

mkusher commented 8 years ago

with a composer.json file in a project root it should work properly. Is the issue still valid?

dvaganov commented 8 years ago

I also faced with this problem earlier. You need not only have composer.json in the project root directory, but also do composer install to fill vendor/ directory.

mkusher commented 8 years ago

@dvaganov what do you mean? If you are using latest padawan, then you don't need vendor dir at all

dvaganov commented 8 years ago

@mkusher I use latest no-dev version from packagist.org (v0.2.1). And to generate index I need to do composer install, otherwise padawan can't open stream require(vendor/composer/autoload_classmap.php).

mkusher commented 8 years ago

@dvaganov oh, yes, my fault. In 0.2.1 there is still a code that tries to load classmap that is actually not used. But you can create fake autoload_classmap.php so.