taoso / phpcd.vim

phpcd - A Intelligent/Smart PHP Complete Daemon Plugin for Vim/NeoVim
https://github.com/taoso/phpcd.vim
Apache License 2.0
389 stars 45 forks source link

Padawan.php #13

Closed mkusher closed 8 years ago

mkusher commented 8 years ago

Hello! I'm working on a same thing https://github.com/mkusher/padawan.php and wondering whether we can join our forces?

imaben commented 8 years ago

@mkusher Cool, Your project has supported sublime, which is also in our plans!

taoso commented 8 years ago

@mkusher phpcd.vim is just a light tool for vim. phpcd.vim prefers using the PHP's Reflection mechanism than generate index.

taoso commented 8 years ago

We will keep phpcd.vim as simple and lightweight as possible.

taoso commented 8 years ago

@przepompownia @imaben what's your opinion?

imaben commented 8 years ago

Lightweight is very important, this is also our original intention!

przepompownia commented 8 years ago

Two weeks ago I did not know about both Padawan and PHPCD although a few times in this year I was looking for free completion mechanism that has chance to match the modern commercial competitor. Two years ago phpcomplete was sufficient for small project, but even then refreshing tag file was annoying. We have eclimd, but it is heavy, difficult to current upgrade and its vim client does not contain many of the basic functionalities. PHP seems to be marginal for authors of this project.

Against this backdrop, the news of the development of two independent such project are very good news. In my opinion, both are worth independent developing, at least on the server side. I not yet acquainted with Padawan, and I do not know how exactly the client communicates with the server, but I dream of one thing: the interface that unifies calls to completion server. I do not know how workaround is needed to design it in vim language to maintain independence of whether we using vim or neovim. Just below this layer we could implement its "methods". In such way we could develop one common client or be able to easier switching to another client compatible with the interface. Similarly we could easier switching between various completion servers.

If we design a good interface, the benefits from the possibility of substitution is worth incurring cost resulting from the existence of additional layers.

My English is still poor, but I hope that as clearly described this idea.

still-dreaming-1 commented 8 years ago

I am also very interested in both of these projects. I have only tried phpcd so far, but haven't gotten it to work yet. Anyway, that is off topic here. I like the way phpcd also supports enhanced jump to definition, in addition to improved omni completion. As far as I could see, padawan is only focused on omni completion. If these two projects do join forces, it would be nice for both of these features to have equal focus.

still-dreaming-1 commented 8 years ago

As far as getting commercial support for similar features, I have added a feature request for the PhpStorm people to make a plugin for Neovim. Check it out and star it if you like the idea: https://youtrack.jetbrains.com/issue/WI-30974

taoso commented 8 years ago

@still-dreaming-1 The phpcd is only a tiny util for PHP programmers who using NeoVim (just like me :smile: ). I have already used some other utils like ctags, phpcomplete and phpcomplete-extended, none of which is good enough. What I want is a plugin, which is:

One day in last year, I got an simple idea. If I want to jump to an method's definition source file or to get a object's member, what I need to do is just got the class name(with namespace), which is the VimL's work, and use the PHP's Reflection mechanism to got the source file offset and class member. It's a simple but useful idea. However, a new problems occurs. How to make vim communicate with the PHP? I finally choose the NeoVim, because of it's msgpack based rpc-api. This is why phpcd.vim cannot support the classical vim.

Until now, we got a so tiny util, which could only do member completion and jump. Phpcd cannot do things like namespace completion, classname completion, go to abstract method's implementation, go to interface's implementation. Why? Because we cannot get these information only by the Reflection Mechanism.

I finally added the interface's implementation jump support, using the class index method, because I have to use many interface during my work. It's the phpid, you could see it's source under the php dir. But the phpid is also an lightweight solution.

As the variable type detection is analyzed by the VimL and the other works by PHP, I could not make phpcd a standalone php complete until for other editor, like Padawan.php @mkusher .

Thanks.

taoso commented 8 years ago

PHPCD will support Vim by https://github.com/phpvim/phpcd.vim/pull/45

imaben commented 8 years ago

why are you so diao?

taoso commented 6 years ago

Hello @mkusher , happy Chinese Luna New Year. The phpcd.vim has got its 250 starers, 386 commits, and 15 contributers after two years 🍾. Many things changed in the paste two year. However, I am still coding PHP using vim/neovim. Would you like join the development of phpcd.vim?

Happy New Year and Happy Coding 😄.

image

mkusher commented 6 years ago

heh, will check the sources :) (but I've almost moved from php to other languages, so have no need in padawan/phpcd/php-lang-server)