Open gonzaloserrano opened 11 years ago
File size of the phpcomplete_index
file is smaller than core_index
file. Even in vanilla installation phpcomplete_index
file size should be close to the core_index
file. It seems that full autoload classmap is not generated. Can you issue composer.phar dumpautoload --optimize
from command line and issue :PHPCompleteExtendedGenerateIndex
command in vim again?
Sure thing:
Generating index...
PHP Fatal error: Class 'PhpCollection\Sequence' not found in myproject/vendor/jms/di-extra-bundle/JMS/DiExtraBundle/DependencyInjection/Collection/LazyServiceSequence.php on line 9
PHP Stack trace:
PHP 1. {main}() /Users/gonzalo/.spf13-vim-3/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:0
PHP 2. IndexGenerator->generateIndex() /Users/gonzalo/.spf13-vim-3/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:50
PHP 3. IndexGenerator->processClass() /Users/gonzalo/.spf13-vim-3/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:425
PHP 4. IndexGenerator->getClassInfo() /Users/gonzalo/.spf13-vim-3/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:528
PHP 5. IndexGenerator->getMethodData() /Users/gonzalo/.spf13-vim-3/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:740
PHP 6. ReflectionParameter->getClass() /Users/gonzalo/.spf13-vim-3/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:790
PH
Fatal error: Class 'PhpCollection\Sequence' not found in myproject/vendor/jms/di-extra-bundle/JMS/DiExtraBundle/DependencyInjection/Collection/LazyServiceSequence.php on line 9
Call Stack:
0.0029 543528 1. {main}() /Users/gonzalo/.spf13-vim-3/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:0
0.0183 2508456 2. IndexGenerator->generateIndex() /Users/gonzalo/.spf13-vim-3/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:50
3.9790 93146888 3. IndexGenerator->processClass() /Users/gonzalo/.spf13-vim-3/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:425
3.9790 93147024 4. IndexGenerator->getClassInfo() /Users/gonzalo/.spf13-vim-3/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:528
3.9797 93191376 5. IndexGenerator->getMethodData() /Users/gonzalo/.spf13-vim-3/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:740
3.9798 93196592 6. ReflectionParameter->gP 7. Composer\Autoload\ClassLoader->loadClass() /Users/gonzalo/.spf13-vim-3/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:0
PHP 8. include() myproject/vendor/composer/ClassLoader.php:185
etClass() /Users/gonzalo/.spf13-vim-3/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:790
3.9798 93197144 7. Composer\Autoload\ClassLoader->loadClass() /Users/gonzalo/.spf13-vim-3/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:0
3.9799 93208448 8. include('myproject/vendor/composer/ClassLoader.php:185
And the files size:
-rw-r--r-- 1 gonzalo staff 24493772 Oct 2 12:17 core_index
-rw-r--r-- 1 gonzalo staff 95 Oct 3 16:31 index_cache
-rw-r--r-- 1 gonzalo staff 3050899 Oct 3 14:55 phpcomplete_index
-rw-r--r-- 1 gonzalo staff 472135 Oct 3 14:55 plugin_index
-rw-r--r-- 1 gonzalo staff 0 Oct 3 14:55 report.txt
Hmm, it seems that jms-di-extra
bundle has a dependency on phpCollection
library. But mysteriously composer does not download the dependency. You have to manually add "phpcollection/phpcollection": "0.3.0"
line in the require section of the composer.json
file and issue update command.
Also delete the .phpcomplete_extended
folder and restart vim to check that autoload classmap works or not. I have checked with custom composer.phar command and it seems to be working here.
Any update?
Sorry about the delay, i'm at home now.
I did the composer thing and ran everything again and now i'm getting some kind of error related to my project classes:
Generating index...
Fatal error: Declaration of SomeClass::someMethod() must be compatible with SomeInterface::someMethod($someParameters) in myproject/SomeClass.php on line 6
PHP Stack trace:
PHP 1. {main}() /Users/gonzalo/.spf13-vim-3/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:0
PHP 2. IndexGenerator->generateIndex() /Users/gonzalo/.spf13-vim-3/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:50
PHP 3. IndexGenerator->processClass() /Users/gonzalo/.spf13-vim-3/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:425
PHP 4. IndexGenerator->getClassInfo() /Users/gonzalo/.spf13-vim-3/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:528
PHP 5. ReflectionClass->__construct() /Users/g
Fatal error: Declaration of SomeClass::someMethod() must be compatible with SomeInterface::someMethod($someParameters) in myproject/SomeClass.php on line 6
Call Stack:
0.0029 543520 1. {main}() /Users/gonzalo/.spf13-vim-3/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:0
0.0206 2512688 2. IndexGenerator->generateIndex() /Users/gonzalo/.spf13-vim-3/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:50
6.3952 118056968 3. IndexGenerator->processClass() /Users/gonzalo/.spf13-vim-3/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:425
6.3952 118057104 4. IndexGenerator->getClassInfo() /Users/gonzalo/.spf13-vim-3/.vim/bundle/phpcomplete-extended/bin/IndexGeonzalo/.spf13-vim-3/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:690
PHP 6. Composer\Autoload\ClassLoader->loadClass() /Users/gonzalo/.spf13-vim-3/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:0
PHP 7. include() myproject/vendor/composer/ClassLoader.php:185
nerator.php:528
6.3952 118065024 5. ReflectionClass->__construct() /Users/gonzalo/.spf13-vim-3/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:690
6.3952 118065632 6. Composer\Autoload\ClassLoader->loadClass() /Users/gonzalo/.spf13-vim-3/.vim/bundle/phpcomplete-extended/bin/IndexGenerator.php:0
6.3954 118092120 7. include('myproject/SomeClass.php') myproject/vendor/composer/ClassLoader.php:185
Because this is my company's code i changed the name of the classes and everything, sorry :S
Also:
-rw-r--r-- 1 gonzalo staff 24493772 Oct 3 17:45 core_index
-rw-r--r-- 1 gonzalo staff 95 Oct 3 17:47 index_cache
Thx!
Hmm, as the error suggests method signature SomeClass::someMethod()
did not matched with SomeInterface::someMethod()
it was implementing. Check that both method signatures are same. Or maybe FQCN of one of the method parameters is not included in the use
section.
Any update? BTW I have fixed the root problem of the phpcollection
lazy sequence bug. You should update phpcomplete-extended
and check. Also I have added supertab section in README.md
.
Sorry for the delay, i'll try to fix the code problems this weekend and will report then.
Thanks a lot and have a good weekend!
Hello, any update about this ticket?
I've got a similar problem here, except that I do not have code problems: the bug occures on a blank project, got only the Acme/Demo bundle and a new empty bundle. Same symptoms: no omni-completion (I got the same message as gonzaloserranno) and an empty index_cache in .phpcomplete_extended:
total 46592
-rw-r--r-- 1 calmacil calmacil 24330368 avril 20 09:09 core_index
-rw-r--r-- 1 calmacil calmacil 95 avril 20 09:11 index_cache
-rw-r--r-- 1 calmacil calmacil 23366044 avril 20 09:09 phpcomplete_index
-rw-r--r-- 1 calmacil calmacil 2183 avril 20 09:09 report.txt
The thing is, I believe the problem does not comes from phpcomplete-extended-symfony: I tried with and without, with only the core phpcomplete-extended loaded, and the bug occures in both cases. Maybe I am doing something wrong ?
Hello @Calmacil, Sorry for late reply.
From your file listing everything seems ok. Size of index_cache
is small initially. It acts as a secondary cache where infos of class and methods you completed are stored, so that larger index of phpcomplete_index
file would be accessed less. I think you haven't enabled phpcomplete-extended-symfony
here. If enabled there would be another file named plugin_index
.
I just tested a Symfony 2.4 project with phpcomplete-extended
and phpcomplete-extended-symfony
, everything seems ok here. Can you give more detail of your environment with the error message you are having. The plugins have changed a lot since @gonzaloserrano posted this bug report.
You are right, phpcomplete-extended-symfony wasn't loaded on my example. Anyway, wether it is loaded or not, when I do
-- Complètement selon le type de fichier (Omni) (^O^N^P) Motif introuvable
that is, in english:
-- Omni completion (^O^N^P) Pattern not found
Of course, no autocompletion popup appears.
For my environment, I'm under Linux Mint 15 and I use Vim 7.3. Here is my :scriptnames
1: /usr/share/vim/vimrc
2: /usr/share/vim/vim73/debian.vim
3: /usr/share/vim/vim73/syntax/syntax.vim
4: /usr/share/vim/vim73/syntax/synload.vim
5: /usr/share/vim/vim73/syntax/syncolor.vim
6: /usr/share/vim/vim73/filetype.vim
7: ~/.vimrc
8: /usr/share/vim/vim73/ftoff.vim
9: ~/vim_env/php-vundle/bundle/vundle/autoload/vundle.vim
10: ~/vim_env/php-vundle/bundle/vundle/autoload/vundle/config.vim
11: ~/vim_env/php-vundle/bundle/vim-twig/ftdetect/twig.vim
12: /usr/share/vim/vim73/ftplugin.vim
13: /usr/share/vim/vim73/indent.vim
14: /usr/share/vim/vim73/syntax/nosyntax.vim
15: ~/vim_env/php-vundle/bepo.vim
16: ~/vim_env/php-vundle/bundle/matchit/plugin/matchit.vim
17: ~/vim_env/php-vundle/bundle/nerdtree/plugin/NERD_tree.vim
18: ~/vim_env/php-vundle/bundle/nerdtree/autoload/nerdtree.vim
19: ~/vim_env/php-vundle/bundle/nerdtree/lib/nerdtree/path.vim
20: ~/vim_env/php-vundle/bundle/nerdtree/lib/nerdtree/menu_controller.vim
21: ~/vim_env/php-vundle/bundle/nerdtree/lib/nerdtree/menu_item.vim
22: ~/vim_env/php-vundle/bundle/nerdtree/lib/nerdtree/key_map.vim
23: ~/vim_env/php-vundle/bundle/nerdtree/lib/nerdtree/bookmark.vim
24: ~/vim_env/php-vundle/bundle/nerdtree/lib/nerdtree/tree_file_node.vim
25: ~/vim_env/php-vundle/bundle/nerdtree/lib/nerdtree/tree_dir_node.vim
26: ~/vim_env/php-vundle/bundle/nerdtree/lib/nerdtree/opener.vim
27: ~/vim_env/php-vundle/bundle/nerdtree/lib/nerdtree/creator.vim
28: ~/vim_env/php-vundle/bundle/nerdtree/nerdtree_plugin/exec_menuitem.vim
29: ~/vim_env/php-vundle/bundle/nerdtree/nerdtree_plugin/fs_menu.vim
30: ~/vim_env/php-vundle/bundle/vimproc.vim/plugin/vimproc.vim
31: ~/vim_env/php-vundle/bundle/unite.vim/plugin/unite/bookmark.vim
32: ~/vim_env/php-vundle/bundle/unite.vim/autoload/unite/custom.vim
33: ~/vim_env/php-vundle/bundle/unite.vim/plugin/unite/buffer.vim
34: ~/vim_env/php-vundle/bundle/unite.vim/plugin/unite/history_yank.vim
35: ~/vim_env/php-vundle/bundle/unite.vim/plugin/unite/window.vim
36: ~/vim_env/php-vundle/bundle/unite.vim/plugin/unite.vim
37: ~/vim_env/php-vundle/bundle/phpcomplete-extended/plugin/phpcomplete_extended.vim
38: ~/vim_env/php-vundle/bundle/phpcomplete-extended/autoload/phpcomplete_extended/util.vim
39: ~/vim_env/php-vundle/bundle/unite.vim/autoload/vital.vim
40: ~/vim_env/php-vundle/bundle/phpcomplete-extended/autoload/vital/_62ad025.vim
41: ~/vim_env/php-vundle/bundle/phpcomplete-extended/autoload/vital/_62ad025/Prelude.vim
42: ~/vim_env/php-vundle/bundle/vimproc.vim/autoload/vimproc.vim
43: ~/vim_env/php-vundle/bundle/vimproc.vim/autoload/vimproc/util.vim
44: ~/vim_env/php-vundle/bundle/phpcomplete-extended/autoload/phpcomplete_extended.vim
45: ~/vim_env/php-vundle/bundle/rainbow_parentheses.vim/plugin/rainbow_parentheses.vim
46: ~/vim_env/php-vundle/bundle/supertab/plugin/supertab.vim
47: ~/vim_env/php-vundle/bundle/syntastic/plugin/syntastic/autoloclist.vim
48: ~/vim_env/php-vundle/bundle/syntastic/plugin/syntastic/balloons.vim
49: ~/vim_env/php-vundle/bundle/syntastic/plugin/syntastic/checker.vim
50: ~/vim_env/php-vundle/bundle/syntastic/plugin/syntastic/cursor.vim
51: ~/vim_env/php-vundle/bundle/syntastic/plugin/syntastic/highlighting.vim
52: ~/vim_env/php-vundle/bundle/syntastic/plugin/syntastic/loclist.vim
53: ~/vim_env/php-vundle/bundle/syntastic/plugin/syntastic/modemap.vim
54: ~/vim_env/php-vundle/bundle/syntastic/plugin/syntastic/notifiers.vim
55: ~/vim_env/php-vundle/bundle/syntastic/plugin/syntastic/registry.vim
56: ~/vim_env/php-vundle/bundle/syntastic/plugin/syntastic/signs.vim
57: ~/vim_env/php-vundle/bundle/syntastic/plugin/syntastic.vim
58: ~/vim_env/php-vundle/bundle/syntastic/autoload/syntastic/log.vim
59: ~/vim_env/php-vundle/bundle/syntastic/autoload/syntastic/util.vim
60: ~/vim_env/php-vundle/bundle/tagbar/plugin/tagbar.vim
61: ~/vim_env/php-vundle/bundle/tagbar-phpctags.vim/plugin/tagbar-phpctags.vim
62: ~/vim_env/php-vundle/bundle/vim-fugitive/plugin/fugitive.vim
63: ~/vim_env/php-vundle/bundle/vim-php-namespace/plugin/phpns.vim
64: ~/vim_env/php-vundle/bundle/vim-symfony/plugin/stacktrace.vim
65: ~/vim_env/php-vundle/bundle/vim-symfony/plugin/symfonycomplete.vim
66: ~/vim_env/php-vundle/bundle/riv.vim/plugin/riv.vim
67: ~/vim_env/php-vundle/bundle/riv.vim/autoload/riv.vim
68: ~/vim_env/php-vundle/bundle/riv.vim/autoload/riv/test.vim
69: ~/vim_env/php-vundle/bundle/riv.vim/autoload/riv/cmd.vim
70: ~/vim_env/php-vundle/bundle/riv.vim/autoload/riv/path.vim
71: ~/vim_env/php-vundle/bundle/riv.vim/autoload/riv/ptn.vim
72: /usr/share/vim/vim73/plugin/getscriptPlugin.vim
73: /usr/share/vim/vim73/plugin/gzip.vim
74: /usr/share/vim/vim73/plugin/matchparen.vim
75: /usr/share/vim/vim73/plugin/netrwPlugin.vim
76: /usr/share/vim/vim73/plugin/rrhelper.vim
77: /usr/share/vim/vim73/plugin/spellfile.vim
78: /usr/share/vim/vim73/plugin/tarPlugin.vim
79: /usr/share/vim/vim73/plugin/tohtml.vim
80: /usr/share/vim/vim73/plugin/vimballPlugin.vim
81: /usr/share/vim/vim73/plugin/zipPlugin.vim
82: ~/vim_env/php-vundle/bundle/phpcomplete-extended/autoload/phpcomplete_extended/parser.vim
phpcomplete-extended-symfony is still not loaded in the vimrc here (I use vundle). Also, my Symfony version is 2.4. the ~/vim_env/php-vundle directory is symlinked to ~/.vim
Does autocompletion in src/Acme/DemoBundle/Controller/DemoController.php
file works? For a newly created file you have to save the file after class creation or method addition. The plugin will try to add the class info to index in background. If successful you will get completion after a few character typing.
No, I have the same error message, still with or without phpcomplete-extended-symfony. Note that vim's CWD is the symfony project's root the file's directory. May it have some kind of influence ?
Might there be any conflict with plugins such as 'shawncplus/phpcomplete.vim' or 'arnaud-lb/vim-php-namespace' for example? I have to admit that I haven't tried to disable those two ones yet...
After having disabled the two plugins I just mentionned, I've got the keyword autocomplete ( C-X C-N ), which is normal, but still not the omnicomplete. When I regenerate the index, after having executed ./composer.phar dumpautoload --optimize, I have this:
total 46868
-rw-r--r-- 1 calmacil calmacil 24330368 avril 22 23:26 core_index
-rw-r--r-- 1 calmacil calmacil 95 avril 22 23:26 index_cache
-rw-r--r-- 1 calmacil calmacil 23448048 avril 22 23:26 phpcomplete_index
-rw-r--r-- 1 calmacil calmacil 197057 avril 22 23:26 plugin_index
-rw-r--r-- 1 calmacil calmacil 2183 avril 22 23:26 report.txt
And when I cat report.txt:
vendor/doctrine/cache/lib/Doctrine/Common/Cache/MongoDBCache.php
vendor/doctrine/cache/lib/Doctrine/Common/Cache/RiakCache.php
vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php
vendor/doctrine/common/lib/Doctrine/Common/Proxy/ProxyGenerator.php
vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php
vendor/doctrine/orm/lib/Doctrine/ORM/Proxy/ProxyFactory.php
vendor/incenteev/composer-parameter-handler/Incenteev/ParameterHandler/Processor.php
vendor/monolog/monolog/src/Monolog/Handler/AmqpHandler.php
vendor/monolog/monolog/src/Monolog/Handler/DoctrineCouchDBHandler.php
vendor/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php
vendor/monolog/monolog/src/Monolog/Handler/ElasticSearchHandler.php
vendor/monolog/monolog/src/Monolog/Handler/RavenHandler.php
vendor/monolog/monolog/src/Monolog/Handler/RollbarHandler.php
vendor/psr/log/Psr/Log/LoggerAwareTrait.php
vendor/psr/log/Psr/Log/LoggerTrait.php
vendor/sensio/distribution-bundle/Sensio/Bundle/DistributionBundle/Composer/ScriptHandler.php
vendor/sensio/generator-bundle/Sensio/Bundle/GeneratorBundle/Command/GenerateDoctrineEntityCommand.php
vendor/symfony/symfony/src/Symfony/Bridge/Propel1/DataCollector/PropelDataCollector.php
vendor/symfony/symfony/src/Symfony/Bridge/Propel1/Logger/PropelLogger.php
vendor/symfony/assetic-bundle/Symfony/Bundle/AsseticBundle/Factory/Loader/AsseticHelperFormulaLoader.php
vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php
vendor/symfony/symfony/src/Symfony/Component/Console/Descriptor/ApplicationDescription.php
vendor/symfony/symfony/src/Symfony/Component/CssSelector/Node/ElementNode.php
vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerAwareTrait.php
vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcacheSessionHandler.php
vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MemcachedSessionHandler.php
vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/TokenStorage/NativeSessionTokenStorage.php
vendor/symfony/symfony/src/Symfony/Component/Security/Csrf/TokenStorage/SessionTokenStorage.php
Please note that phpcomplete-extended-symfony is now loaded.
report.txt
just lists the files that are not indexed. Now that you are getting word completion, what is the value of omnifunc
option set in your .vimrc
for php file? It should be phpcomplete_extended#CompletePHP
.
Ok for report.txt, I thought it listed the files that where indexed.
I have the right value, still no omnicompletion. The standard
Very odd! Can you create a minimal .vimrc
file consisting only of vimproc
and phpcompelete-extended*
and check again? You can try the method listed here.
Ok, it seems to work with the minimal environment. I guess I just have to check my bundles one after another to find the one causing troubles... Thank you for your help.
That is very weird. In fact, my omnicomplete seems to work only if it does not detect a .phpcomplete_extended directory. In the SF project root, if I do this:
$ rm -rf .phpcomplete_extended
$ vi src/Acme/DemoBundle/Controller/DemoController.php
no composer.json is found, which I guess is normal, so no cache is generated nor loaded, and omnicomplete works well.
$ rm -rf .phpcomplete_extended
$ vi
[ in vi ]
:e src/Acme/DemoBundle/Controller/DemoController.php
There omnicomplete crashes and I get the error message I already showed you. As far as I tried at the moment, I can only think that there is some incompatibility with either unite.vim or vundle, or some misconfiguration I wrote in my original vimrc. I will continue testing and keep you informed of my progress.
Hmm, great to know that it is working in minimal configuration. I gave a closer look to your :scriptnames
. I think this line at symfonycomplete.vim is causing the problem. For supertab
can try adding following line in your .vimrc
,
let g:SuperTabContextTextOmniPrecedence = ['&omnifunc', '&completefunc']
Haven't tested it yet though.
Well, in fact I already have this. Here is my supertab config:
let g:SuperTabDefaultCompletionType = 'context'
let g:SuperTabCompletionContexts = ['s:ContextText', 's:ContextDiscover']
let g:SuperTabContextTextOmniPrecedence = ['&omnifunc', '&completefunc']
let g:SuperTabContextDiscoverDiscovery = ['&completefunc:<c-n>', '&omnifunc:<c-x><c-o>']
Moreover, the bug occures with vundle, vimproc, unite, phpcomplete_extended and phpcomplete_extended_symfony loaded, all other plugins being disabled.
Thanks for minimal configuration to reproduce the bug. I will test later today. I tested with vundle once, LONG time ago. Currently using neobundle for plugin management.
I tested the plugins using following minimal `.vimrc' in Lubuntu 13.10 with Symfony 2.4 project
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
Plugin 'Shougo/vimproc.vim' "after install run make in ~/.vim/bundle/vimproc.vim directory
Plugin 'm2mdas/phpcomplete-extended'
Plugin 'm2mdas/phpcomplete-extended-symfony'
Plugin 'ervandew/supertab'
Plugin 'docteurklein/vim-symfony'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
"phpcomplete-extended
autocmd FileType php setlocal omnifunc=phpcomplete_extended#CompletePHP
"supertab
let g:SuperTabDefaultCompletionType = 'context'
let g:SuperTabCompletionContexts = ['s:ContextText', 's:ContextDiscover']
let g:SuperTabContextTextOmniPrecedence = ['&omnifunc', '&completefunc']
let g:SuperTabContextDiscoverDiscovery = ['&completefunc:<c-n>', '&omnifunc:<c-x><c-o>']
It is working fine here. I even symlinked another directory to .vim
to emulate your environment, working fine also. Problem may be coming from other plugin.
Have you ever heard that some plugins such as NerdTree or Taglist might interfere with phpcomplete-extended ?
Well theoretically it shouldn't. phpcomplete-extended operates only if omnifunc
option is set, which NerdTree or Taglist does not touch AFAIK.
Oh there is one case actually, see this issue.
au filetype javascript set omnifunc=javascriptcomplete#CompleteJS
au filetype html set omnifunc=htmlcomplete#CompleteTags
au filetype css set omnifunc=csscomplete#CompleteCSS
au filetype php set omnifunc=phpcomplete#CompletePHP
au filetype twig let g:myft="twig"
set completeopt=menuone,longest,preview
let g:localcomposerpath = expand('%:p:h').'/composer.json'
if filereadable(g:localcomposerpath)
au filetype php set omnifunc=phpcomplete_extended#CompletePHP
endif
I also have this in my standard vimrc. What do you think about? When I type :set omnifunc?
after having opened a controller, I got this:
omnifunc=phpcomplete_extended#CompletePHP
So I think this piece of config is not harmful, but yet, it still doesn't work
The config is OK, almost same as mine. The problem you are having is very odd. I actually need a minimal config to reproduce the bug.
I think I found my problem. I had a set autochdir
somewhere in my vimrc. I commented this out and now it works fine.
I re-enabled all my plugins one by one and it still works now that I removed the autochdir. Many thanks for the time you have spent with me! :)
@m2mdas Hi, I also had a problem with your plugins because of autochdir
. I think you should add this to README.md
After disabling autochdir
everything works fine
I will continue this https://github.com/m2mdas/phpcomplete-extended/issues/13 here:
I think the class generation has been ok after the last commit, also this looks ok to me:
Then i'm using this settings (and i have disabled supertab):
Also i've tried with:
When pressing C-X C-O in insert mode it shoots me:
Thanks and excuse my poor vim skills :-)