shawncplus / phpcomplete.vim

Improved PHP omnicompletion
http://www.vim.org/scripts/script.php?script_id=3171
595 stars 110 forks source link

Add basic support for properties #83

Closed marceldev89 closed 8 years ago

marceldev89 commented 8 years ago

Added basic support for properties that are added during runtime (e.g. CakePHP adds properties to controllers that reference models/helpers/etc). This was briefly talked about in https://github.com/shawncplus/phpcomplete.vim/issues/82#issuecomment-164427817 and I figured I'd give it a try.

This pull request is more about getting my changes reviewed than getting it merged. It's my first ever adventure in vim plugins/scripting so there's probably a lot that's not how it's supposed to be done. :smile:

complex857 commented 8 years ago

@marceldev89 Thank you for spending the time and effort to write the code. As you most certainly know, the main thing that needed to be done is to make the class-content-grabbing process return the docblock for the classes (the @property comments are usually resides outside of the class's code itself). Now that we got the class's docbock comment, we can try to add support for @method comments too.

I'll try to write a few test's for your code so we can be sure that it continues to work as intended.

It's my first ever adventure in vim plugins/scripting

Welcome to the herd (-:

complex857 commented 8 years ago

I've merged and pushed your code with one feature addition (made @property stuff show up in the class completions) and with tests so that they should be somewhat safe against regressions and have a baseline for later improvements.

Thank you again for the code, i really appreciate it and sorry for the delay.

marceldev89 commented 8 years ago

Awesome! :smile: