Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge into/with official phpcomplete.vim file #5

Closed
blueyed opened this issue Sep 11, 2012 · 15 comments
Closed

Merge into/with official phpcomplete.vim file #5

blueyed opened this issue Sep 11, 2012 · 15 comments

Comments

@blueyed
Copy link

blueyed commented Sep 11, 2012

It would be nice to get the improvements of this project (which appears to be a fork from the official phpcomplete.vim file) back into Vim itself.

Please consider submitting a patch to Vim itself and helping with maintaining it from there.

Thanks!

@tssm
Copy link

tssm commented Dec 16, 2013

The official phpcomplete.vim hasn't been updated since 2011 Dec 08, so why not?

@complex857
Copy link
Collaborator

I'm personally not sure what's the process to update the runtime files part of vim. I think there have been a "call to arms" for runtime plugin maintainers to send in updates when the vim 7.4 version plans were announced, but then Bram said:

I will not make big changes just before the release, everything needs some time for testing.

... and this fork of the official plugin has changed quite a bit.
I guess the ultimate root cause have been lack of interest. Does anyone know how runtime plugin updates get into the official package?

@tssm
Copy link

tssm commented Dec 17, 2013

You should contact the author of the original plugin to merge it, or, if he has abandoned it, send an email to Bram. As far as I know, run time plugins are updated with minor Vim updates, so it could be available in the next release :D

@complex857
Copy link
Collaborator

@taecilla: Well, I've shot an email for the address in the runtime files version of the plugin. I will keep you updated.

@complex857
Copy link
Collaborator

@taecilla: I've reached the maintainer who said that he can no longer maintain the plugin, so it's up for grabs along with his other completion plugins like html, xml and javascript. Bram Moolenaar have been notified too.

His remarks on the current state of the plugin was as follows:

  1. One big problem with your plugin is of course ctags support for PHP. In current state ctags support should be turned off by default (unfortunately). If you want to make it on, plugin should be able to gracefully test it and adjust its behaviour appropriately. In all cases you should prepare source bundle ready to download, not forcing users to play with patching. Maybe go full ahead and try to revive oficial ctags?
  2. Vim help text should be updated.
  3. One idea (never really finished it so it is not in official Vim distribution but it worked) - PHP has great on-line documentation - you can create hooks for showing in regular browser or use something lynx-like (links, links2, elinks) to show it directly in Vim.

For the first point, I've been planning to do a tag file parser in vimscript, so the plugin can index the tags by namespaces and other useful ways for speed (the tagfiles() function is terrible with zero-length patterns), otherwise simply not running ctags extension related functions when they are not present is always an option.
The third point reminds me to the #22 issue, at this moment I use a bunch of help docs for this found somewhere on github.

@tssm
Copy link

tssm commented Dec 19, 2013

What do you think about replacing ctags with phpctags? There are a some problems, but ctags seems completely dead :(

@blueyed
Copy link
Author

blueyed commented Dec 19, 2013

Re 3.: here is what I have come with over time:
https://github.com/blueyed/dotfiles/blob/master/vim/ftplugin/php.vim#L21

It uses pman, if available and the online help otherwise.

@complex857
Copy link
Collaborator

@taecilla: From the plugin's perspective, it doesn't matter how the "tags" file generated as long as it adheres to the tag file format, so you can absolutely use phpctags. On the top of that, phpctags names the extra fields like class and namespace like the patched ctags source so it can act as a drop in replacement already.
I'm not sure how he meant disabling ctags or degrade gracefully though, the current version of the plugin works with tag files generated with the older ctags (just much less useful) or with no tags at all (pretty much useless unless you are completing built-in things).

@blueyed: Thanks for sharing it, in my medium-term plan was to create some script that would read in a html page of the downloadable manual (like for one function for example) and generates a vim help formatted txt of it so it can have nice coloring and such. I've found a bunch of these doc files somewhere on github. Once these available it would be possible to enhance the ^] and k keys like how phpcomplete-extended does.

@tssm
Copy link

tssm commented Dec 23, 2013

@complex857 maybe just a clarification is needed. I think this plugin is so good it deserves to be shipped with Vim.

@complex857
Copy link
Collaborator

@taecilla Thanks for you kind words, here's my status update:

We've been exchanging emails, as it turns out, what he's been talking about is that the plugin should work even if the user has a non-patched ctags (of course with degraded functionality where it can't be helped).
I've tried to keep the old functionality while i was adding the new features that rely on the new tag fields but this needs more testing to be sure (I've not been using official ctags builds for a quite while).

So i think the next steps are as follows:

  • Add tests with old style tags files to ensure baseline functionality with the unpatched exuberant-ctags
  • Create a ctags source bundle with the patch already applied, maybe more binary packages, perhaps based on this branch
  • Write updated documentation for :help ft-php-omni
  • Create a monolithic plugin version with the built-in information in one file (this may not be required, but seems to be the rule of the land)
  • Create and submit patch against vim master

complex857 pushed a commit that referenced this issue Jan 10, 2014
When tags don't have namespace information use just the name for matching
in various contexts. This might result in incorrect answers but still more
useful as do nothing when the tags file generated with unpatched ctags
against a codebase with namespaces.
Related to #5, #4
complex857 pushed a commit that referenced this issue Jan 10, 2014
This should reduce the IO load on the first load and makes it easier
to create a single file bundle, related to #5
@tssm
Copy link

tssm commented Jan 10, 2014

Great! I'll be working on a PHP project and I will use the stable version of ctags and report if anything goes wrong.

complex857 pushed a commit that referenced this issue Mar 24, 2014
With vim revision 657ade71d395 (see https://code.google.com/p/vim/) the
plugin been pushed to the vim trunk. I've added the distributed version
of the plugin for the record.
Related to #5
@complex857
Copy link
Collaborator

I can proudly announce that plugin code have reached the vim source repository, I've took over the maintenance of the plugin in the vim repository and from revision 657ade71d395 the code is updated.

Once again, I'd like to thank everyone who submitted code or issues.

The included version have significantly less built-in information because of size considerations. The elimination process was somewhat arbitrarily, I've left out everything that is only in PECL and then some more (still needed to shave off a few K after that) that i consider less essential to have.
Therefore if you miss completion for your favorite extension, you can always use the version in this repo where you can enable/disable anything found in the docs.

I've created a tag in this repo and added the version that got included, the plan is that I'll tag every update i submit for the vim source so the patches can be seen here too.

The :help ft-php-omni still could use some caring attention, maybe with a paragraph or two about the patched ctags so you can get proper namespace support.

@shawncplus
Copy link
Owner

Huge congrats @complex857. You've done a great job taking ownership of this project and following through on getting it merged. I was trying to pimp you out on Twitter but your online presence seems to be virtually invisible outside of github.

@complex857
Copy link
Collaborator

@shawncplus, Thank you, I think i would have never start a project like this from scratch, I'm really glad that you have let me have my way with your code and this turned out to be useful to others too.
I'm afraid am not the social-network-butterfly kind of guy (but this could be a regional thing, twitter has virtually zero usage even among tech people in Hungary), but I appreciate the though.

@complex857
Copy link
Collaborator

complex857 commented Oct 30, 2016

I'll go aheadand close this ticket now. The currently bundled phpcomplete is basically this codebase now (with a little less bells and whistles), so in one word: Done (-:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants